cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [68/81] [abbrv] git commit: updated refs/heads/ui-restyle to e901b82
Date Mon, 14 Oct 2013 17:18:00 GMT
VolumeResponse: added storageId to the response (returned to admin only) as this parameter
is being passed in migrateVolume/updateVolume API requests, so have to return it in the response
as well


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/90cc0d8f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90cc0d8f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90cc0d8f

Branch: refs/heads/ui-restyle
Commit: 90cc0d8f0174f0c3c8e74a0b681459bc9286f199
Parents: 6af882c
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Oct 10 16:39:08 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Thu Oct 10 16:51:47 2013 -0700

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/response/VolumeResponse.java   | 8 +++++++-
 server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java    | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cc0d8f/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
index d2ca37a..56c007f 100644
--- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
@@ -17,7 +17,6 @@
 package org.apache.cloudstack.api.response;
 
 import java.util.Date;
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
@@ -189,6 +188,10 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
     @SerializedName(ApiConstants.PATH)
     @Param(description="The path of the volume")
     private String path;
+    
+    @SerializedName(ApiConstants.STORAGE_ID)
+    @Param(description = "id of the primary storage hosting the disk volume; returned to
admin user only", since="4.3")
+    private String storagePoolId;
 
     public String getPath() {
         return path;
@@ -402,4 +405,7 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
         this.displayVm = displayVm;
     }
 
+    public void setStoragePoolId(String storagePoolId) {
+        this.storagePoolId = storagePoolId;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cc0d8f/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index b76ff34..edd471b 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -182,6 +182,7 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO,
Long> implem
             Long poolId = volume.getPoolId();
             String poolName = (poolId == null) ? "none" : volume.getPoolName();
             volResponse.setStoragePoolName(poolName);
+            volResponse.setStoragePoolId(volume.getPoolUuid());
         }
 
         volResponse.setAttached(volume.getAttached());


Mime
View raw message