Juan Hernandez has uploaded a new change for review.

Change subject: core: correct path for snapshot links
......................................................................

core: correct path for snapshot links

The links to the relevant snapshot objects should be under the snapshot
object and not under the vm object to be consistent with the displayed
path.

Change-Id: I223b0cef14b887c1e1e3cff6f06b01fd3ac050c9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1077678
Signed-off-by: Liron Aravot <[email protected]>
(cherry picked from commit 7842e5cf1dfa9ebf62057774b3cbf91c37b88b65)
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/27/29927/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
index db2f10d..c7e3d18 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
@@ -103,12 +103,11 @@
         if (entity.isVmConfigurationAvailable()) {
             snapshot.setVm(new VM());
             getMapper(org.ovirt.engine.core.common.businessentities.VM.class, 
VM.class).map(getVmPreview(snapshot), snapshot.getVm());
-            snapshot.getVm().getLinks().addAll(snapshot.getLinks());
         }
         else {
             snapshot.setVm(null);
+            snapshot.getLinks().clear();
         }
-        snapshot.getLinks().clear();
         return snapshot;
     }
 


-- 
To view, visit http://gerrit.ovirt.org/29927
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I223b0cef14b887c1e1e3cff6f06b01fd3ac050c9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to