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 69c69802bfe..eaaec3091a7 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; diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index beda75e863c..b7d424fb424 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, 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); }