Search in sources :

Example 31 with HostNetworkQos

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

the class NetworkInSyncWithVdsNetworkInterfaceTest method setUp.

@Before
public void setUp() throws Exception {
    sampleDnsResolverConfiguration = new DnsResolverConfiguration();
    sampleDnsResolverConfiguration.setNameServers(Arrays.asList(new NameServer("192.168.1.1"), new NameServer("2001:0db8:85a3:0000:0000:8a2e:0370:7334")));
    sampleDnsResolverConfiguration2 = new DnsResolverConfiguration();
    sampleDnsResolverConfiguration2.setNameServers(Arrays.asList(new NameServer("192.168.1.2"), new NameServer("2002:0db8:85a3:0000:0000:8a2e:0370:7334")));
    sampleDnsResolverConfigurationWithReversedNameServers = reverseNameServersOrder(sampleDnsResolverConfiguration);
    ifaceQos = new HostNetworkQos();
    networkQos = new HostNetworkQos();
    iface = new VdsNetworkInterface();
    // needed because network is vm network by default
    iface.setBridged(true);
    iface.setQos(ifaceQos);
    iface.setReportedSwitchType(SwitchType.LEGACY);
    iface.setIpv4DefaultRoute(false);
    network = new Network();
    network.setDnsResolverConfiguration(sampleDnsResolverConfiguration);
    testedNetworkAttachment = new NetworkAttachment();
    testedNetworkAttachment.setIpConfiguration(new IpConfiguration());
    cluster = new Cluster();
    cluster.setCompatibilityVersion(Version.v4_2);
    cluster.setRequiredSwitchTypeForCluster(SwitchType.LEGACY);
}
Also used : HostNetworkQos(org.ovirt.engine.core.common.businessentities.network.HostNetworkQos) IpConfiguration(org.ovirt.engine.core.common.businessentities.network.IpConfiguration) NameServer(org.ovirt.engine.core.common.businessentities.network.NameServer) Network(org.ovirt.engine.core.common.businessentities.network.Network) VdsNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) DnsResolverConfiguration(org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration) NetworkAttachment(org.ovirt.engine.core.common.businessentities.network.NetworkAttachment) Before(org.junit.Before)

Example 32 with HostNetworkQos

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

the class NetworkModel method createEmptyHostNetworkQos.

public static HostNetworkQos createEmptyHostNetworkQos() {
    HostNetworkQos qos = new HostNetworkQos();
    qos.setName(ConstantsManager.getInstance().getConstants().unlimitedQoSTitle());
    qos.setId(Guid.Empty);
    return qos;
}
Also used : HostNetworkQos(org.ovirt.engine.core.common.businessentities.network.HostNetworkQos)

Aggregations

HostNetworkQos (org.ovirt.engine.core.common.businessentities.network.HostNetworkQos)32 AnonymousHostNetworkQos (org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos)11 Network (org.ovirt.engine.core.common.businessentities.network.Network)9 NetworkAttachment (org.ovirt.engine.core.common.businessentities.network.NetworkAttachment)7 VdsNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface)6 Test (org.junit.Test)5 DnsResolverConfiguration (org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration)5 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)3 List (java.util.List)3 Map (java.util.Map)3 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)3 Guid (org.ovirt.engine.core.compat.Guid)3 StringUtils (org.apache.commons.lang.StringUtils)2 Before (org.junit.Before)2 HostNic (org.ovirt.engine.api.model.HostNic)2 NameServer (org.ovirt.engine.core.common.businessentities.network.NameServer)2 VdsNetworkStatistics (org.ovirt.engine.core.common.businessentities.network.VdsNetworkStatistics)2 EffectiveHostNetworkQos (org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos)2 Path (java.nio.file.Path)1