This commit reverts 19cdf95e8b29678767e3aa4c87da73fa60dd4a34.

We don't allow domainSuffix and networkOffering upgrade for Shared networks as it requires network restart
This commit is contained in:
Alena Prokharchyk 2011-11-30 11:42:10 -08:00
parent 5e34819be9
commit c4e96d9857
1 changed files with 5 additions and 5 deletions

View File

@ -3335,6 +3335,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
if (displayText != null) {
network.setDisplayText(displayText);
}
//network offering and domain suffix can be updated for Isolated networks only in 3.0
if ((networkOfferingId != null || domainSuffix != null) && network.getGuestType() != GuestType.Isolated) {
throw new InvalidParameterValueException("NetworkOffering and domain suffix upgrade can be perfomed for Isolated networks only");
}
long oldNetworkOfferingId = network.getNetworkOfferingId();
if (networkOfferingId != null) {
@ -3344,11 +3349,6 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
throw new InvalidParameterValueException("Unable to find network offering by id " + networkOfferingId);
}
// Network offering upgrade is allowed for isolated networks only
if (network.getGuestType() != GuestType.Isolated) {
throw new InvalidParameterValueException("Network offering upgrade is allowed only for networks with guest type " + GuestType.Isolated);
}
//network offering should be in Enabled state
if (networkOffering.getState() != NetworkOffering.State.Enabled) {
throw new InvalidParameterValueException("Network offering " + networkOffering + " is not in " + NetworkOffering.State.Enabled + " state, can't upgrade to it");