You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/06/15 04:52:42 UTC
[42/50] [abbrv] git commit: updated refs/heads/object_store to f41c800
CLOUDSTACK-3016: remove zonetype parameter from listHosts API.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb37d4cb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb37d4cb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb37d4cb
Branch: refs/heads/object_store
Commit: cb37d4cb63b45176811475f5b591196de414de8d
Parents: 4b2eb18
Author: Jessica Wang <je...@apache.org>
Authored: Fri Jun 14 16:14:21 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Fri Jun 14 16:14:45 2013 -0700
----------------------------------------------------------------------
.../cloudstack/api/command/admin/host/ListHostsCmd.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/cb37d4cb/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
index 69c6980..eaaec30 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
@@ -74,9 +74,6 @@ public class ListHostsCmd extends BaseListCmd {
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
description="the Zone ID for the host")
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.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = UserVmResponse.class,
required=false, description="lists hosts in the same cluster as this VM and flag hosts with enough CPU/RAm to host this VM")
@@ -126,10 +123,6 @@ public class ListHostsCmd extends BaseListCmd {
public Long getZoneId() {
return zoneId;
}
-
- public String getZoneType() {
- return zoneType;
- }
public Long getVirtualMachineId() {
return virtualMachineId;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb37d4cb/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 beda75e..b7d424f 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1422,8 +1422,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
public Pair<List<HostJoinVO>, Integer> searchForServersInternal(ListHostsCmd cmd) {
- Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), cmd.getZoneId());
- String zoneType = cmd.getZoneType();
+ Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), cmd.getZoneId());
Object name = cmd.getHostName();
Object type = cmd.getType();
Object state = cmd.getState();
@@ -1444,8 +1443,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
sb.and("type", sb.entity().getType(), SearchCriteria.Op.LIKE);
sb.and("status", sb.entity().getStatus(), 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("resourceState", sb.entity().getResourceState(), SearchCriteria.Op.EQ);
@@ -1489,10 +1487,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);
}