mirror of https://github.com/apache/cloudstack.git
Bug 11808 - Allow additional non-default virtual networks
when isDefault is null, for virtual network set defaut to true, false for direct network
This commit is contained in:
parent
a7cf2f412c
commit
0ad145cc94
|
|
@ -1687,10 +1687,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
throw new InvalidParameterValueException("Network creation is not allowed in zone with network type " + NetworkType.Basic);
|
||||
}
|
||||
|
||||
if (isDefault == null) {
|
||||
isDefault = false;
|
||||
}
|
||||
|
||||
if (isDefault == null) {
|
||||
if (networkOffering.getGuestType() == GuestIpType.Virtual) {
|
||||
isDefault = true;
|
||||
} else {
|
||||
isDefault = false;
|
||||
}
|
||||
}
|
||||
|
||||
// allow isDefault/isShared to be set only for Direct network
|
||||
if (networkOffering.getGuestType() == GuestIpType.Virtual && isShared != null && isShared) {
|
||||
throw new InvalidParameterValueException("Can specify isShared parameter for Direct networks only");
|
||||
|
|
|
|||
Loading…
Reference in New Issue