Updated Branches: refs/heads/master d66e9c7b5 -> d5d0142ed
CLOUDSTACK-3016: listZones API - take in networktype instead of zonetype parameter to be consistent with networktype property in ZoneResponse. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d5d0142e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d5d0142e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d5d0142e Branch: refs/heads/master Commit: d5d0142ed4c14e5d4d8fe255486c1437730425a5 Parents: d66e9c7 Author: Jessica Wang <jessicaw...@apache.org> Authored: Wed Jun 19 10:18:52 2013 -0700 Committer: Jessica Wang <jessicaw...@apache.org> Committed: Wed Jun 19 10:22:14 2013 -0700 ---------------------------------------------------------------------- api/src/org/apache/cloudstack/api/ApiConstants.java | 3 +-- .../cloudstack/api/command/user/zone/ListZonesByCmd.java | 8 ++++---- server/src/com/cloud/api/query/QueryManagerImpl.java | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5d0142e/api/src/org/apache/cloudstack/api/ApiConstants.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index 1704ca3..12e5097 100755 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -245,8 +245,7 @@ public class ApiConstants { public static final String IS_VOLATILE = "isvolatile"; public static final String VOLUME_ID = "volumeid"; public static final String ZONE_ID = "zoneid"; - public static final String ZONE_NAME = "zonename"; - public static final String ZONE_TYPE = "zonetype"; + public static final String ZONE_NAME = "zonename"; public static final String NETWORK_TYPE = "networktype"; public static final String PAGE = "page"; public static final String PAGE_SIZE = "pagesize"; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5d0142e/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java b/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java index ed31037..4cf3b58 100644 --- a/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java @@ -57,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.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to") - private String zoneType; + @Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to") + private String networkType; @Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the zones") private Boolean showCapacities; @@ -83,8 +83,8 @@ public class ListZonesByCmd extends BaseListCmd { return name; } - public String getZoneType() { - return zoneType; + public String getNetworkType() { + return networkType; } public Boolean getShowCapacities() { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5d0142e/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 10ab8f1..ad29cda 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -2208,7 +2208,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { Long id = cmd.getId(); String keyword = cmd.getKeyword(); String name = cmd.getName(); - String networkType = cmd.getZoneType(); + String networkType = cmd.getNetworkType(); Filter searchFilter = new Filter(DataCenterJoinVO.class, null, false, cmd.getStartIndex(), cmd.getPageSizeVal()); SearchCriteria<DataCenterJoinVO> sc = _dcJoinDao.createSearchCriteria();