Bug 886802 - REST API does not show custom properties containing the '=' character more than once
REST API does not show custom properties containing the '=' character more th...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.0.2
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.2.0
Assigned To: Ravi Nori
Tareq Alayan
infra
:
Depends On:
Blocks: 915537
  Show dependency treegraph
 
Reported: 2012-12-13 03:43 EST by Javier Peña
Modified: 2016-02-10 14:07 EST (History)
10 users (show)

See Also:
Fixed In Version: sf4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Javier Peña 2012-12-13 03:43:19 EST
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 03:44:01 EST
Created attachment 662782 [details]
Console output for working case
Comment 2 Ravi Nori 2012-12-17 14:34:17 EST
link http://gerrit.ovirt.org/#/c/10160/

Change id: I19bcbc278a51722636ddaa0a660b5289933bc8ba
Comment 3 Tareq Alayan 2013-02-10 13:48:04 EST
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 05:22:47 EDT
3.2 has been released
Comment 5 Itamar Heim 2013-06-11 05:44:31 EDT
3.2 has been released

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