node-create missing the required field validation

Bug #1245294 reported by Haomeng,Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
In Progress
Undecided
Haomeng,Wang
python-ironicclient
In Progress
Undecided
Haomeng,Wang

Bug Description

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:~# ironic node-create
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| uuid | c4e8ce0e-7d7f-46c3-8321-39387d2a592c |
| driver_info | {} |
| extra | {} |
| driver | None |
| chassis_id | None |
| properties | {} |
+-------------+--------------------------------------+

Revision history for this message
Haomeng,Wang (whaom) wrote :

I will commit patch to to fix on both cli and API to do required field validation

Changed in ironic:
assignee: nobody → Haomeng,Wang (whaom)
Changed in python-ironicclient:
assignee: nobody → Haomeng,Wang (whaom)
Changed in ironic:
status: New → In Progress
Changed in python-ironicclient:
status: New → In Progress
Haomeng,Wang (whaom)
summary: - node-create/port-create missing the required field validation
+ node-create missing the required field validation
Revision history for this message
Haomeng,Wang (whaom) wrote :

Will fix in API side.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/54053

Haomeng,Wang (whaom)
description: updated
Revision history for this message
Haomeng,Wang (whaom) wrote :

Covered by this existing fix - https://review.openstack.org/#/c/53664/

Revision history for this message
aeva black (tenbrae) wrote :

This looks like a duplicate of the broader bug https://bugs.launchpad.net/ironic/+bug/1223847, which has several patches up to fix it that should land soon.

I'm going to mark this as a duplicate since there seems to be no active work on this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.