mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4833:[Automation][BVT] Template and ISO test cases failing
from BVT suite, during LIST api call.
This commit is contained in:
parent
c233492bfc
commit
dc3d279272
|
|
@ -57,6 +57,7 @@ public class EntityManagerImpl extends ManagerBase implements EntityManager {
|
|||
return dao.findByUuid(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T findByUuidIncludingRemoved(Class<T> entityType, String uuid) {
|
||||
// Finds and returns a unique VO using uuid, null if entity not found in db
|
||||
GenericDao<? extends T, String> dao = (GenericDao<? extends T, String>)GenericDaoBase.getDao(entityType);
|
||||
|
|
@ -94,7 +95,7 @@ public class EntityManagerImpl extends ManagerBase implements EntityManager {
|
|||
_name = name;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean start() {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ import java.util.regex.Matcher;
|
|||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.ControlledEntity;
|
||||
import org.apache.cloudstack.acl.InfrastructureEntity;
|
||||
import org.apache.cloudstack.acl.RoleType;
|
||||
|
|
@ -49,7 +51,6 @@ import org.apache.cloudstack.api.EntityReference;
|
|||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.Validate;
|
||||
import org.apache.cloudstack.api.command.admin.resource.ArchiveAlertsCmd;
|
||||
import org.apache.cloudstack.api.command.admin.resource.DeleteAlertsCmd;
|
||||
import org.apache.cloudstack.api.command.user.event.ArchiveEventsCmd;
|
||||
|
|
@ -58,7 +59,6 @@ import org.apache.cloudstack.api.command.user.event.ListEventsCmd;
|
|||
import org.apache.cloudstack.context.CallContext;
|
||||
import org.apache.cloudstack.framework.jobs.AsyncJob;
|
||||
import org.apache.cloudstack.framework.jobs.AsyncJobManager;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -369,7 +369,7 @@ public class ApiDispatcher {
|
|||
for (Class<?> entity : entities) {
|
||||
// For backward compatibility, we search within removed entities and let service layer deal
|
||||
// with removed ones, return empty response or error
|
||||
Object objVO = s_instance._entityMgr.findByUuid(entity, uuid);
|
||||
Object objVO = s_instance._entityMgr.findByUuidIncludingRemoved(entity, uuid);
|
||||
if (objVO == null) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,15 @@ public interface EntityManager {
|
|||
*/
|
||||
public <T> T findByUuid(Class<T> entityType, String uuid);
|
||||
|
||||
/**
|
||||
* Finds a unique entity by uuid string, including those removed entries
|
||||
* @param <T> entity class
|
||||
* @param entityType type of entity you're looking for.
|
||||
* @param uuid the unique id
|
||||
* @return T if found, null if not.
|
||||
*/
|
||||
public <T> T findByUuidIncludingRemoved(Class<T> entityType, String uuid);
|
||||
|
||||
/**
|
||||
* Finds an entity by external id which is always String
|
||||
* @param <T> entity class
|
||||
|
|
|
|||
Loading…
Reference in New Issue