Change in ovirt-engine[master]: restapi: Accept 0 and 1 for boolean values

juan.hernandez at redhat.com juan.hernandez at redhat.com
Thu Jun 18 13:32:35 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Accept 0 and 1 for boolean values
......................................................................


restapi: Accept 0 and 1 for boolean values

According to section section 3.2.2.1 of the XML specification the values
0 and 1 should be accepted for boolean values in addition to "false" and
"true":

  3.2.2 boolean, 3.2.2.1 Lexical representation
  http://www.w3.org/TR/xmlschema-2/#boolean

In a previous change intended to validate the values of booleans the
RESTAPI was changed to accept only "false" and "true":

  restapi: Validate boolean values
  https://gerrit.ovirt.org/27925

This causes a regression for users that are sending 0 and 1. This patch
fixes that so that 0 and 1 will also be accepted.

Change-Id: I4a5005fdafa1e45e5ad17178a5ac897e6234f45b
Bug-Url: https://bugzilla.redhat.com/1230842
Related: https://bugzilla.redhat.com/1063876
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/BooleanParser.java
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/42232
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a5005fdafa1e45e5ad17178a5ac897e6234f45b
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list