mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2952 Fixed configuring private gateway with another vpc acl id
This commit is contained in:
parent
c3d3c62a01
commit
657978ed17
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue