← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1394236] [NEW] glance client should fail if using a non-boolean string when a boolean is required

 

Public bug reported:

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.

** Affects: glance
     Importance: Undecided
     Assignee: Cindy Pallares (cindy-pallaresq)
         Status: New

** Changed in: glance
     Assignee: (unassigned) => Cindy Pallares (cindy-pallaresq)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1394236

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

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1394236/+subscriptions


Follow ups

References