Search in sources :

Example 71 with Network

use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.

the class SyncNetworkProviderCommandTest method getNetworkList.

private List<Network> getNetworkList(String externalId) {
    ProviderNetwork providerNetwork = new ProviderNetwork();
    providerNetwork.setExternalId(externalId);
    providerNetwork.setProviderId(PROVIDER_ID);
    Network network = new Network();
    network.setProvidedBy(providerNetwork);
    return Collections.singletonList(network);
}
Also used : ProviderNetwork(org.ovirt.engine.core.common.businessentities.network.ProviderNetwork) Network(org.ovirt.engine.core.common.businessentities.network.Network) ProviderNetwork(org.ovirt.engine.core.common.businessentities.network.ProviderNetwork)

Example 72 with Network

use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.

the class PersistentHostSetupNetworksParametersFactoryTest method createNetwork.

private Network createNetwork(String name) {
    Network network = new Network();
    network.setId(Guid.newGuid());
    network.setName(name);
    return network;
}
Also used : Network(org.ovirt.engine.core.common.businessentities.network.Network)

Example 73 with Network

use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.

the class RefreshNetworksParametersFactoryTest method createNetwork.

private Network createNetwork() {
    Network network = new Network();
    network.setId(Guid.newGuid());
    return network;
}
Also used : Network(org.ovirt.engine.core.common.businessentities.network.Network)

Example 74 with Network

use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.

the class EntityDaoImplTest method testGetEntityNameByIdAndTypeForNetwork.

@Test
public void testGetEntityNameByIdAndTypeForNetwork() {
    Network network = networkDao.get(NETWORK_ID);
    assertNotNull(network);
    String name = network.getName();
    assertEquals(name, underTest.getEntityNameByIdAndType(NETWORK_ID, VdcObjectType.Network));
}
Also used : Network(org.ovirt.engine.core.common.businessentities.network.Network) Test(org.junit.Test)

Example 75 with Network

use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.

the class GetNetworksByIscsiBondIdQuery method executeQueryCommand.

@Override
protected void executeQueryCommand() {
    List<Network> networks = new ArrayList<>();
    for (Guid id : getNetworksIds()) {
        networks.add(networkDao.get(id));
    }
    getQueryReturnValue().setReturnValue(networks);
}
Also used : Network(org.ovirt.engine.core.common.businessentities.network.Network) ArrayList(java.util.ArrayList) Guid(org.ovirt.engine.core.compat.Guid)

Aggregations

Network (org.ovirt.engine.core.common.businessentities.network.Network)292 Test (org.junit.Test)105 NetworkAttachment (org.ovirt.engine.core.common.businessentities.network.NetworkAttachment)63 FindActiveVmsUsingNetwork (org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetwork)47 VdsNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface)46 ArrayList (java.util.ArrayList)44 Guid (org.ovirt.engine.core.compat.Guid)44 ProviderNetwork (org.ovirt.engine.core.common.businessentities.network.ProviderNetwork)39 ValidationResult (org.ovirt.engine.core.bll.ValidationResult)23 List (java.util.List)21 EngineMessage (org.ovirt.engine.core.common.errors.EngineMessage)21 HashMap (java.util.HashMap)19 NetworkCluster (org.ovirt.engine.core.common.businessentities.network.NetworkCluster)19 Map (java.util.Map)13 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)13 VnicProfile (org.ovirt.engine.core.common.businessentities.network.VnicProfile)13 HashSet (java.util.HashSet)9 Set (java.util.Set)9 BusinessEntityMap (org.ovirt.engine.core.common.businessentities.BusinessEntityMap)9 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)9