bug 8473: fixed NPE in listUserVms - do "includingRemoved" when search for vm's host.

status 9473: resolved fixed
This commit is contained in:
alena 2011-02-08 09:42:13 -08:00
parent 75e596bb80
commit 44607a8960
2 changed files with 5 additions and 5 deletions

View File

@ -71,7 +71,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
@Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor on which to deploy the virtual machine")
private String hypervisor;
@Parameter(name=ApiConstants.SECURITY_GROUP_ID_LIST, type=CommandType.LIST, collectionType=CommandType.STRING, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is created from service offering with Direct Attach Network support")
@Parameter(name=ApiConstants.SECURITY_GROUP_ID_LIST, type=CommandType.LIST, collectionType=CommandType.LONG, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is created from service offering with Direct Attach Network support")
private List<Long> securityGroupIdList;
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, description="the ID of the service offering for the virtual machine")

View File

@ -326,7 +326,7 @@ public class ApiDBUtils {
}
public static DomainVO findDomainById(Long domainId) {
return _domainDao.findById(domainId);
return _domainDao.findByIdIncludingRemoved(domainId);
}
public static DomainVO findDomainByIdIncludingRemoved(Long domainId) {
@ -334,15 +334,15 @@ public class ApiDBUtils {
}
public static DomainRouterVO findDomainRouterById(Long routerId) {
return _domainRouterDao.findById(routerId);
return _domainRouterDao.findByIdIncludingRemoved(routerId);
}
public static GuestOS findGuestOSById(Long id) {
return _guestOSDao.findById(id);
return _guestOSDao.findByIdIncludingRemoved(id);
}
public static HostVO findHostById(Long hostId) {
return _hostDao.findById(hostId);
return _hostDao.findByIdIncludingRemoved(hostId);
}
public static IPAddressVO findIpAddressById(long addressId) {