CLOUDSTACK-2952 Fixed configuring private gateway with another vpc acl id

This commit is contained in:
Jayapal 2013-06-20 14:38:13 +05:30
parent c3d3c62a01
commit 657978ed17
1 changed files with 6 additions and 1 deletions

View File

@ -1385,9 +1385,14 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
long networkAclId = NetworkACL.DEFAULT_DENY;
if (aclId != null) {
if ( _networkAclDao.findById(aclId) == null) {
NetworkACLVO aclVO = _networkAclDao.findById(aclId);
if ( aclVO == null) {
throw new InvalidParameterValueException("Invalid network acl id passed ");
}
if (aclVO.getVpcId() != vpcId ) {
throw new InvalidParameterValueException("Private gateway and network acl are not in the same vpc");
}
networkAclId = aclId;
}