mirror of
https://github.com/apache/cloudstack
synced 2026-08-09 08:03:16 +00:00
bug 8686: don't allow to create network from the network offering with Availability=Unavailable
status 8686: resolved fixed
This commit is contained in:
parent
fdbdba7a78
commit
9cf48bbfbd
@ -1456,6 +1456,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
if (networkOffering == null || networkOffering.isSystemOnly()) {
|
||||
throw new InvalidParameterValueException("Unable to find network offeirng by id " + networkOfferingId);
|
||||
}
|
||||
|
||||
//Check if network offering is Available
|
||||
if (networkOffering.getAvailability() == Availability.Unavailable) {
|
||||
throw new InvalidParameterValueException("Can't create network; network offering id=" + networkOfferingId + " is " + networkOffering.getAvailability());
|
||||
}
|
||||
|
||||
// allow isDefault to be set only for Direct network
|
||||
if (networkOffering.getGuestType() == GuestIpType.Virtual) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user