use of org.ovirt.engine.api.model.InstanceType in project ovirt-engine by oVirt.
the class BackendInstanceTypeResourceTest method testConflictedUpdate.
@Test
public void testConflictedUpdate() throws Exception {
setUriInfo(setUpBasicUriExpectations());
setUpGetEntityExpectations(1);
InstanceType model = getRestModel(1);
model.setId(GUIDS[1].toString());
try {
resource.update(model);
fail("expected WebApplicationException");
} catch (WebApplicationException wae) {
verifyImmutabilityConstraint(wae);
}
}
use of org.ovirt.engine.api.model.InstanceType in project ovirt-engine by oVirt.
the class BackendInstanceTypesResourceTest method testAddIncompleteParameters.
@Test
public void testAddIncompleteParameters() throws Exception {
InstanceType model = new InstanceType();
setUriInfo(setUpBasicUriExpectations());
try {
collection.add(model);
fail("expected WebApplicationException on incomplete parameters");
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "InstanceType", "add", "name");
}
}
use of org.ovirt.engine.api.model.InstanceType in project ovirt-engine by oVirt.
the class BackendInstanceTypesResourceTest method getModel.
static InstanceType getModel(int index) {
InstanceType model = new InstanceType();
model.setName(NAMES[index]);
model.setDescription(DESCRIPTIONS[index]);
return model;
}
use of org.ovirt.engine.api.model.InstanceType in project ovirt-engine by oVirt.
the class BackendInstanceTypeNicResource method addParents.
@Override
protected Nic addParents(Nic nic) {
InstanceType instanceType = new InstanceType();
instanceType.setId(instanceTypeId.toString());
nic.setInstanceType(instanceType);
return nic;
}
use of org.ovirt.engine.api.model.InstanceType in project ovirt-engine by oVirt.
the class BackendInstanceTypeNicsResource method addParents.
@Override
public Nic addParents(Nic nic) {
InstanceType instanceType = new InstanceType();
instanceType.setId(instanceTypeId.toString());
nic.setInstanceType(instanceType);
return nic;
}
Aggregations