settingsLogin | Registersettings

[openstack-dev] [Ironic] Quick poll: OpenStackClient command for provision action

0 votes

Hi all!

I'd like to seek consensus (or at least some opinions) on patch
https://review.openstack.org/#/c/206119/
It proposed the following command:

openstack baremetal provision state --provide UUID

(where --provide can also be --active, --deleted, --inspect, etc).

I have several issues with this proposal:

  1. IIUC the structure of an OSC command is "openstack noun verb".
    "provision state" is not a verb.
  2. --active is not consistent with other options, which are verbs.

Let's have a quick poll, which would you prefer and why:

  1. openstack baremetal provision state --provide UUID
  2. openstack baremetal provision --provide UUID
  3. openstack baremetal provide UUID
  4. openstack baremetal set provision state --provide UUID
  5. openstack baremetal set state --provide UUID
  6. openstack baremetal action --provide UUID

I vote for #3. Though it's much more versbose, it reads very easily,
except for "active". For active I'm thinking about changing it to
"activate" or "provision".

My next candidate is #6. Though it's also not a verb, it reads pretty
easily.

Thanks!


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked Nov 10, 2015 in openstack-dev by Dmitry_Tantsur (18,080 points)   2 5 9

28 Responses

0 votes

Hi,

Let's have a quick poll, which would you prefer and why:

  1. openstack baremetal provision state --provide UUID
  2. openstack baremetal provision --provide UUID
  3. openstack baremetal provide UUID
  4. openstack baremetal set provision state --provide UUID
  5. openstack baremetal set state --provide UUID
  6. openstack baremetal action --provide UUID

I know very little about OSC and it's syntax, but what I would do in
this case is to follow the same syntax as the command that changes the
power state of the nodes. Apparently the power state command proposed
[1] follows the syntax:

$ openstack baremetal power --on | --off

I would expect provision state to follow the same, perhaps

$ openstack baremetal provision --provide | --active | ...

So my vote goes to make both power and provision state syntax
consistent. (Which currently is the option # 2, but none patches are
merged yet)

[1] https://review.openstack.org/#/c/172517/28

Cheers,
Lucas


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Lucas_Alvares_Gomes (6,080 points)   1 2 3
0 votes

On 11/10/2015 10:28 AM, Lucas Alvares Gomes wrote:
Hi,

Let's have a quick poll, which would you prefer and why:

  1. openstack baremetal provision state --provide UUID
  2. openstack baremetal provision --provide UUID
  3. openstack baremetal provide UUID
  4. openstack baremetal set provision state --provide UUID
  5. openstack baremetal set state --provide UUID
  6. openstack baremetal action --provide UUID

I know very little about OSC and it's syntax, but what I would do in
this case is to follow the same syntax as the command that changes the
power state of the nodes. Apparently the power state command proposed
[1] follows the syntax:

$ openstack baremetal power --on | --off

I would expect provision state to follow the same, perhaps

$ openstack baremetal provision --provide | --active | ...

So my vote goes to make both power and provision state syntax
consistent. (Which currently is the option # 2, but none patches are
merged yet)

It's still not 100% consistent, "power" is a noun, "provision" is a
verb. Not sure it matters, though, adding OSC folks so that they can
weigh in.

[1] https://review.openstack.org/#/c/172517/28

Cheers,
Lucas


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Dmitry_Tantsur (18,080 points)   2 5 9
0 votes

It's still not 100% consistent, "power" is a noun, "provision" is a verb.
Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Lucas_Alvares_Gomes (6,080 points)   1 2 3
0 votes

Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI
interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes lucasagomes@gmail.com
wrote:

It's still not 100% consistent, "power" is a noun, "provision" is a verb.
Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Pavlo_Shchelokovskyy (4,760 points)   5 9
0 votes

How about below format?

openstack baremetal <resource/target>

Example:

openstack baremetal provision provide

openstack baremetal power on/off

I think it is easy to understand and remember:)

On Tue, Nov 10, 2015 at 6:17 PM, Pavlo Shchelokovskyy <
pshchelokovskyy@mirantis.com> wrote:

Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI
interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes <
lucasagomes@gmail.com> wrote:

It's still not 100% consistent, "power" is a noun, "provision" is a
verb.
Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe:
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Haomeng,_Wang (880 points)   1
0 votes

Openstack baremetal provision provide or -provide Just doesn't feel right to me, it feels like I am typing more that I need to and it feels like I'm telling it to do the same action twice.

I would much rather see:

Openstack baremetal provide UUID
Openstack baremetal activate UUID
Openstack baremetal delete UUID
Openstack baremetal rebuild UUID
Openstack baremetal inspect UUID
Openstack baremetal manage UUID
Openstack baremetal abort UUID

