Juan Hernandez has uploaded a new change for review.

Change subject: restapi: Don't exclude "vms" and "templates" links of storage 
domains
......................................................................

restapi: Don't exclude "vms" and "templates" links of storage domains

Currently the links to the "vms" and "templates" subcollections of
storage domains are excluded, but recently these collections started to
be used in order to find "unregistered" virtual machines and templates.
This patch changes the RESTAPI so that these links aren't excluded.

Change-Id: I7abe594c2d15edbc778ec5861b0895cbf8eab969
Bug-Url: https://bugzilla.redhat.com/1213302
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
(cherry picked from commit f42ace9b3ec40f6a560591db48fb363a5e19f2dd)
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
M 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResourceTest.java
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/40074/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
index fa799a3..7d0941a 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
@@ -153,7 +153,7 @@
         return isIsoDomain(storageDomain) ? new String[] { "templates", "vms", 
"disks", "storageconnections", "images" }
                 : isExportDomain(storageDomain) ? new String[] { "files", 
"storageconnections", "images" }
                     : isImageDomain(storageDomain) ? new String[] { 
"templates", "vms", "files", "disks", "storageconnections" }
-                        : new String[] { "templates", "vms", "files", "images" 
};
+                        : new String[] { "files", "images" };
     }
 
     /**
diff --git 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResourceTest.java
 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResourceTest.java
index f7044a7..2326cbb 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResourceTest.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResourceTest.java
@@ -868,7 +868,7 @@
         assertEquals(TARGET, 
model.getStorage().getVolumeGroup().getLogicalUnits().get(0).getTarget());
         assertEquals(ADDRESSES[0], 
model.getStorage().getVolumeGroup().getLogicalUnits().get(0).getAddress());
         assertEquals(PORT, 
model.getStorage().getVolumeGroup().getLogicalUnits().get(0).getPort());
-        assertEquals(5, model.getLinks().size());
+        assertEquals(7, model.getLinks().size());
         assertEquals("permissions", model.getLinks().get(0).getRel());
         assertNotNull(model.getLinks().get(0).getHref());
         verifyLinks(model);


-- 
To view, visit https://gerrit.ovirt.org/40074
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7abe594c2d15edbc778ec5861b0895cbf8eab969
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to