glance client should fail if using a non-boolean string when a boolean is required

Bug #1394236 reported by Cindy Pallares
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Cindy Pallares

Bug Description

Description of problem:
When the following command is executed, the command succeded but revirests the --is-public IS_PUBLIC to false. This should come out with wrong input error

glance --debug image-create --name CentOS-7-x86_64-GenericCloud --is-public IS_PUBLIC --disk-format raw --container-format bare --file CentOS-7-x86_64-GenericCloud-20140707_01.qcow2.1 --progress

Version-Release number of selected component (if applicable):
all

How reproducible:
Always

Steps to Reproduce:
1.glance --debug image-create --name CentOS-7-x86_64-GenericCloud --is-public IS_PUBLIC --disk-format raw --container-format bare --file CentOS-7-x86_64-GenericCloud-20140707_01.qcow2.1 --progress
2.
3.

Actual results:
sets is-public to false

Expected results:
an error

Additional info:
This looks to be becuase of the strutils.bool_from_string which looks to follow the rule of if its not true then its false.

Changed in glance:
assignee: nobody → Cindy Pallares (cindy-pallaresq)
Revision history for this message
Erno Kuvaja (jokke) wrote :

Moved to python-glanceclient as this seems to be client issue.

affects: glance → python-glanceclient
Changed in python-glanceclient:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

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

Changed in python-glanceclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/143137
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=6eaaad532ad42d46a4d5ccb6e96e6508bee5ebef
Submitter: Jenkins
Branch: master

commit 6eaaad532ad42d46a4d5ccb6e96e6508bee5ebef
Author: Cindy Pallares <email address hidden>
Date: Fri Dec 19 11:53:50 2014 -0500

    Make non-boolean check strict

    Currently when we enter any non-boolean strings in the client, it
    accepts it and defaults the value to false. It should check if the
    strings are boolean values and respond with an error if they're not.

    Closes-Bug: #1394236
    Change-Id: Ie498ee1b93524d91a43343f73140446c2cc9ab92

Changed in python-glanceclient:
status: In Progress → Fix Committed
Louis Taylor (kragniz)
Changed in python-glanceclient:
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.