cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 8925d39
Date Fri, 14 Jun 2013 23:59:24 GMT
Updated Branches:
  refs/heads/master cb37d4cb6 -> 8925d39b7


CLOUDSTACK-3016: remove zonetype parameter from listStoragePools API.


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

Branch: refs/heads/master
Commit: ea0de9eaf4a7fb50f961b4227420a8f38effa371
Parents: cb37d4c
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Jun 14 16:33:27 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri Jun 14 16:33:27 2013 -0700

----------------------------------------------------------------------
 .../api/command/admin/storage/ListStoragePoolsCmd.java   |  7 -------
 server/src/com/cloud/api/query/QueryManagerImpl.java     | 11 +++--------
 2 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ea0de9ea/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
index 17adb18..85a3c22 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
@@ -59,9 +59,6 @@ public class ListStoragePoolsCmd extends BaseListCmd {
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
             description="the Zone ID for the storage pool")
     private Long zoneId;
-
-    @Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network
type of the zone that the virtual machine belongs to")
-    private String zoneType;
     
     @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = StoragePoolResponse.class,
             description="the ID of the storage pool")
@@ -95,10 +92,6 @@ public class ListStoragePoolsCmd extends BaseListCmd {
         return zoneId;
     }
 
-    public String getZoneType() {
-        return zoneType;
-    }
-    
     public Long getId() {
         return id;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ea0de9ea/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index b7d424f..fc2948d 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1881,8 +1881,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
 
     private Pair<List<StoragePoolJoinVO>, Integer> searchForStoragePoolsInternal(ListStoragePoolsCmd
cmd) {
 
-        Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(),
cmd.getZoneId());
-        String zoneType = cmd.getZoneType();
+        Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(),
cmd.getZoneId());       
         Object id = cmd.getId();
         Object name = cmd.getStoragePoolName();
         Object path = cmd.getPath();
@@ -1901,8 +1900,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
         sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
         sb.and("path", sb.entity().getPath(), SearchCriteria.Op.EQ);
-        sb.and("dataCenterId", sb.entity().getZoneId(), SearchCriteria.Op.EQ);
-        sb.and("dataCenterType", sb.entity().getZoneType(), SearchCriteria.Op.EQ);
+        sb.and("dataCenterId", sb.entity().getZoneId(), SearchCriteria.Op.EQ);        
         sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
         sb.and("clusterId", sb.entity().getClusterId(), SearchCriteria.Op.EQ);
         sb.and("hostAddress", sb.entity().getHostAddress(), SearchCriteria.Op.EQ);
@@ -1932,10 +1930,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         }
         if (zoneId != null) {
             sc.setParameters("dataCenterId", zoneId);
-        }
-        if (zoneType != null) {
-        	sc.setParameters("dataCenterType", zoneType);
-        }
+        }        
         if (pod != null) {
             sc.setParameters("podId", pod);
         }


Mime
View raw message