bug 12916: warning user if he tried to move the VM across zones

This commit is contained in:
Abhinandan Prateek 2012-01-10 10:49:18 +05:30
parent 3a2d0b1ec6
commit eb4cfe063a

View File

@ -3354,6 +3354,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
List<Long> securityGroupIdList = cmd.getSecurityGroupIdList();
if (zone.getNetworkType() == NetworkType.Basic) {
if (networkIdList != null && !networkIdList.isEmpty()) {
throw new InvalidParameterValueException("Can't move vm with network Ids; this is a basic zone VM");
}
//cleanup the network for the oldOwner
_networkMgr.cleanupNics(vmOldProfile);
_networkMgr.expungeNics(vmOldProfile);