You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2012/10/06 00:32:45 UTC

[5/49] git commit: CLOUDSTACK-271: when check for vnet conflicts against existing physical networks, skip the networks with null vnet ranges

CLOUDSTACK-271: when check for vnet conflicts against existing physical networks, skip the networks with null vnet ranges


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

Branch: refs/heads/maven-to-rpm
Commit: 45fcda6b1c328617e80adaba2a19cd716cfd0857
Parents: 946df19
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Fri Oct 5 15:04:01 2012 -0700
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Sat Oct 6 00:30:34 2012 +0200

----------------------------------------------------------------------
 .../src/com/cloud/network/NetworkManagerImpl.java  |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/45fcda6b/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index a5ee6a3..25c0032 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -5423,8 +5423,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
     protected void checkGuestVnetsConflicts(long zoneId, int newStartVnet, int newEndVnet, Long pNtwkIdToSkip) {
         List<? extends PhysicalNetwork> pNtwks = _physicalNetworkDao.listByZone(zoneId);
         for (PhysicalNetwork pNtwk : pNtwks) {
-            // skip my own network
-            if (pNtwkIdToSkip != null && pNtwkIdToSkip == pNtwk.getId()) {
+            // skip my own network and networks that don't have vnet range set
+            if ((pNtwk.getVnet() == null || pNtwk.getVnet().isEmpty()) || (pNtwkIdToSkip != null && pNtwkIdToSkip == pNtwk.getId())) {
                 continue;
             }
             String[] existingRange = pNtwk.getVnet().split("-");