use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class BackendAffinityLabelVmsResource method list.
@Override
public Vms list() {
Vms vms = new Vms();
List<Vm> list = vms.getVms();
Label label = BackendAffinityLabelHelper.getLabel(this, labelId);
label.getVms().stream().map(BackendAffinityLabelHelper::makeVmLink).forEach(list::add);
return vms;
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class BackendVmKatelloErrataResource method addParents.
@Override
protected KatelloErratum addParents(KatelloErratum erratum) {
Vm vm = new Vm();
vm.setId(vmId);
erratum.setVm(vm);
return super.addParents(erratum);
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class CompletenessAssertorTest method testMissingSubFieldAlternatives.
@Test
public void testMissingSubFieldAlternatives() throws Exception {
Vm vm = new Vm();
vm.setDescription("incomplete");
vm.setHost(new Host());
try {
CompletenessAssertor.validateParameters(vm, "host.id|name");
fail("expected WebApplicationException on incomplete model");
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "Vm", "host.id|name");
}
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class CompletenessAssertorTest method testCompleteSubFieldAlternatives.
@Test
public void testCompleteSubFieldAlternatives() throws Exception {
Vm vm = new Vm();
vm.setHost(new Host());
vm.getHost().setName("zog");
CompletenessAssertor.validateParameters(vm, "host.id|name");
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class CompletenessAssertorTest method testMissingSubField.
@Test
public void testMissingSubField() throws Exception {
Vm vm = new Vm();
vm.setDescription("incomplete");
vm.setHost(new Host());
try {
CompletenessAssertor.validateParameters(vm, "host.id");
fail("expected WebApplicationException on incomplete model");
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "Vm", "host.id");
}
}
Aggregations