Piotr Kliczewski has submitted this change and it was merged.
Change subject: restapi: Ignore blank domains
......................................................................
restapi: Ignore blank domains
Currently the the value of the "domain" column of the "vm_init" table
can be null or an empty string, both meaning that the VM doesn't have a
domain assigned. But when the value of the column is an empty string it
will be included in the RESTAPI representation as follows:
<domain>
<name></name>
</domain>
This is confusing for callers, and in particular it triggers wrong
behaviour in the Python SDK. To avoid this issue this patch changes the
RESTAPI so that it won't generate the "domain" element if the domain
name is a blank string.
Change-Id: Ic2dc13b1dabc08e38def31297148f135ec299ec9
Bug-Url:
https://bugzilla.redhat.com/1113571
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
(cherry picked from commit ac78f2b7687df6f8e0ed40cf783729f9eda8c9c0)
---
M backend/manager/modules/restapi/types/pom.xml
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/TemplateMapper.java
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
3 files changed, 8 insertions(+), 5 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/30616
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2dc13b1dabc08e38def31297148f135ec299ec9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server