CLOUDSTACK-3149: Allow default ACLs when creating tier with ACL

This commit is contained in:
Kishan Kavala 2013-06-24 16:16:14 +05:30
parent 90838d7292
commit 7c46cc9580

View File

@ -1298,10 +1298,14 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
throw new InvalidParameterValueException("Unable to find specified NetworkACL"); throw new InvalidParameterValueException("Unable to find specified NetworkACL");
} }
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())){ if(!vpcId.equals(acl.getVpcId())){
throw new InvalidParameterValueException("ACL: "+aclId+" do not belong to the VPC"); throw new InvalidParameterValueException("ACL: "+aclId+" do not belong to the VPC");
} }
} }
}
network = _vpcMgr.createVpcGuestNetwork(networkOfferingId, name, displayText, gateway, cidr, vlanId, network = _vpcMgr.createVpcGuestNetwork(networkOfferingId, name, displayText, gateway, cidr, vlanId,
networkDomain, owner, sharedDomainId, pNtwk, zoneId, aclType, subdomainAccess, vpcId, aclId, caller, displayNetwork); networkDomain, owner, sharedDomainId, pNtwk, zoneId, aclType, subdomainAccess, vpcId, aclId, caller, displayNetwork);
} else { } else {