mirror of https://github.com/apache/cloudstack.git
VPC: CS-15774 - VPC and guest networks of VPC should belong to the same zone
This commit is contained in:
parent
9be0a5525d
commit
70713043cf
|
|
@ -2866,6 +2866,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
if (networkDomain == null) {
|
||||
networkDomain = vpc.getNetworkDomain();
|
||||
}
|
||||
|
||||
if (vpc.getZoneId() != zoneId) {
|
||||
throw new InvalidParameterValueException("New network doesn't belong to vpc zone", null);
|
||||
}
|
||||
|
||||
//1) Validate if network can be created for VPC
|
||||
_vpcMgr.validateGuestNtkwForVpc(_configMgr.getNetworkOffering(ntwkOffId), cidr, networkDomain, owner, vpc, null, gateway);
|
||||
//2) Create network
|
||||
|
|
|
|||
Loading…
Reference in New Issue