Bug 1230842 - Legal values "0" and "1" for boolean parameters no longer accepted in RHEV 3.5
Summary: Legal values "0" and "1" for boolean parameters no longer accepted in RHEV 3.5
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Juan Hernández
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-11 15:31 UTC by Julio Entrena Perez
Modified: 2019-10-10 09:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-09 21:07:50 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1480343 0 None None None Never
Red Hat Product Errata RHEA-2016:0376 0 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager 3.6.0 2016-03-10 01:20:52 UTC
oVirt gerrit 42232 0 master MERGED restapi: Accept 0 and 1 for boolean values Never

Description Julio Entrena Perez 2015-06-11 15:31:07 UTC
Description of problem:
API calls using Python SDK fail if legal values "0" and "1" are used for boolean parameters.

Version-Release number of selected component (if applicable):
rhevm-sdk-python-3.5.2.1-1.el6ev

How reproducible:
Always.

Steps to Reproduce:
1. Issue a call that requires boolean parameter(s).
2. Use "0" or "1" for the boolean parameter(s). For example:
   host.nics.setupnetworks(params.Action(force = 0, check_connectivity = 1, host_nics = params.HostNics(host_nic = mynics)))

Actual results:
status: 400
reason: Bad Request
detail: Value "1" isn't a valid boolean, it should be "true" or "false"

Expected results:
API call succeeds.

Additional info:
- This used to work in all RHEV 3.x versions up to and including 3.4.
- This seems to be a consequence of the change in upstream bug 1063876 .
- Since the change was applied to JAXB (Java Architecture for XML Binding), according to the XML specification, values "0" and "1" are not canonical but still legal values for boolean datatypes: http://www.w3.org/TR/xmlschema-2/#boolean

Comment 8 Max Kovgan 2015-06-28 14:12:31 UTC
ovirt-3.6.0-3 release

Comment 9 Gonza 2015-09-14 14:32:01 UTC
Verified with:
ovirt-engine-sdk-python-4.0.0.0-0.1.20150908.gitceb901a.fc22.noarch

No error msg for:
host.nics.setupnetworks(params.Action(force=0, check_connectivity=1,
                                          host_nics=params.HostNics(
                                              host_nic=mynics)))

Comment 12 errata-xmlrpc 2016-03-09 21:07:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0376.html


Note You need to log in before you can comment on or make changes to this bug.