CLOUDSTACK-3016: remove zonetype parameter from listVolumes API.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b4a692d8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b4a692d8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b4a692d8 Branch: refs/heads/object_store Commit: b4a692d80f54c0b5a156aa3b682c76aa0cf10ade Parents: ea0de9e Author: Jessica Wang <[email protected]> Authored: Fri Jun 14 16:39:04 2013 -0700 Committer: Jessica Wang <[email protected]> Committed: Fri Jun 14 16:39:04 2013 -0700 ---------------------------------------------------------------------- .../api/command/user/volume/ListVolumesCmd.java | 5 ----- server/src/com/cloud/api/query/QueryManagerImpl.java | 11 +++-------- 2 files changed, 3 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4a692d8/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java index 91316b0..0bced56 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java @@ -67,8 +67,6 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd { description="the ID of the availability zone") 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; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -103,9 +101,6 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd { return zoneId; } - public String getZoneType() { - return zoneType; - } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4a692d8/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 fc2948d..4e0794c 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -1544,8 +1544,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { String type = cmd.getType(); Map<String, String> tags = cmd.getTags(); - Long zoneId = cmd.getZoneId(); - String zoneType = cmd.getZoneType(); + Long zoneId = cmd.getZoneId(); Long podId = null; if (_accountMgr.isAdmin(caller.getType())) { podId = cmd.getPodId(); @@ -1572,8 +1571,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ); sb.and("volumeType", sb.entity().getVolumeType(), SearchCriteria.Op.LIKE); sb.and("instanceId", sb.entity().getVmId(), SearchCriteria.Op.EQ); - sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ); - sb.and("dataCenterType", sb.entity().getDataCenterType(), SearchCriteria.Op.EQ); + sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ); sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ); // Only return volumes that are not destroyed sb.and("state", sb.entity().getState(), SearchCriteria.Op.NEQ); @@ -1632,10 +1630,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { } if (zoneId != null) { sc.setParameters("dataCenterId", zoneId); - } - if (zoneType != null) { - sc.setParameters("dataCenterType", zoneType); - } + } if (podId != null) { sc.setParameters("podId", podId); }
