CLOUDSTACK-2120: mixed zone management - API: change listZones API to to take in zonetype instead of networktype (to be consistent with other listXXXXXXXs API).

This commit is contained in:
Jessica Wang 2013-04-26 11:37:32 -07:00
parent 3e2eb59723
commit a20ed3a43d
2 changed files with 6 additions and 5 deletions

View File

@ -23,6 +23,7 @@ import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.BaseCmd.CommandType;
import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
@ -56,8 +57,8 @@ public class ListZonesByCmd extends BaseListCmd {
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the zone")
private String name;
@Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, description="the network type of the zone")
private String networkType;
@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.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the zones")
private Boolean showCapacities;
@ -82,8 +83,8 @@ public class ListZonesByCmd extends BaseListCmd {
return name;
}
public String getNetworkType(){
return networkType;
public String getZoneType() {
return zoneType;
}
public Boolean getShowCapacities() {

View File

@ -2219,7 +2219,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
Long id = cmd.getId();
String keyword = cmd.getKeyword();
String name = cmd.getName();
String networkType = cmd.getNetworkType();
String networkType = cmd.getZoneType();
Filter searchFilter = new Filter(DataCenterJoinVO.class, null, false, cmd.getStartIndex(), cmd.getPageSizeVal());
SearchCriteria<DataCenterJoinVO> sc = _dcJoinDao.createSearchCriteria();