use of org.ovirt.engine.api.model.Network in project ovirt-engine by oVirt.
the class BackendNetworkLabelsResource method addParents.
@Override
protected NetworkLabel addParents(NetworkLabel model) {
model.setNetwork(new Network());
model.getNetwork().setId(networkId.toString());
return model;
}
use of org.ovirt.engine.api.model.Network in project ovirt-engine by oVirt.
the class BackendNetworkResource method get.
@Override
public Network get() {
org.ovirt.engine.core.common.businessentities.network.Network entity = parent.lookupNetwork(guid);
if (entity == null) {
return notFound();
}
Network network = map(entity);
network.setDisplay(null);
return addLinks(network);
}
use of org.ovirt.engine.api.model.Network in project ovirt-engine by oVirt.
the class BackendClusterNetworkResourceTest method getModel.
private Network getModel(int i) {
Network network = new Network();
network.setId(GUIDS[i].toString());
network.setName(NAMES[i]);
network.setDisplay(true);
return network;
}
use of org.ovirt.engine.api.model.Network in project ovirt-engine by oVirt.
the class AbstractBackendNetworksResourceTest method getModel.
static Network getModel(int index) {
Network model = new Network();
model.setId(GUIDS[0].toString());
model.setName(NAMES[index]);
model.setDescription(DESCRIPTIONS[index]);
return model;
}
use of org.ovirt.engine.api.model.Network in project ovirt-engine by oVirt.
the class AbstractBackendVnicProfilesResourceTest method doTestBadAddVnicProfile.
private void doTestBadAddVnicProfile(boolean valid, boolean success, String detail) throws Exception {
setUriInfo(setUpActionExpectations(ActionType.AddVnicProfile, AddVnicProfileParameters.class, new String[] {}, new Object[] {}, valid, success));
VnicProfile model = getModel(0);
model.setNetwork(new Network());
model.getNetwork().setId(NETWORK_ID.toString());
try {
collection.add(model);
fail("expected WebApplicationException");
} catch (WebApplicationException wae) {
verifyFault(wae, detail);
}
}
Aggregations