[openstack-dev] [Ironic] Quick poll: OpenStackClient command for provision action
Brad P. Crochet
brad at redhat.com
Tue Nov 10 15:32:29 UTC 2015
On Tue, Nov 10, 2015 at 4:09 AM, Dmitry Tantsur <dtantsur at redhat.com> wrote:
> 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.
>
In this case, the noun is actually 'baremetal provision state'. The
'action' is the states themselves. It doesn't fit exactly, but seems
to at least be somewhat natural.
> 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 think my vote would be for #4 (or #5 if 'state' alone is enough to
convey the intent). I would love to get an OSC person's view on that
one. (Question already asked in another post)
>
> 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".
#3 might pose some problems, because of how argparse would need to be
used. I wouldn't want to have 7 different classes just to handle a
single API call. I'd say it is *possible*, but probably not ideal.
>
> My next candidate is #6. Though it's also not a verb, it reads pretty
> easily.
Might be too generic for my tastes.
>
> Thanks!
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
--
Brad P. Crochet, RHCA, RHCE, RHCVA, RHCDS
Principal Software Engineer
(c) 704.236.9385 (w) 919.301.3231
More information about the OpenStack-dev
mailing list