bug 13068: clearing sec grp has a dependency on nic's existing, move the call a bit

This commit is contained in:
Abhinandan Prateek 2012-01-16 13:50:15 +05:30
parent 0b69a252de
commit 0374e42931
1 changed files with 2 additions and 2 deletions

View File

@ -3357,11 +3357,11 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
if (networkIdList != null && !networkIdList.isEmpty()) {
throw new InvalidParameterValueException("Can't move vm with network Ids; this is a basic zone VM");
}
//cleanup the old security groups
_securityGroupMgr.removeInstanceFromGroups(cmd.getVmId());
//cleanup the network for the oldOwner
_networkMgr.cleanupNics(vmOldProfile);
_networkMgr.expungeNics(vmOldProfile);
//cleanup the old security groups
_securityGroupMgr.removeInstanceFromGroups(cmd.getVmId());
//security groups will be recreated for the new account, when the VM is started
List<NetworkVO> networkList = new ArrayList<NetworkVO>();