You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/10/12 04:25:50 UTC
[24/50] 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/fa81f272
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fa81f272
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fa81f272
Branch: refs/heads/javelin
Commit: fa81f272549ce37c1419054ec76c5f70c484f1bc
Parents: be20178
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Fri Oct 5 15:04:01 2012 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Fri Oct 5 15:10:31 2012 -0700
----------------------------------------------------------------------
.../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/fa81f272/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("-");