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 2012/12/06 09:09:06 UTC
[1/100] [abbrv] git commit: Summary: check-in for L4-L7 network
services in the shared network in the advanced zone
Updated Branches:
refs/heads/events-framework 600a166d4 -> 900c8b249
refs/heads/master 21819dafb -> 7fcfcdf91
Summary: check-in for L4-L7 network services in the shared network in
the advanced zone
Details:
1). Added validation to check the Vlan Id specified in the createNetwork()
does not overlap with any of the vlan's used by isolated networks or
shared networks in the zone.
2). state change for shared network with services to go to 'Setup' state
on network shutdown instead of 'Allocated'
Bug ID:CLOUDSTACK-312 enable L4-L7 network services in the shared network in the advanced zone
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/7fcfcdf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7fcfcdf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7fcfcdf9
Branch: refs/heads/master
Commit: 7fcfcdf91e49d64375171c9ae7fe61067aa59b6e
Parents: d4c604c
Author: Murali Reddy <mu...@citrix.com>
Authored: Thu Dec 6 13:06:18 2012 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Thu Dec 6 13:06:18 2012 +0530
----------------------------------------------------------------------
.../src/com/cloud/network/NetworkManagerImpl.java | 17 ++++++++++----
1 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7fcfcdf9/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 39d7f54..b3fdf32 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2911,10 +2911,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
throw new InvalidParameterValueException("Network with vlan " + vlanId + " already exists in zone " + zoneId);
}
} else {
- //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);
+ //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);
}
}
}
@@ -3502,7 +3503,13 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
applyProfileToNetwork(network, profile);
- network.setState(Network.State.Allocated);
+ 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.setRestartRequired(false);
_networksDao.update(network.getId(), network);
_networksDao.clearCheckForGc(networkId);