Darshan N has uploaded a new change for review.

Change subject: restapi: correct status code for add brick when volume is down.
......................................................................

restapi: correct status code for add brick when volume is down.

In Method resolveCreatedList for populating entity,
populate method is used instead of doPopulate.
As doPopulate doesnot return proper status code
when the volume is down.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1018904
Change-Id: Ic6c680383ea75d898a6496c86daabe38630f9d18
Signed-off-by: ndarshan <[email protected]>
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResource.java
M 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResourceTest.java
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/41/21941/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResource.java
index 3c44fbd..8117d7b 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResource.java
@@ -113,7 +113,7 @@
             GlusterBricks bricks = new GlusterBricks();
             for (Guid id : (List<Guid>) result.getActionReturnValue()) {
                 GlusterBrickEntity created = entityResolver.resolve(id);
-                
bricks.getGlusterBricks().add(addLinks(doPopulate(map(created), created)));
+                bricks.getGlusterBricks().add(addLinks(populate(map(created), 
created)));
             }
             return bricks;
         } catch (Exception e) {
diff --git 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResourceTest.java
 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResourceTest.java
index 7a90b8c..0135259 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResourceTest.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterBricksResourceTest.java
@@ -155,7 +155,6 @@
         expect(uriInfo.getPath()).andReturn("clusters/" + clusterId + 
"/glustervolumes/" + volumeId + "/bricks")
                 .anyTimes();
         setUriInfo(uriInfo);
-        setupEntityExpectationAdvancedDetails(1, false);
         setUpCreationExpectations(VdcActionType.AddBricksToGlusterVolume,
                 GlusterVolumeBricksActionParameters.class,
                 new String[] { "VolumeId", "Bricks" },


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6c680383ea75d898a6496c86daabe38630f9d18
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Darshan N <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to