cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [45/50] [abbrv] git commit: updated refs/heads/object_store to f41c800
Date Sat, 15 Jun 2013 02:52:45 GMT
CLOUDSTACK-3016: remove zonetype parameter from listVirtualMachines API.


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

Branch: refs/heads/object_store
Commit: 8925d39b782556c16cf4828b0062337d4b15021c
Parents: b4a692d
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Jun 14 16:51:20 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri Jun 14 16:51:20 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/command/user/vm/ListVMsCmd.java   |  7 -------
 server/src/com/cloud/api/query/QueryManagerImpl.java | 15 ++++-----------
 2 files changed, 4 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8925d39b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index b2a2ce0..d3b29db 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@ -78,9 +78,6 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
     @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
description="the availability zone ID")
     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.FOR_VIRTUAL_NETWORK, type=CommandType.BOOLEAN,
             description="list by network type; true if need to list vms using Virtual Network,
false otherwise")
     private Boolean forVirtualNetwork;
@@ -149,10 +146,6 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
         return zoneId;
     }
 
-    public String getZoneType() {
-        return zoneType;
-    }
-    
     public Boolean getForVirtualNetwork() {
         return forVirtualNetwork;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8925d39b/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 4e0794c..f70f5ae 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -636,8 +636,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         c.addCriteria(Criteria.ID, cmd.getId());
         c.addCriteria(Criteria.NAME, cmd.getInstanceName());
         c.addCriteria(Criteria.STATE, cmd.getState());
-        c.addCriteria(Criteria.DATACENTERID, cmd.getZoneId());
-        c.addCriteria(Criteria.DATACENTERTYPE, cmd.getZoneType());
+        c.addCriteria(Criteria.DATACENTERID, cmd.getZoneId());        
         c.addCriteria(Criteria.GROUPID, cmd.getGroupId());
         c.addCriteria(Criteria.FOR_VIRTUAL_NETWORK, cmd.getForVirtualNetwork());
         c.addCriteria(Criteria.NETWORKID, cmd.getNetworkId());
@@ -686,8 +685,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         Object name = c.getCriteria(Criteria.NAME);
         Object state = c.getCriteria(Criteria.STATE);
         Object notState = c.getCriteria(Criteria.NOTSTATE);
-        Object zoneId = c.getCriteria(Criteria.DATACENTERID);
-        Object zoneType = c.getCriteria(Criteria.DATACENTERTYPE);
+        Object zoneId = c.getCriteria(Criteria.DATACENTERID);        
         Object pod = c.getCriteria(Criteria.PODID);
         Object hostId = c.getCriteria(Criteria.HOSTID);
         Object hostName = c.getCriteria(Criteria.HOSTNAME);
@@ -709,8 +707,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         sb.and("stateEQ", sb.entity().getState(), SearchCriteria.Op.EQ);
         sb.and("stateNEQ", sb.entity().getState(), SearchCriteria.Op.NEQ);
         sb.and("stateNIN", sb.entity().getState(), SearchCriteria.Op.NIN);
-        sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
-        sb.and("dataCenterType", sb.entity().getDataCenterType(), SearchCriteria.Op.EQ);
+        sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);    
  
         sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
         sb.and("hypervisorType", sb.entity().getHypervisorType(), SearchCriteria.Op.EQ);
         sb.and("hostIdEQ", sb.entity().getHostId(), SearchCriteria.Op.EQ);
@@ -824,11 +821,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
                 sc.setParameters("stateNEQ", "Destroyed");
             }
         }
-        
-        if (zoneType != null) {
-        	sc.setParameters("dataCenterType", zoneType);
-        }
-        
+               
         if (pod != null) {
             sc.setParameters("podId", pod);
 


Mime
View raw message