cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaya...@apache.org
Subject git commit: updated refs/heads/master-6-17-stable to 657978e
Date Thu, 20 Jun 2013 09:11:11 GMT
Updated Branches:
  refs/heads/master-6-17-stable c3d3c62a0 -> 657978ed1


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


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/657978ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/657978ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/657978ed

Branch: refs/heads/master-6-17-stable
Commit: 657978ed174d403d2c9578efa0ab84d73869c721
Parents: c3d3c62
Author: Jayapal <jayapal@apache.org>
Authored: Thu Jun 20 14:38:13 2013 +0530
Committer: Jayapal <jayapal@apache.org>
Committed: Thu Jun 20 14:38:13 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/vpc/VpcManagerImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/657978ed/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index b41003a..fb9e9b7 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -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;
         }
 


Mime
View raw message