You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/01/16 12:20:19 UTC

[2/4] git commit: Revert " Summary: check-in for L4-L7 network services in the shared network in"

Revert "  Summary: check-in for L4-L7 network services in the shared network in"

This reverts commit 7fcfcdf91e49d64375171c9ae7fe61067aa59b6e.

Reverting due to IP clearance issued for the commit done as part of CLOUDSTACK-312


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

Branch: refs/heads/master
Commit: 316c5267ccc182e18c4201a72cdf8ccc739e130a
Parents: 156ed7a
Author: Murali Reddy <mu...@citrix.com>
Authored: Wed Jan 16 16:04:14 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Wed Jan 16 16:04:14 2013 +0530

----------------------------------------------------------------------
 .../src/com/cloud/network/NetworkManagerImpl.java  |   17 ++++----------
 1 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/316c5267/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 47db4cb..f378aa4 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2951,11 +2951,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
                 throw new InvalidParameterValueException("Network with vlan " + vlanId + " already exists in zone " + zoneId);
             }
             } else {
-                //don't allow to creating shared network with given Vlan ID, if there already exists a isolated network or
-                //shared network with same Vlan ID in the zone
-                if (_networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Isolated) > 0 ||
-                        _networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Shared) > 0) {
-                    throw new InvalidParameterValueException("There is a isolated/shared network with vlan id: " + vlanId + " already exists " + "in zone " + zoneId);
+                //don't allow to create Shared network with Vlan that already exists in the zone for Isolated networks
+                if (_networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Isolated) > 0) {
+                    throw new InvalidParameterValueException("Isolated network with vlan " + vlanId + " already exists " +
+                            "in zone " + zoneId);
                 }
         }
         }
@@ -3543,13 +3542,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
 
             applyProfileToNetwork(network, profile);
 
-            DataCenterVO zone = _dcDao.findById(network.getDataCenterId());
-            if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId()) && (zone.getNetworkType() == NetworkType.Advanced)) {
-                network.setState(Network.State.Setup);
-            } else {
-                network.setState(Network.State.Allocated);
-            }
-
+            network.setState(Network.State.Allocated);
             network.setRestartRequired(false);
             _networksDao.update(network.getId(), network);
             _networksDao.clearCheckForGc(networkId);