Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFA7110B4A for ; Tue, 18 Jun 2013 07:58:22 +0000 (UTC) Received: (qmail 32333 invoked by uid 500); 18 Jun 2013 07:58:08 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 32287 invoked by uid 500); 18 Jun 2013 07:58:08 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 29269 invoked by uid 99); 18 Jun 2013 07:58:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jun 2013 07:58:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4D3618A6C7C; Tue, 18 Jun 2013 07:58:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: weizhou@apache.org To: commits@cloudstack.apache.org Date: Tue, 18 Jun 2013 07:58:42 -0000 Message-Id: <0ca6d4291b964ced87226426acee82e3@git.apache.org> In-Reply-To: <794bf5ee734945ac90230397b26673f4@git.apache.org> References: <794bf5ee734945ac90230397b26673f4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [42/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d CLOUDSTACK-3016: remove zonetype parameter from listNetworks API. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3e852cc2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3e852cc2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3e852cc2 Branch: refs/heads/disk_io_throttling Commit: 3e852cc29b428f3e5454d7d415174758f9da0602 Parents: 5d0a1ce Author: Jessica Wang Authored: Mon Jun 17 16:25:25 2013 -0700 Committer: Jessica Wang Committed: Mon Jun 17 16:26:09 2013 -0700 ---------------------------------------------------------------------- .../command/user/network/ListNetworksCmd.java | 7 ------ .../com/cloud/network/NetworkServiceImpl.java | 25 ++++++++------------ 2 files changed, 10 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e852cc2/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java index d25e2c0..afce092 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java @@ -48,9 +48,6 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd { description="the Zone ID of the network") 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.TYPE, type=CommandType.STRING, description="the type of the network. Supported values are: Isolated and Shared") private String guestIpType; @@ -99,10 +96,6 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd { return zoneId; } - public String getZoneType() { - return zoneType; - } - public String getGuestIpType() { return guestIpType; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e852cc2/server/src/com/cloud/network/NetworkServiceImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index f026dbc..aace68d 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -1355,7 +1355,6 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { Long id = cmd.getId(); String keyword = cmd.getKeyword(); Long zoneId = cmd.getZoneId(); - String zoneType = cmd.getZoneType(); Account caller = UserContext.current().getCaller(); Long domainId = cmd.getDomainId(); String accountName = cmd.getAccountName(); @@ -1503,40 +1502,40 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { if (!permittedAccounts.isEmpty()) { //get account level networks networksToReturn.addAll(listAccountSpecificNetworks( - buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, - physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags, zoneType), searchFilter, + buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, + physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, permittedAccounts)); //get domain level networks if (domainId != null) { networksToReturn .addAll(listDomainLevelNetworks( buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, - physicalNetworkId, aclType, true, restartRequired, specifyIpRanges, vpcId, tags, zoneType), searchFilter, + physicalNetworkId, aclType, true, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, domainId, false)); } } else { //add account specific networks networksToReturn.addAll(listAccountSpecificNetworksByDomainPath( - buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, - physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags, zoneType), searchFilter, path, + buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, + physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, path, isRecursive)); //add domain specific networks of domain + parent domains networksToReturn.addAll(listDomainSpecificNetworksByDomainPath( - buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, - physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags, zoneType), searchFilter, path, + buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, + physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, path, isRecursive)); //add networks of subdomains if (domainId == null) { networksToReturn .addAll(listDomainLevelNetworks( buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, - physicalNetworkId, aclType, true, restartRequired, specifyIpRanges, vpcId, tags, zoneType), searchFilter, + physicalNetworkId, aclType, true, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, caller.getDomainId(), true)); } } } else { networksToReturn = _networksDao.search(buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, - guestIpType, trafficType, physicalNetworkId, null, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags, zoneType), + guestIpType, trafficType, physicalNetworkId, null, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter); } @@ -1581,7 +1580,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { private SearchCriteria buildNetworkSearchCriteria(SearchBuilder sb, String keyword, Long id, Boolean isSystem, Long zoneId, String guestIpType, String trafficType, Long physicalNetworkId, - String aclType, boolean skipProjectNetworks, Boolean restartRequired, Boolean specifyIpRanges, Long vpcId, Map tags, String zoneType) { + String aclType, boolean skipProjectNetworks, Boolean restartRequired, Boolean specifyIpRanges, Long vpcId, Map tags) { SearchCriteria sc = sb.create(); @@ -1603,10 +1602,6 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId); } - if(zoneType != null) { - sc.setJoinParameters("zoneSearch", "networkType", zoneType); - } - if (guestIpType != null) { sc.addAnd("guestType", SearchCriteria.Op.EQ, guestIpType); }