mirror of https://github.com/apache/cloudstack.git
Bug 12822 - CreatePhysicalNetwork API shouldn't return success when zone is Enabled
Changes: - Physical Network can be created pnly when the Zone is in disabled state
This commit is contained in:
parent
189822da50
commit
cf7469241f
|
|
@ -4233,6 +4233,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
throw new InvalidParameterValueException("Please specify a valid zone.");
|
||||
}
|
||||
|
||||
if (Grouping.AllocationState.Enabled == zone.getAllocationState()) {
|
||||
throw new PermissionDeniedException("Cannot create PhysicalNetwork since the Zone is currently enabled, zone Id: " + zoneId);
|
||||
}
|
||||
|
||||
NetworkType zoneType = zone.getNetworkType();
|
||||
|
||||
if(zoneType == NetworkType.Basic){
|
||||
|
|
|
|||
Loading…
Reference in New Issue