Change in ovirt-engine[ovirt-engine-3.4]: restapi: Ignore blank domains

oourfali at redhat.com oourfali at redhat.com
Wed Jul 23 08:49:17 UTC 2014


Oved Ourfali 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 at 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/30617
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.4
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list