use of org.ovirt.engine.core.common.job.Job in project ovirt-engine by oVirt.
the class EndExternalJobCommandTest method makeJob.
private Job makeJob() {
Job job = new Job();
job.setId(jobId);
job.setDescription("Sample Job");
return job;
}
use of org.ovirt.engine.core.common.job.Job in project ovirt-engine by oVirt.
the class EndExternalStepCommandTest method makeExternalTestJob.
private Job makeExternalTestJob(Guid jobId) {
Job job = new Job();
job.setId(jobId);
job.setDescription("Sample Job");
job.setExternal(true);
return job;
}
use of org.ovirt.engine.core.common.job.Job in project ovirt-engine by oVirt.
the class AddExternalStepCommandTest method makeNonExternalTestJob.
private Job makeNonExternalTestJob(Guid jobId) {
Job job = new Job();
job.setId(jobId);
job.setDescription("Sample Job");
job.setExternal(false);
return job;
}
use of org.ovirt.engine.core.common.job.Job in project ovirt-engine by oVirt.
the class ClearExternalJobCommandTest method makeTestJob.
private Job makeTestJob(Guid jobId) {
Job job = new Job();
job.setId(jobId);
job.setDescription("Sample Job");
job.setExternal(true);
return job;
}
use of org.ovirt.engine.core.common.job.Job in project ovirt-engine by oVirt.
the class AbstractBackendResource method getJobIdStatus.
private CreationStatus getJobIdStatus(ActionReturnValue result) {
Guid jobId = result.getJobId();
if (jobId == null || jobId.equals(Guid.Empty)) {
return CreationStatus.COMPLETE;
} else {
IdQueryParameters params = new IdQueryParameters(jobId);
QueryReturnValue queryResult = runQuery(QueryType.GetJobByJobId, params);
if (queryResult != null && queryResult.getSucceeded() && queryResult.getReturnValue() != null) {
Job job = queryResult.getReturnValue();
return job.getStatus() == JobExecutionStatus.STARTED ? CreationStatus.IN_PROGRESS : CreationStatus.COMPLETE;
} else {
// not supposed to happen
return CreationStatus.COMPLETE;
}
}
}
Aggregations