Search in sources :

Example 1 with Step

use of org.ovirt.engine.api.model.Step in project ovirt-engine by oVirt.

the class BackendStepResourceTest method getEntity.

@Override
protected org.ovirt.engine.core.common.job.Step getEntity(int index) {
    int parentIndex = 1;
    org.ovirt.engine.core.common.job.Step step = new org.ovirt.engine.core.common.job.Step();
    step.setId(GUIDS[index]);
    step.setStepType(org.ovirt.engine.core.common.job.StepEnum.VALIDATING);
    step.setJobId(GUIDS[parentIndex]);
    step.setDescription(DESCRIPTIONS[index]);
    step.setExternal(true);
    step.setStartTime(new Date());
    return step;
}
Also used : Step(org.ovirt.engine.api.model.Step) Date(java.util.Date)

Example 2 with Step

use of org.ovirt.engine.api.model.Step in project ovirt-engine by oVirt.

the class BackendStepsResourceTest method getEntity.

@Override
protected org.ovirt.engine.core.common.job.Step getEntity(int index) {
    int jobIndex = index == 0 ? 1 : index - 1;
    org.ovirt.engine.core.common.job.Step step = new org.ovirt.engine.core.common.job.Step();
    step.setId(GUIDS[index]);
    step.setJobId(GUIDS[jobIndex]);
    step.setDescription(DESCRIPTIONS[index]);
    step.setStepType(org.ovirt.engine.core.common.job.StepEnum.EXECUTING);
    step.setStartTime(new Date());
    step.setExternal(true);
    return step;
}
Also used : Step(org.ovirt.engine.api.model.Step) Date(java.util.Date)

Example 3 with Step

use of org.ovirt.engine.api.model.Step in project ovirt-engine by oVirt.

the class GlusterTaskStatisticalQueryTest method getParent.

private Step getParent() {
    Step step = new Step();
    step.setId(Guid.Empty.toString());
    step.setJob(new Job());
    step.getJob().setId(Guid.Empty.toString());
    return step;
}
Also used : Step(org.ovirt.engine.api.model.Step) Job(org.ovirt.engine.api.model.Job)

Example 4 with Step

use of org.ovirt.engine.api.model.Step in project ovirt-engine by oVirt.

the class StepStatisticalQuery method clone.

private Step clone(Step step) {
    // Needed to avoid NPE in LinkHelper due to unsetting of grandparent in LinkHelper#addLinks.
    Step cloned = new Step();
    cloned.setId(step.getId());
    cloned.setJob(new Job());
    cloned.getJob().setId(step.getJob().getId());
    return cloned;
}
Also used : Step(org.ovirt.engine.api.model.Step) Job(org.ovirt.engine.api.model.Job)

Example 5 with Step

use of org.ovirt.engine.api.model.Step in project ovirt-engine by oVirt.

the class BackendStepResource method getStepById.

private Step getStepById(Guid id) {
    IdQueryParameters params = new IdQueryParameters(id);
    Step step = performGet(QueryType.GetStepWithSubjectEntitiesByStepId, params);
    return step;
}
Also used : IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) Step(org.ovirt.engine.api.model.Step)

Aggregations

Step (org.ovirt.engine.api.model.Step)8 Job (org.ovirt.engine.api.model.Job)4 Date (java.util.Date)2 Test (org.junit.Test)2 Response (javax.ws.rs.core.Response)1 StepSubjectEntity (org.ovirt.engine.core.common.job.StepSubjectEntity)1 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)1 Guid (org.ovirt.engine.core.compat.Guid)1