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

This commit is contained in:
Jayapal 2013-06-20 16:11:20 +05:30
parent 03d1346dc3
commit 2e0abccd3b
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;
}