And for power:

Openstack baremetal boot UUID
Openstack beremetal shutdown UUID
Openstack baremetal reboot UUID

WDYT?

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 10:49
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

How about below format?

openstack baremetal <resource/target>

Example:

openstack baremetal provision provide

openstack baremetal power on/off

I think it is easy to understand and remember:)

On Tue, Nov 10, 2015 at 6:17 PM, Pavlo Shchelokovskyy pshchelokovskyy@mirantis.com wrote:
Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes lucasagomes@gmail.com wrote:
It's still not 100% consistent, "power" is a noun, "provision" is a verb.
Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Sam_Betts_(sambetts (1,840 points)   3
0 votes

Hi Sam,

Yes, I understand your format is:

openstack baremetal

so these can cover all 'node' operations however if we want to cover
support port/chassis/driver and more ironic resources, so how about below
proposal?

openstack baremetal <resource/target>

The resource/target can be one item in following list:

node
port
chassis
driver
...

Make sense?

On Tue, Nov 10, 2015 at 7:25 PM, Sam Betts (sambetts) sambetts@cisco.com
wrote:

Openstack baremetal provision provide or —provide Just doesn’t feel right
to me, it feels like I am typing more that I need to and it feels like I’m
telling it to do the same action twice.

I would much rather see:

Openstack baremetal provide UUID
Openstack baremetal activate UUID
Openstack baremetal delete UUID
Openstack baremetal rebuild UUID
Openstack baremetal inspect UUID
Openstack baremetal manage UUID
Openstack baremetal abort UUID

And for power:

Openstack baremetal boot UUID
Openstack beremetal shutdown UUID
Openstack baremetal reboot UUID

WDYT?

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" <
openstack-dev@lists.openstack.org>
Date: Tuesday, 10 November 2015 10:49
To: "OpenStack Development Mailing List (not for usage questions)" <
openstack-dev@lists.openstack.org>
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient
command for provision action

How about below format?

openstack baremetal <resource/target>

Example:

openstack baremetal provision provide

openstack baremetal power on/off

I think it is easy to understand and remember:)

On Tue, Nov 10, 2015 at 6:17 PM, Pavlo Shchelokovskyy <
pshchelokovskyy@mirantis.com> wrote:

Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI
interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes <
lucasagomes@gmail.com> wrote:

It's still not 100% consistent, "power" is a noun, "provision" is a
verb.
Not sure it matters, though, adding OSC folks so that they can weigh
in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe:
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe:
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Haomeng,_Wang (880 points)   1
0 votes

So you would end up with a set of commands that look like this:

Openstack baremetal [node/driver/chassis] list
Openstack baremetal port list [-node uuid] <- replicate node-port-list

Openstack baremetal [node/port/driver] show UUID
Openstack baremetal chassis show [-nodes] UUID <- replicate chassis-node-list

Openstack baremetal [node/chassis/port] create
Openstack baremetal [node/chassis/port] update UUID
Openstack baremetal [node/chassis/port] delete UUID

Openstack baremetal [node/chassis] provide UUID
Openstack baremetal [node/chassis] activate UUID
Openstack baremetal [node/chassis] rebuild UUID
Openstack baremetal [node/chassis] inspect UUID
Openstack baremetal [node/chassis] manage UUID
Openstack baremetal [node/chassis] abort UUID
Openstack baremetal [node/chassis] boot UUID
Openstack baremetal [node/chassis] shutdown UUID
Openstack baremetal [node/chassis] reboot UUID

Openstack baremetal node maintain [-done] UUID
Openstack baremetal node console [-enable, -disable] UUID <- With no parameters this acts like node-get-console, otherwise acts like node-set-console-mode
Openstack baremetal node boot-device [-supported, -PXE, -CDROM, etc] UUID <- With no parameters this acts like node-get-boot-device, -supported makes it act like node-get-supported-boot-devices, and with a type of boot device passed in it’ll act like node-set-boot-device

Openstack baremetal [node/driver] passthru

WDYT? I think I’ve covered most of what exists in the Ironic CLI currently.

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 11:41
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

Hi Sam,

Yes, I understand your format is:

openstack baremetal

so these can cover all 'node' operations however if we want to cover support port/chassis/driver and more ironic resources, so how about below proposal?

openstack baremetal <resource/target>

The resource/target can be one item in following list:

node
port
chassis
driver
...

Make sense?

On Tue, Nov 10, 2015 at 7:25 PM, Sam Betts (sambetts) sambetts@cisco.com wrote:
Openstack baremetal provision provide or -provide Just doesn’t feel right to me, it feels like I am typing more that I need to and it feels like I’m telling it to do the same action twice.

