if(type == SHUTDOWN_HOST || type == CLEANUP_HOST)
return getVMByHost(typeID);
else if(type == SHUTDOWN_ID || type == CLEANUP_ID)
return getVMById(typeID);
else if(type == SHUTDOWN_UNAME || type == CLEANUP_UNAME) {
authz = new AuthzDBAdapter(authzDataSource);
String userId = authz.getCanonicalUserIdFromFriendlyName(typeID);
VM[] vms = getVMsByUserId(userId);
if(vms == null)
errorMsg = "No VMs with user name " + typeID + " found";
return vms;