CLOUDSTACK-737

Security Group script assume there is only one nic per VM, it is a big task to support multiple NICs, may seperate that as another project
This commit is contained in:
Anthony Xu 2013-02-04 17:09:06 -08:00
parent 65210f4e7e
commit 8a86d08fe3

View File

@ -2058,6 +2058,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
if (networkIdList == null || networkIdList.isEmpty()) {
throw new InvalidParameterValueException("need to specify networkIDs");
}
if (networkIdList.size() > 1 ) {
throw new InvalidParameterValueException("VM can only be on one network in Zone with Security group enabled zone");
}
// Verify that all the networks are Shared/Guest; can't create combination of SG enabled and disabled networks
for (Long networkId : networkIdList) {
NetworkVO network = _networkDao.findById(networkId);