[openstack-dev] [Ironic] Command structure for OSC plugin

Brad P. Crochet brad at redhat.com
Mon Aug 24 15:16:15 UTC 2015


On 24/08/15 11:03 -0400, Brad P. Crochet wrote:
>I am working on extending the current set of patches that implement
>the OSC plugin for Ironic. I would like some discussion/guidance about
>a couple of command structures.
>

[...snip...]

>
>Secondly, maintenance mode makes sense to be part of 'openstack baremetal
>set' command, but implementation would be easier and less error-prone
>if an antonym for maintenance were used as a flag.
>
>* openstack baremetal set --maintenance --reason $REASON $NODE
>* openstack baremetal set --maintenance-antonym $NODE
>
>argparse can be used to set them as mutually exclusive and negate
>the need to check explicitly for maintenance off and !$REASON
>
>Question is what should the antonym of maintenance be? Since 'active'
>is a node state, it was suggest that it be avoided to minimize
>confusion.
>
>One thought is to use --disable/--enable, with help text in the
>command stating what it does, but it was suggested that display of
>the maintenance field would need to change.
>
>Comments? Suggestions?

Credit to lucasagomes... It makes more sense to use 'openstack
baremetal unset --maintenance' to turn it off. So I think that one can
be put to rest.

-- 
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