cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master to d5379b8
Date Wed, 21 Aug 2013 22:53:00 GMT
Updated Branches:
  refs/heads/master 4ca24928e -> d5379b870


CLOUDSTACK-4392: API volumeresponse - return primary storage information to ROOT and resource
domain admin only.


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

Branch: refs/heads/master
Commit: d5379b87045452ea2b3d53766d12ca4fbe6f776b
Parents: 4ca2492
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Wed Aug 21 15:33:17 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Aug 21 15:43:06 2013 -0700

----------------------------------------------------------------------
 .../cloud/api/query/dao/VolumeJoinDaoImpl.java   | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5379b87/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 6a5f0a8..df6e583 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -167,16 +167,17 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO,
Long> implem
             volResponse.setBytesWriteRate(volume.getBytesReadRate());
             volResponse.setIopsReadRate(volume.getIopsWriteRate());
             volResponse.setIopsWriteRate(volume.getIopsWriteRate());
-
+            
         }
-        Long poolId = volume.getPoolId();
-        String poolName = (poolId == null) ? "none" : volume.getPoolName();
-        volResponse.setStoragePoolName(poolName);
-
-        // return hypervisor for ROOT and Resource domain only
-        if ((caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN)
-                && volume.getState() != Volume.State.UploadOp && volume.getHypervisorType()
!= null) {
-            volResponse.setHypervisor(volume.getHypervisorType().toString());
+        
+        // return hypervisor and storage pool info for ROOT and Resource domain only
+        if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN)
{   
+            if (volume.getState() != Volume.State.UploadOp && volume.getHypervisorType()
!= null) {
+                volResponse.setHypervisor(volume.getHypervisorType().toString());
+            }
+            Long poolId = volume.getPoolId();
+            String poolName = (poolId == null) ? "none" : volume.getPoolName();
+            volResponse.setStoragePoolName(poolName);
         }
 
         volResponse.setAttached(volume.getAttached());


Mime
View raw message