I would much rather see:

Openstack baremetal provide UUID
Openstack baremetal activate UUID
Openstack baremetal delete UUID
Openstack baremetal rebuild UUID
Openstack baremetal inspect UUID
Openstack baremetal manage UUID
Openstack baremetal abort UUID

And for power:

Openstack baremetal boot UUID
Openstack beremetal shutdown UUID
Openstack baremetal reboot UUID

WDYT?

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 10:49
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

How about below format?

openstack baremetal <resource/target>

Example:

openstack baremetal provision provide

openstack baremetal power on/off

I think it is easy to understand and remember:)

On Tue, Nov 10, 2015 at 6:17 PM, Pavlo Shchelokovskyy pshchelokovskyy@mirantis.com wrote:
Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes lucasagomes@gmail.com wrote:
It's still not 100% consistent, "power" is a noun, "provision" is a verb.
Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by Sam_Betts_(sambetts (1,840 points)   3
0 votes

2015/11/10 21:19、Sam Betts (sambetts) sambetts@cisco.com のメッセージ:

So you would end up with a set of commands that look like this:

Openstack baremetal [node/driver/chassis] list
Openstack baremetal port list [―node uuid] <― replicate node-port-list

Openstack baremetal [node/port/driver] show UUID
Openstack baremetal chassis show [―nodes] UUID <― replicate chassis-node-list

Openstack baremetal [node/chassis/port] create
Openstack baremetal [node/chassis/port] update UUID
Openstack baremetal [node/chassis/port] delete UUID

Openstack baremetal [node/chassis] provide UUID
Openstack baremetal [node/chassis] activate UUID
Openstack baremetal [node/chassis] rebuild UUID
Openstack baremetal [node/chassis] inspect UUID
Openstack baremetal [node/chassis] manage UUID
Openstack baremetal [node/chassis] abort UUID
Openstack baremetal [node/chassis] boot UUID
Openstack baremetal [node/chassis] shutdown UUID
Openstack baremetal [node/chassis] reboot UUID

Openstack baremetal node maintain [―done] UUID
Openstack baremetal node console [―enable, ―disable] UUID <― With no parameters this acts like node-get-console, otherwise acts like node-set-console-mode
Openstack baremetal node boot-device [―supported, ―PXE, ―CDROM, etc] UUID <― With no parameters this acts like node-get-boot-device, ―supported makes it act like node-get-supported-boot-devices, and with a type of boot device passed in it’ll act like node-set-boot-device

Openstack baremetal [node/driver] passthru

WDYT? I think I’ve covered most of what exists in the Ironic CLI currently.
+1

To digress a little, Inspector also has a CLI command "openstack baremetal introspection start/status UUID" which will make people confused, WDYT?

Best Regards,
Yuiko Takada

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 11:41
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

Hi Sam,

Yes, I understand your format is:

openstack baremetal

so these can cover all 'node' operations however if we want to cover support port/chassis/driver and more ironic resources, so how about below proposal?

openstack baremetal <resource/target>

The resource/target can be one item in following list:

node
port
chassis
driver
...

Make sense?

On Tue, Nov 10, 2015 at 7:25 PM, Sam Betts (sambetts) sambetts@cisco.com wrote:
Openstack baremetal provision provide or ―provide Just doesn’t feel right to me, it feels like I am typing more that I need to and it feels like I’m telling it to do the same action twice.

I would much rather see:

Openstack baremetal provide UUID
Openstack baremetal activate UUID
Openstack baremetal delete UUID
Openstack baremetal rebuild UUID
Openstack baremetal inspect UUID
Openstack baremetal manage UUID
Openstack baremetal abort UUID

And for power:

Openstack baremetal boot UUID
Openstack beremetal shutdown UUID
Openstack baremetal reboot UUID

WDYT?

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 10:49
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

How about below format?

openstack baremetal <resource/target>

Example:

openstack baremetal provision provide

openstack baremetal power on/off

I think it is easy to understand and remember:)

On Tue, Nov 10, 2015 at 6:17 PM, Pavlo Shchelokovskyy pshchelokovskyy@mirantis.com wrote:
Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes lucasagomes@gmail.com wrote:

It's still not 100% consistent, "power" is a noun, "provision" is a verb.
Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2015 by 高田唯子 (700 points)   1 2
0 votes

So I don't know the intricacies of the baremetal APIs, but hopefully I can shed some light on best practices.

