CLOUDSTACK-3016: remove zonetype parameter from listSystemVMs API.

This commit is contained in:
Jessica Wang 2013-06-17 15:57:20 -07:00
parent 4c26dd6ae5
commit cb35ec6f4d
2 changed files with 0 additions and 18 deletions

View File

@ -74,9 +74,6 @@ public class ListSystemVMsCmd extends BaseListCmd {
description="the storage ID where vm's volumes belong to", since="3.0.1")
private Long storageId;
@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
private String zoneType;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@ -113,10 +110,6 @@ public class ListSystemVMsCmd extends BaseListCmd {
return storageId;
}
public String getZoneType() {
return zoneType;
}
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////

View File

@ -3078,7 +3078,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
public Pair<List<? extends VirtualMachine>, Integer> searchForSystemVm(ListSystemVMsCmd cmd) {
String type = cmd.getSystemVmType();
Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), cmd.getZoneId());
String zoneType = cmd.getZoneType();
Long id = cmd.getId();
String name = cmd.getSystemVmName();
String state = cmd.getState();
@ -3105,12 +3104,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
sb.join("volumeSearch", volumeSearch, sb.entity().getId(), volumeSearch.entity().getInstanceId(), JoinBuilder.JoinType.INNER);
}
if(zoneType != null) {
SearchBuilder<DataCenterVO> zoneSb = _dcDao.createSearchBuilder();
zoneSb.and("zoneNetworkType", zoneSb.entity().getNetworkType(), SearchCriteria.Op.EQ);
sb.join("zoneSb", zoneSb, sb.entity().getDataCenterId(), zoneSb.entity().getId(), JoinBuilder.JoinType.INNER);
}
SearchCriteria<VMInstanceVO> sc = sb.create();
if (keyword != null) {
@ -3151,10 +3144,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
sc.setJoinParameters("volumeSearch", "poolId", storageId);
}
if(zoneType != null) {
sc.setJoinParameters("zoneSb", "zoneNetworkType", zoneType);
}
Pair<List<VMInstanceVO>, Integer> result = _vmInstanceDao.searchAndCount(sc, searchFilter);
return new Pair<List<? extends VirtualMachine>, Integer>(result.first(), result.second());
}