ironic *-show commands return empty properties when the input uuid is "" or space char

Bug #1442436 reported by Haomeng,Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Low
Haomeng,Wang

Bug Description

ironic *-show commands return empty properties when the input uuid is "" or space char as below behavior:

[root@rhel7-osee ironic]# ironic chassis-show ""

+-------------+-------+
| Property | Value |
+-------------+-------+
| updated_at | |
| created_at | |
| extra | |
| uuid | |
| description | |
+-------------+-------+

[root@rhel7-osee ironic]#

[root@rhel7-osee ironic]# ironic port-show ""

+------------+-------+
| Property | Value |
+------------+-------+
| node_uuid | |
| uuid | |
| extra | |
| created_at | |
| updated_at | |
| address | |
+------------+-------+
[root@rhel7-osee ironic]#

Haomeng,Wang (whaom)
Changed in python-ironicclient:
assignee: nobody → Haomeng,Wang (whaom)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Haomeng,Wang (whaom) wrote :

Share the current behavior without debug information as below:

[root@rhel7-osee ironic]# ironic chassis-show ""

+-------------+-------+
| Property | Value |
+-------------+-------+
| updated_at | |
| created_at | |
| extra | |
| uuid | |
| description | |
+-------------+-------+

[root@rhel7-osee ironic]#

[root@rhel7-osee ironic]# ironic port-show ""

+------------+-------+
| Property | Value |
+------------+-------+
| node_uuid | |
| uuid | |
| extra | |
| created_at | |
| updated_at | |
| address | |
+------------+-------+
[root@rhel7-osee ironic]#

description: updated
Revision history for this message
Ruby Loo (rloo) wrote :

Hi, if you add --debug, you'll see the API call that is made.

for ironic chassis-show "": http://localhost:6385/v1/chassis

Without a chassis uuid in the url, this is basically a chassis-list call.

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

Ruby, yes, agree with you, it is fine for API level, so we just add validation from client code to check if uuid is empty or space chars and prompt to user.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/172618
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=cec37d5a67b2500263e033b7241606174513a38f
Submitter: Jenkins
Branch: master

commit cec37d5a67b2500263e033b7241606174513a38f
Author: Haomeng, Wang <email address hidden>
Date: Sat Apr 18 11:30:55 2015 +0000

    Ensure *-show input uuid is not empty

    Ironic *-show does not ensure that uuid are not empty.

    This patch adds checks to the client to ensure that command line
    arguments are not empty strings or only whitespace. It will raise
    a command exception if *-show command line argument is an empty
    string or only whitespace.

    Change-Id: Ia34957922006da5ecbbfc7483040d67ac51f0ada
    Closes-Bug: 1442436

Changed in python-ironicclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/177989

Haomeng,Wang (whaom)
tags: added: kilo-rc-potential
Revision history for this message
aeva black (tenbrae) wrote :

Removing tag kilo-rc-potential as this is not related to client library dependencies.

tags: removed: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-ironicclient (stable/kilo)

Change abandoned by Haomeng,Wang (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/177989

Changed in python-ironicclient:
milestone: none → 0.7.0
status: Fix Committed → Fix Released
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.