You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ja...@apache.org on 2013/12/11 06:33:08 UTC

git commit: updated refs/heads/master to 27ee78f

Updated Branches:
  refs/heads/master e02682327 -> 27ee78fe0


CLOUDSTACK-5244 Fixed issue with applying acl items of acl to private gateway


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

Branch: refs/heads/master
Commit: 27ee78fe0a2dd9097060cdac7f6eb63b6f5e8ce8
Parents: e026823
Author: Jayapal <ja...@apache.org>
Authored: Wed Dec 11 11:02:06 2013 +0530
Committer: Jayapal <ja...@apache.org>
Committed: Wed Dec 11 11:02:15 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java | 5 ++++-
 server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/27ee78fe/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
index c67bc5f..a0decf3 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
@@ -81,6 +81,8 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
     ConfigurationManager _configMgr;
     @Inject
     EntityManager _entityMgr;
+    @Inject
+    VpcService _vpcSvc;
 
     @Override
     public NetworkACL createNetworkACL(String name, String description, long vpcId) {
@@ -105,7 +107,8 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
 
         List<VpcGatewayVO> vpcGateways = _vpcGatewayDao.listByAclIdAndType(aclId, VpcGateway.Type.Private);
         for (VpcGatewayVO vpcGateway : vpcGateways) {
-            PrivateGateway privateGateway = _entityMgr.findById(PrivateGateway.class, vpcGateway.getId());
+            PrivateGateway privateGateway = _vpcSvc.getVpcPrivateGateway(vpcGateway.getId());
+
             if (!applyACLToPrivateGw(privateGateway)) {
                 aclApplyStatus = false;
                 s_logger.debug("failed to apply network acl item on private gateway " + privateGateway.getId() + "acl id " + aclId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/27ee78fe/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
index 90a6394..1c560c4 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
@@ -91,6 +91,8 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
     EntityManager _entityMgr;
     @Inject
     VpcDao _vpcDao;
+    @Inject
+    VpcService _vpcSvc;
 
     @Override
     public NetworkACL createNetworkACL(String name, String description, long vpcId) {
@@ -239,7 +241,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
             }
         }
 
-        PrivateGateway privateGateway = _entityMgr.findById(PrivateGateway.class, privateGatewayId);
+        PrivateGateway privateGateway = _vpcSvc.getVpcPrivateGateway(gateway.getId());
         _accountMgr.checkAccess(caller, null, true, privateGateway);
 
         return _networkAclMgr.replaceNetworkACLForPrivateGw(acl, privateGateway);