mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
Allow creation of Shared Networks without IP range if network offering has no services - specifyvlan = true (#10168)
This commit is contained in:
parent
fbb1ff78d6
commit
5447950f09
@ -34,6 +34,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@ -1634,6 +1635,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
||||
throwInvalidIdException("Network offering with specified id doesn't support adding multiple ip ranges", ntwkOff.getUuid(), NETWORK_OFFERING_ID);
|
||||
}
|
||||
|
||||
if (GuestType.Shared == ntwkOff.getGuestType() && !ntwkOff.isSpecifyVlan() && Objects.isNull(associatedNetworkId)) {
|
||||
throw new CloudRuntimeException("Associated network must be provided when creating Shared networks when specifyVlan is false");
|
||||
}
|
||||
|
||||
Pair<Integer, Integer> interfaceMTUs = validateMtuConfig(publicMtu, privateMtu, zone.getId());
|
||||
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu, privateMtu);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user