Do try to reuse the existing actions (http://docs.openstack.org/developer/python-openstackclient/commands.html#actions)
Do use "create", "delete", "set", "show" and "list" for basic CRUD.
Do try to have natural opposites - like issue/revoke, resume/suspend, add/remove.

So looking at the list below, I'd say:
Don't use "update" - use "set".

What's the point of "inspect"? Can you use "show"? If it's a HEAD call, how about "check"?

What's "manage" does it update a resource? Can you use "set" instead?

What are the natural opposites between provide/activate/abort/boot/shutdown?

reboot and rebuild seem good

/rant

Steve

"Sam Betts (sambetts)" ---2015/11/10 07:20:54 AM---So you would end up with a set of commands that look like this: Openstack baremetal [node/driver/cha

From: "Sam Betts (sambetts)" sambetts@cisco.com
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: 2015/11/10 07:20 AM
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

So you would end up with a set of commands that look like this:

Openstack baremetal [node/driver/chassis] list
Openstack baremetal port list [—node uuid] <— replicate node-port-list

Openstack baremetal [node/port/driver] show UUID
Openstack baremetal chassis show [—nodes] UUID <— replicate chassis-node-list

Openstack baremetal [node/chassis/port] create
Openstack baremetal [node/chassis/port] update UUID
Openstack baremetal [node/chassis/port] delete UUID

Openstack baremetal [node/chassis] provide UUID
Openstack baremetal [node/chassis] activate UUID
Openstack baremetal [node/chassis] rebuild UUID
Openstack baremetal [node/chassis] inspect UUID
Openstack baremetal [node/chassis] manage UUID
Openstack baremetal [node/chassis] abort UUID
Openstack baremetal [node/chassis] boot UUID
Openstack baremetal [node/chassis] shutdown UUID
Openstack baremetal [node/chassis] reboot UUID

Openstack baremetal node maintain [—done] UUID
Openstack baremetal node console [—enable, —disable] UUID <— With no parameters this acts like node-get-console, otherwise acts like node-set-console-mode
Openstack baremetal node boot-device [—supported, —PXE, —CDROM, etc] UUID <— With no parameters this acts like node-get-boot-device, —supported makes it act like node-get-supported-boot-devices, and with a type of boot device passed in it’ll act like node-set-boot-device

Openstack baremetal [node/driver] passthru

WDYT? I think I’ve covered most of what exists in the Ironic CLI currently.

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 11:41
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

Hi Sam,

Yes, I understand your format is:

openstack baremetal

so these can cover all 'node' operations however if we want to cover support port/chassis/driver and more ironic resources, so how about below proposal?

openstack baremetal <resource/target>

The resource/target can be one item in following list:

node
port
chassis
driver
...

Make sense?

On Tue, Nov 10, 2015 at 7:25 PM, Sam Betts (sambetts) sambetts@cisco.com wrote:Openstack baremetal provision provide or —provide Just doesn’t feel right to me, it feels like I am typing more that I need to and it feels like I’m telling it to do the same action twice.

I would much rather see:

Openstack baremetal provide UUID
Openstack baremetal activate UUID
Openstack baremetal delete UUID
Openstack baremetal rebuild UUID
Openstack baremetal inspect UUID
Openstack baremetal manage UUID
Openstack baremetal abort UUID

And for power:

Openstack baremetal boot UUID
Openstack beremetal shutdown UUID
Openstack baremetal reboot UUID

WDYT?

Sam

From: "Haomeng, Wang" wanghaomeng@gmail.com
Reply-To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Date: Tuesday, 10 November 2015 10:49
To: "OpenStack Development Mailing List (not for usage questions)" openstack-dev@lists.openstack.org
Subject: Re: [openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action

How about below format?

openstack baremetal <resource/target>

Example:

openstack baremetal provision provide

openstack baremetal power on/off

I think it is easy to understand and remember:)

On Tue, Nov 10, 2015 at 6:17 PM, Pavlo Shchelokovskyy pshchelokovskyy@mirantis.com wrote:
Hi,
I like the last variant by Lucas, and agree we need to ensure the CLI interface is consistent between power and provision commands.

Best regards,

On Tue, Nov 10, 2015 at 12:00 PM Lucas Alvares Gomes lucasagomes@gmail.com wrote:> It's still not 100% consistent, "power" is a noun, "provision" is a verb.

Not sure it matters, though, adding OSC folks so that they can weigh in.

"provision" can also be a noun [1]. But since the OSC syntax suggest
having a verb we could have something like:

$ openstack baremetal set power --on | --off
$ openstack baremetal set provision --provide | --active | ...

[1] http://www.thefreedictionary.com/provision


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

responded Nov 10, 2015 by Steve_Martinelli (6,500 points)   1 3 6
...