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 8B31210B48 for ; Mon, 24 Jun 2013 10:51:32 +0000 (UTC) Received: (qmail 2484 invoked by uid 500); 24 Jun 2013 10:51:32 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 2465 invoked by uid 500); 24 Jun 2013 10:51:32 -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 2458 invoked by uid 99); 24 Jun 2013 10:51:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jun 2013 10:51:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DACD23148F3; Mon, 24 Jun 2013 10:51:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kishan@apache.org To: commits@cloudstack.apache.org Message-Id: <34795a4d4b2d42fbbc807c4a1473c250@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master-6-17-stable to 1aed960 Date: Mon, 24 Jun 2013 10:51:31 +0000 (UTC) Updated Branches: refs/heads/master-6-17-stable 4f7506264 -> 1aed9602c CLOUDSTACK-3149: Allow default ACLs when creating tier with ACL Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1aed9602 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1aed9602 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1aed9602 Branch: refs/heads/master-6-17-stable Commit: 1aed9602c380a46592a44047299ca7b496b590a6 Parents: 4f75062 Author: Kishan Kavala Authored: Mon Jun 24 16:16:14 2013 +0530 Committer: Kishan Kavala Committed: Mon Jun 24 16:16:14 2013 +0530 ---------------------------------------------------------------------- server/src/com/cloud/network/NetworkServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1aed9602/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 25cd887..f88f600 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -1298,8 +1298,12 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { throw new InvalidParameterValueException("Unable to find specified NetworkACL"); } - if(!vpcId.equals(acl.getVpcId())){ - throw new InvalidParameterValueException("ACL: "+aclId+" do not belong to the VPC"); + if(aclId != NetworkACL.DEFAULT_DENY && aclId != NetworkACL.DEFAULT_ALLOW) { + //ACL is not default DENY/ALLOW + // ACL should be associated with a VPC + if(!vpcId.equals(acl.getVpcId())){ + throw new InvalidParameterValueException("ACL: "+aclId+" do not belong to the VPC"); + } } } network = _vpcMgr.createVpcGuestNetwork(networkOfferingId, name, displayText, gateway, cidr, vlanId,