bug 8843: add vm into security group when vm is created

status 8843: resolved fixed
This commit is contained in:
Edison Su 2011-03-04 13:02:44 -05:00
parent 263244c938
commit bec3f3c8a2
1 changed files with 2 additions and 3 deletions

View File

@ -2183,6 +2183,8 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
throw new CloudRuntimeException("Unable to assign Vm to the group " + group);
}
_networkGroupMgr.addInstanceToGroups(vm.getId(), cmd.getSecurityGroupIdList());
return vm;
}
@ -2230,9 +2232,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
updateVmStateForFailedVmCreation(vm.getId());
}
_networkGroupMgr.addInstanceToGroups(vm.getId(), cmd.getSecurityGroupIdList());
if (template.getEnablePassword()) {
//this value is not being sent to the backend; need only for api dispaly purposes
vm.setPassword(password);