cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [18/50] [abbrv] git commit: updated refs/heads/object_store to 18aeef3
Date Wed, 12 Jun 2013 18:22:27 GMT
check for null ACL before creating ACL commands


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

Branch: refs/heads/object_store
Commit: 62e125c081cd46858fb835290e35e037922a941a
Parents: aa2fb31
Author: Kishan Kavala <kishan@cloud.com>
Authored: Thu Jun 6 18:53:19 2013 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Thu Jun 6 19:02:44 2013 +0530

----------------------------------------------------------------------
 .../network/router/VpcVirtualNetworkApplianceManagerImpl.java  | 6 +++---
 server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java    | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62e125c0/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
index 9992b7c..7115499 100644
--- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
@@ -949,9 +949,9 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getVpcId() != null) {
             if (_networkModel.isProviderSupportServiceInNetwork(guestNetworkId, Service.NetworkACL,
Provider.VPCVirtualRouter)) {
                 List<NetworkACLItemVO> networkACLs = _networkACLMgr.listNetworkACLItems(guestNetworkId);
-                s_logger.debug("Found " + networkACLs.size() + " network ACLs to apply as
a part of VPC VR " + router 
-                        + " start for guest network id=" + guestNetworkId);
-                if (!networkACLs.isEmpty()) {
+                if ((networkACLs != null) && !networkACLs.isEmpty()) {
+                    s_logger.debug("Found " + networkACLs.size() + " network ACLs to apply
as a part of VPC VR " + router
+                            + " start for guest network id=" + guestNetworkId);
                     createNetworkACLsCommands(networkACLs, router, cmds, guestNetworkId,
false);
                 }
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62e125c0/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 171b8b9..bf6b859 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
@@ -294,6 +294,9 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
     @Override
     public List<NetworkACLItemVO> listNetworkACLItems(long guestNtwkId) {
         Network network = _networkMgr.getNetwork(guestNtwkId);
+        if(network.getNetworkACLId() == null){
+            return null;
+        }
         return _networkACLItemDao.listByACL(network.getNetworkACLId());
     }
 


Mime
View raw message