Bug 886802 - REST API does not show custom properties containing the '=' character more than once
Summary: REST API does not show custom properties containing the '=' character more th...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.0.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.2.0
Assignee: Ravi Nori
QA Contact: Tareq Alayan
URL:
Whiteboard: infra
Depends On:
Blocks: 915537
TreeView+ depends on / blocked
 
Reported: 2012-12-13 08:43 UTC by Javier Peña
Modified: 2016-02-10 19:07 UTC (History)
10 users (show)

Fixed In Version: sf4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Console output for failing case (3.79 KB, text/plain)
2012-12-13 08:43 UTC, Javier Peña
no flags Details
Console output for working case (4.08 KB, text/plain)
2012-12-13 08:44 UTC, Javier Peña
no flags Details

Description Javier Peña 2012-12-13 08:43:19 UTC
Created attachment 662781 [details]
Console output for failing case

Description of problem:
This somewhat similar to https://bugzilla.redhat.com/show_bug.cgi?id=728793, but only related to the REST API. When setting a custom property that contains more than one '=' character, the property is saved and displayed in the web interface, but cannot be seen when getting the VM properties via the REST API.

Version-Release number of selected component (if applicable): 3.0.2, also tested on 3.0.7 with the same result


How reproducible: Always


Steps to Reproduce:
1. Set a custom property for a VM with more than one '=' character, e.g. 

floppyinject=deltacloud-user-data.txt:TVh4b2RIUndjem92THpFd0xqTXdMakUwTlM0eU1qZDhNR1U1WTJZNVpUZ3RORFEzTWkweE1XVXlMVGxoWW1JdE1EQXhZVFJo
WVRnNE56QTFmSGRpTVVwWlJHcE1Ubkp4TWtGbWNucFBNVXAwZGxwS2RVNUtWbkpKTkRSQ1pGbHZXVWxzVmtkR1pHRXpOMjgwV1E9PQ==

2. Get the VM properties via the REST API, it will show the following

...
  <stateless>false</stateless>
    <custom_properties/>
    <placement_policy>
...

3. Set the property to a different value, not including more than one '=', it will work
  
Actual results: custom property not seen in the API output.


Expected results: Custom property displayed in the API response


Additional info: Attached two files. working.txt shows how the custom property is properly displayed and stored in the database when there is only a '=' char, failing.txt show how it is stored in the database but not displayed by the API when there is more than one.

Comment 1 Javier Peña 2012-12-13 08:44:01 UTC
Created attachment 662782 [details]
Console output for working case

Comment 2 Ravi Nori 2012-12-17 19:34:17 UTC
link http://gerrit.ovirt.org/#/c/10160/

Change id: I19bcbc278a51722636ddaa0a660b5289933bc8ba

Comment 3 Tareq Alayan 2013-02-10 18:48:04 UTC
Verified. 
created a new custom variable:
rhevm-config -s UserDefinedVMProperties='finjeck2=.*'

hook it to vm.

Rest api get on vm:
 
<custom_properties>
    <custom_property name="finjeck2" value="hdfskjhfks=="/>
</custom_properties>

Comment 4 Itamar Heim 2013-06-11 09:22:47 UTC
3.2 has been released

Comment 5 Itamar Heim 2013-06-11 09:44:31 UTC
3.2 has been released


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