cloudstack: don't set networkId to default when iptonetworklist is populated

This commit is contained in:
Adam Lowe 2012-06-20 19:24:32 +03:00
parent 0cf4d2b35b
commit 2526e7adeb
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public class AdvancedNetworkOptionsConverter implements OptionsConverter {
checkArgument(templateOptions.getSecurityGroupIds().isEmpty(), "security groups cannot be specified for locations (zones) that use advanced networking");
if (templateOptions.getNetworkIds().size() > 0) {
options.networkIds(templateOptions.getNetworkIds());
} else {
} else if (templateOptions.getIpsToNetworks().isEmpty()) {
checkArgument(!networks.isEmpty(), "please setup a network for zone: " + zoneId);
Network defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), and(defaultNetworkInZone(zoneId), supportsStaticNAT())), null);
if(defaultNetworkInZone == null) {