[openstack-dev] [Ironic] [OSC] Quick poll: OpenStackClient command for provision action
Brad P. Crochet
brad at redhat.com
Tue Nov 10 15:26:34 UTC 2015
On Tue, Nov 10, 2015 at 9:32 AM, Steve Martinelli <stevemar at ca.ibm.com> wrote:
>
> 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".
>
Originally, I had gone down the path of using set for most of these
operations. However, there was concern that the 'openstack baremetal
set' command was crossing too many APIs.
Would it be out of bounds to use something like 'openstack baremetal
set power --on/off' or 'openstack baremetal set provision state
--active/etc'. Then they can be discrete commands without a bunch of
if statements in the code.
>
> 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
>
--
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