mirror of https://github.com/apache/cloudstack.git
api: Remove psudo jobs from listAsyncJobs API (#6564)
Removes psudo job results from the response of the listAsyncJobs API
This commit is contained in:
parent
441edf3ca7
commit
5aec43949e
|
|
@ -123,6 +123,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
|
|||
import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.framework.config.Configurable;
|
||||
import org.apache.cloudstack.framework.jobs.impl.AsyncJobVO;
|
||||
import org.apache.cloudstack.query.QueryService;
|
||||
import org.apache.cloudstack.resourcedetail.dao.DiskOfferingDetailsDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
||||
|
|
@ -2483,6 +2484,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
|
|||
|
||||
Filter searchFilter = new Filter(AsyncJobJoinVO.class, "id", true, cmd.getStartIndex(), cmd.getPageSizeVal());
|
||||
SearchBuilder<AsyncJobJoinVO> sb = _jobJoinDao.createSearchBuilder();
|
||||
sb.and("instanceTypeNEQ", sb.entity().getInstanceType(), SearchCriteria.Op.NEQ);
|
||||
sb.and("accountIdIN", sb.entity().getAccountId(), SearchCriteria.Op.IN);
|
||||
boolean accountJoinIsDone = false;
|
||||
if (permittedAccounts.isEmpty() && domainId != null) {
|
||||
|
|
@ -2509,6 +2511,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
|
|||
Object startDate = cmd.getStartDate();
|
||||
|
||||
SearchCriteria<AsyncJobJoinVO> sc = sb.create();
|
||||
sc.setParameters("instanceTypeNEQ", AsyncJobVO.PSEUDO_JOB_INSTANCE_TYPE);
|
||||
if (listProjectResourcesCriteria != null) {
|
||||
sc.setParameters("type", Account.Type.PROJECT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue