Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8EF8510D2D for ; Thu, 6 Jun 2013 13:33:06 +0000 (UTC) Received: (qmail 47894 invoked by uid 500); 6 Jun 2013 13:33:06 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 47865 invoked by uid 500); 6 Jun 2013 13:33:06 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 47857 invoked by uid 99); 6 Jun 2013 13:33:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 13:33:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B961E813121; Thu, 6 Jun 2013 13:33:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kishan@apache.org To: commits@cloudstack.apache.org Date: Thu, 06 Jun 2013 13:33:05 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: updated refs/heads/master to 62e125c Updated Branches: refs/heads/master cc7e9eed7 -> 62e125c08 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/master Commit: 62e125c081cd46858fb835290e35e037922a941a Parents: aa2fb31 Author: Kishan Kavala Authored: Thu Jun 6 18:53:19 2013 +0530 Committer: Kishan Kavala Committed: Thu Jun 6 19:02:44 2013 +0530 ---------------------------------------------------------------------- .../VpcVirtualNetworkApplianceManagerImpl.java | 6 +++--- .../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 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 listNetworkACLItems(long guestNtwkId) { Network network = _networkMgr.getNetwork(guestNtwkId); + if(network.getNetworkACLId() == null){ + return null; + } return _networkACLItemDao.listByACL(network.getNetworkACLId()); }