Bug 1063876 - OVIRT-CLI: async parameter counts any value except true as false when it should accept only true/false values
Summary: OVIRT-CLI: async parameter counts any value except true as false when it shou...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: bugs@ovirt.org
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-11 15:14 UTC by Ilia Meerovich
Modified: 2016-07-05 00:06 UTC (History)
6 users (show)

Fixed In Version: ovirt-3.5.0-alpha2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-13 07:25:18 UTC
oVirt Team: Infra


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 27925 master MERGED restapi: Validate boolean values Never

Description Ilia Meerovich 2014-02-11 15:14:52 UTC
[oVirt shell (connected)]# action host 17fa99f1-a423-43d9-80d7-6940066c7496 activate --async true

async       : True                                                                                                                                                                                                                           
host-id     : 17fa99f1-a423-43d9-80d7-6940066c7496                                                                                                                                                                                           
job-id      : 7d74db65-439a-4336-aad6-51ea6c323288                                                                                                                                                                                           
status-state: complete                                                                                                                                                                                                                       

[oVirt shell (connected)]# action host 17fa99f1-a423-43d9-80d7-6940066c7496 deactivate --async moo

async       : False                                                                                                                                                                                                                          
host-id     : 17fa99f1-a423-43d9-80d7-6940066c7496                                                                                                                                                                                           
status-state: complete                                                                                                                                                                                                                       

[oVirt shell (connected)]#

Comment 1 Juan Hernández 2014-02-11 15:23:46 UTC
This is a behaviour of the server, not of the CLI. The CLI just sends the value to the server, and the server decides what is valid and what isn't. Changing this behavior may break backwards compatibility, as users may be already using values other than "true" and "false". We will review this as part of 3.5.

Comment 2 Juan Hernández 2014-05-20 10:11:16 UTC
The proposed patch adds validation of boolean values in the RESTAPI, so if the CLI or SDK send an incorrect value the request will be rejected, for example:

[oVirt shell (connected)]# action host node1 activate --async junk

  ==================================== ERROR =================================
  status: 400
  reason: Bad Request
  detail: Value "junk" isn't a valid boolean, it should be "true" or "false"
  ============================================================================

Comment 3 Gil Klein 2014-08-13 07:25:18 UTC
This bug was fixed and is slated to be in the upcoming version. As we
are focusing our testing at this phase on severe bugs, this bug was
closed without going through its verification step. If you think this
bug should be verified by QE, please set its severity to high and move
it back to ON_QA


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