bug 6044: Added functionality to ensure vms belonging to deleted accounts do not show up

status 6044: resolved fixed
This commit is contained in:
abhishek 2010-09-07 10:24:56 -07:00
parent 2098127074
commit 668a831b22
1 changed files with 8 additions and 0 deletions

View File

@ -165,6 +165,14 @@ public class ListVMsCmd extends BaseCmd {
}
for (UserVm vmInstance : virtualMachines) {
//if the account is deleted, do not return the user vm
Account currentVmAccount = getManagementServer().getAccount(vmInstance.getAccountId());
if(currentVmAccount.getRemoved()!=null)
{
continue; //not returning this vm
}
List<Pair<String, Object>> vmData = new ArrayList<Pair<String, Object>>();
AsyncJobVO asyncJob = getManagementServer().findInstancePendingAsyncJob("vm_instance", vmInstance.getId());
if(asyncJob != null) {