mirror of https://github.com/apache/cloudstack.git
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:
parent
5e34819be9
commit
c4e96d9857
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue