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/06/26 11:01:29 UTC
git commit: updated refs/heads/master-6-17-stable to 8eeefad
Updated Branches:
refs/heads/master-6-17-stable 7ba765908 -> 8eeefad97
CLOUDSTACK-3199 apply acl item to private gateway when added to acl list
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8eeefad9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8eeefad9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8eeefad9
Branch: refs/heads/master-6-17-stable
Commit: 8eeefad97f6e7c71eb3f9b70211129c11221364e
Parents: 7ba7659
Author: Jayapal <ja...@apache.org>
Authored: Wed Jun 26 12:49:39 2013 +0530
Committer: Jayapal <ja...@apache.org>
Committed: Wed Jun 26 12:49:54 2013 +0530
----------------------------------------------------------------------
.../cloud/network/vpc/NetworkACLManagerImpl.java | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8eeefad9/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 4881b73..eb18eb7 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
@@ -88,6 +88,8 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
@Override
public boolean applyNetworkACL(long aclId) throws ResourceUnavailableException {
boolean handled = true;
+ boolean aclApplyStatus = true;
+
List<NetworkACLItemVO> rules = _networkACLItemDao.listByACL(aclId);
//Find all networks using this ACL and apply the ACL
List<NetworkVO> networks = _networkDao.listByAclId(aclId);
@@ -97,7 +99,18 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
break;
}
}
- if(handled){
+
+ List<VpcGatewayVO> vpcGateways = _vpcGatewayDao.listByAclIdAndType(aclId, VpcGateway.Type.Private);
+ for (VpcGatewayVO vpcGateway : vpcGateways) {
+ PrivateGateway privateGateway = _vpcMgr.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);
+ break;
+ }
+ }
+
+ if(handled && aclApplyStatus){
for (NetworkACLItem rule : rules) {
if (rule.getState() == NetworkACLItem.State.Revoke) {
removeRule(rule);
@@ -108,7 +121,7 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
}
}
}
- return handled;
+ return handled && aclApplyStatus;
}
@Override