use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class UpdateStoragePoolCommandTest method addNetworksToPool.
private void addNetworksToPool(int numberOfNetworks, boolean isManagement) {
List<Network> allDcNetworks = new ArrayList<>();
for (int i = 0; i < numberOfNetworks; i++) {
final Guid networkId = Guid.newGuid();
Network network = createNetwork(networkId);
network.setId(networkId);
allDcNetworks.add(network);
when(managementNetworkUtil.isManagementNetwork(networkId)).thenReturn(isManagement);
}
when(networkDao.getAllForDataCenter(any())).thenReturn(allDcNetworks);
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class BackendOpenStackNetworksResource method mapCollection.
private OpenStackNetworks mapCollection(Map<Network, Set<Guid>> entities) {
OpenStackNetworks collection = new OpenStackNetworks();
if (entities != null) {
for (Map.Entry<Network, Set<Guid>> entry : entities.entrySet()) {
Network network = entry.getKey();
collection.getOpenStackNetworks().add(addLinks(populate(map(network), network)));
}
}
return collection;
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class JsonObjectSerializerTest method serializeNetwork.
@Test
public void serializeNetwork() {
Network net = new Network();
JsonObjectSerializer serializer = new JsonObjectSerializer();
assertTrue(serializer.serialize(net).length() > 0);
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class BaseNetworkImplementationDetailsUtilsTest method calculateNetworkImplementationDetailsNetworkQosOutOfSync.
@Test
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync() throws Exception {
HostNetworkQos qos = qosB;
Network network = createNetwork(testIface.isBridged(), testIface.getMtu(), testIface.getVlanId());
calculateNetworkImplementationDetailsAndAssertSync(testIface, false, qos, network);
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class BaseNetworkImplementationDetailsUtilsTest method calculateNetworkImplementationDetailsNetworkQosOverridden.
@Test
public void calculateNetworkImplementationDetailsNetworkQosOverridden() throws Exception {
Network network = createNetwork(testIface.isBridged(), testIface.getMtu(), testIface.getVlanId());
calculateNetworkImplementationDetailsAndAssertSync(testIface, false, unlimitedHostNetworkQos, network);
}
Aggregations