Search in sources :

Example 1 with GetTasksStatusesByTasksIDsParameters

use of org.ovirt.engine.core.common.queries.GetTasksStatusesByTasksIDsParameters in project ovirt-engine by oVirt.

the class AbstractBackendResource method getVdsmTasksStatus.

private CreationStatus getVdsmTasksStatus(ActionReturnValue result) {
    CreationStatus asyncStatus = null;
    QueryReturnValue monitorResult = runQuery(QueryType.GetTasksStatusesByTasksIDs, new GetTasksStatusesByTasksIDsParameters(result.getVdsmTaskIdList()));
    if (monitorResult != null && monitorResult.getSucceeded() && monitorResult.getReturnValue() != null) {
        Mapper<AsyncTaskStatus, CreationStatus> mapper = getMapper(AsyncTaskStatus.class, CreationStatus.class);
        for (AsyncTaskStatus task : asCollection(AsyncTaskStatus.class, monitorResult.getReturnValue())) {
            asyncStatus = mapper.map(task, asyncStatus);
        }
    }
    return asyncStatus;
}
Also used : QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) AsyncTaskStatus(org.ovirt.engine.core.common.businessentities.AsyncTaskStatus) GetTasksStatusesByTasksIDsParameters(org.ovirt.engine.core.common.queries.GetTasksStatusesByTasksIDsParameters) CreationStatus(org.ovirt.engine.api.model.CreationStatus)

Aggregations

CreationStatus (org.ovirt.engine.api.model.CreationStatus)1 AsyncTaskStatus (org.ovirt.engine.core.common.businessentities.AsyncTaskStatus)1 GetTasksStatusesByTasksIDsParameters (org.ovirt.engine.core.common.queries.GetTasksStatusesByTasksIDsParameters)1 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)1