creating zone wide vlan is disabled if zone is security group enabled

This commit is contained in:
Edison Su 2011-02-25 15:30:02 -05:00
parent 5f3415d377
commit 3a1d005400
1 changed files with 4 additions and 0 deletions

View File

@ -1486,6 +1486,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
throw new InvalidParameterValueException("Virtual Network creation is not allowd if zone is security group enabled");
}
if (zone.isSecurityGroupEnabled() && cmd.getAccountName() == null) {
throw new InvalidParameterValueException("Can't create a zone wide network if zone is security group enabled");
}
String cidr = null;
if (gateway != null && netmask != null) {
cidr = NetUtils.ipAndNetMaskToCidr(gateway, netmask);