Allow EIP/ELB network creation only in Basic zone

This commit is contained in:
Alena Prokharchyk 2012-07-30 13:33:17 -07:00
parent 07344c7643
commit ba2c05cc55
1 changed files with 5 additions and 0 deletions

View File

@ -2935,6 +2935,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
"service disabled are allowed in security group enabled zone", null);
}
}
//don't allow eip/elb networks in Advance zone
if (ntwkOff.getElasticIp() || ntwkOff.getElasticLb()) {
throw new InvalidParameterValueException("Elastic IP and Elastic LB services are supported in zone of type " + NetworkType.Basic, null);
}
}
// VlanId can be specified only when network offering supports it