Comment 0 for bug 1245294

Revision history for this message
Haomeng,Wang (whaom) wrote : node-create/port-create missing the required field validation

node-create/port-create commands have some REQUIRED arguments, they can be listed with help, but if we cannot pass these during creating, no any validation checking, no any error message.

root@ubuntu1:~/1244072/ironic2/ironic# ironic help node-create
usage: ironic node-create [-c <chassis id>] [-d <driver>] [-i <key=value>]
                          [-p <key=value>] [-e <key=value>]

Create a new node.

Optional arguments:
  -c <chassis id>, --chassis_id <chassis id>
                        ID of the chassis that this node belongs to [REQUIRED]
  -d <driver>, --driver <driver>
                        Driver used to control the node [REQUIRED]
  -i <key=value>, --driver_info <key=value>
                        Key/value pairs used by the driver. Can be specified
                        multiple times
  -p <key=value>, --properties <key=value>
                        Key/value pairs describing the physical
                        characteristics of the node. This is exported to Nova
                        and used by the scheduler. Can be specified multiple
                        times
  -e <key=value>, --extra <key=value>
                        Record arbitrary key/value metadata. Can be specified
                        multiple times
root@ubuntu1:~/1244072/ironic2/ironic#

root@ubuntu1:~/1244072/ironic2/ironic# ironic help port-create
usage: ironic port-create [-a <address>] [-n <node id>] [-e <key=value>]

Create a new port.

Optional arguments:
  -a <address>, --address <address>
                        MAC Address for this port [REQUIRED]
  -n <node id>, --node_id <node id>
                        ID of the node that this port belongs to [REQUIRED]
  -e <key=value>, --extra <key=value>
                        Record arbitrary key/value metadata. Can be specified
                        multiple times
root@ubuntu1:~/1244072/ironic2/ironic#