VPC: CS-15774 - VPC and guest networks of VPC should belong to the same zone

This commit is contained in:
Alena Prokharchyk 2012-07-31 10:37:47 -07:00
parent e4eb0c3a1b
commit da8c8e9922
1 changed files with 5 additions and 0 deletions

View File

@ -2834,6 +2834,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);