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

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


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.

Currently provisioning state is set via 'openstack baremetal set --provision-state [active|deleted|rebuild|inspect|provide|manage]
$NODE'

dtantsur suggests it be top-level a command (which I concur)
'openstack baremetal [active|delete|rebuild|inspect|provide|manage] $NODE'

Question there is does that make sense?

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?

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