use of org.ovirt.engine.api.model.NetworkLabel in project ovirt-engine by oVirt.
the class AbstractBaseHostNicLabelsResource method mapCollection.
private NetworkLabels mapCollection(List<org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel> networkLabels) {
NetworkLabels labels = new NetworkLabels();
for (org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel networkLabel : networkLabels) {
NetworkLabel label = new NetworkLabel();
label.setId(networkLabel.getId());
labels.getNetworkLabels().add(label);
addLinks(label, HostNic.class);
}
return labels;
}
use of org.ovirt.engine.api.model.NetworkLabel in project ovirt-engine by oVirt.
the class BackendNetworkLabelsResourceTest method testAddIncompleteParameters.
@Test
public void testAddIncompleteParameters() throws Exception {
NetworkLabel model = new NetworkLabel();
setUriInfo(setUpBasicUriExpectations());
try {
collection.add(model);
fail("expected WebApplicationException on incomplete parameters");
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "NetworkLabel", "add", "id");
}
}
use of org.ovirt.engine.api.model.NetworkLabel in project ovirt-engine by oVirt.
the class BackendNetworkLabelsResource method mapCollection.
private NetworkLabels mapCollection(List<org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel> networkLabels) {
NetworkLabels labels = new NetworkLabels();
for (org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel networkLabel : networkLabels) {
NetworkLabel label = new NetworkLabel();
label.setId(networkLabel.getId());
labels.getNetworkLabels().add(label);
addLinks(label, Network.class);
}
return labels;
}
use of org.ovirt.engine.api.model.NetworkLabel in project ovirt-engine by oVirt.
the class BackendHostNicLabelsResourceTest method getModel.
private NetworkLabel getModel(int i) {
NetworkLabel model = new NetworkLabel();
model.setId(LABELS[i]);
return model;
}
use of org.ovirt.engine.api.model.NetworkLabel in project ovirt-engine by oVirt.
the class BackendHostNicLabelsResourceTest method testAddIncompleteParameters.
@Test
public void testAddIncompleteParameters() throws Exception {
NetworkLabel model = new NetworkLabel();
setUriInfo(setUpBasicUriExpectations());
try {
collection.add(model);
fail("expected WebApplicationException on incomplete parameters");
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "NetworkLabel", "add", "id");
}
}
Aggregations