Search in sources :

Example 11 with IpV6Address

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

the class IpConfigurationCompleterTest method createIpv6Address.

private IpV6Address createIpv6Address() {
    final IpV6Address ipv6Address = new IpV6Address();
    ipv6Address.setBootProtocol(Ipv6BootProtocol.AUTOCONF);
    ipv6Address.setAddress(IPV6_ADDRESS);
    ipv6Address.setPrefix(IPV6_PREFIX);
    ipv6Address.setGateway(IPV6_GATEWAY);
    return ipv6Address;
}
Also used : IpV6Address(org.ovirt.engine.core.common.businessentities.network.IpV6Address)

Example 12 with IpV6Address

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

the class IpConfigurationCompleterTest method testFillInUnsetIpConfigsIpv4.

@Test
public void testFillInUnsetIpConfigsIpv4() {
    final IpV6Address ipv6Address = createIpv6Address();
    ipConfiguration.setIpV6Addresses(Collections.singletonList(ipv6Address));
    underTest.fillInUnsetIpConfigs(networkAttachments);
    assertIpv4DefaultValues(networkAttachment);
    assertIpv6Values(networkAttachment, is(Ipv6BootProtocol.AUTOCONF), is(IPV6_ADDRESS), is(IPV6_PREFIX), is(IPV6_GATEWAY));
}
Also used : IpV6Address(org.ovirt.engine.core.common.businessentities.network.IpV6Address) Test(org.junit.Test)

Example 13 with IpV6Address

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

the class NetworkConfiguratorTest method assertIpv6Details.

private void assertIpv6Details(IpConfiguration ipConfiguration) {
    assertThat(ipConfiguration.getIpV6Addresses(), hasSize(1));
    final IpV6Address ipv6Address = ipConfiguration.getIpV6Addresses().get(0);
    assertThat(ipv6Address.getAddress(), is(IPV6_ADDRESS));
    assertThat(ipv6Address.getBootProtocol(), is(Ipv6BootProtocol.STATIC_IP));
    assertThat(ipv6Address.getAddress(), is(IPV6_ADDRESS));
}
Also used : IpV6Address(org.ovirt.engine.core.common.businessentities.network.IpV6Address)

Example 14 with IpV6Address

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

the class HostNetworkAttachmentsPersisterTest method createIpv6Address.

private IpV6Address createIpv6Address() {
    IpV6Address address = new IpV6Address();
    address.setAddress(IPV6_ADDRESS);
    address.setPrefix(IPV6_PREFIX);
    address.setGateway(IPV6_GATEWAY);
    address.setBootProtocol(Ipv6BootProtocol.AUTOCONF);
    return address;
}
Also used : IpV6Address(org.ovirt.engine.core.common.businessentities.network.IpV6Address)

Example 15 with IpV6Address

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

the class NetworkCommonUtils method createDefaultIpConfiguration.

public static IpConfiguration createDefaultIpConfiguration() {
    IpConfiguration ipConfiguration = new IpConfiguration();
    IPv4Address iPv4Address = createDefaultIpv4Address();
    ipConfiguration.getIPv4Addresses().add(iPv4Address);
    IpV6Address ipv6Address = createDefaultIpv6Address();
    ipConfiguration.getIpV6Addresses().add(ipv6Address);
    return ipConfiguration;
}
Also used : IpConfiguration(org.ovirt.engine.core.common.businessentities.network.IpConfiguration) IpV6Address(org.ovirt.engine.core.common.businessentities.network.IpV6Address) IPv4Address(org.ovirt.engine.core.common.businessentities.network.IPv4Address)

Aggregations

IpV6Address (org.ovirt.engine.core.common.businessentities.network.IpV6Address)19 IPv4Address (org.ovirt.engine.core.common.businessentities.network.IPv4Address)5 IpConfiguration (org.ovirt.engine.core.common.businessentities.network.IpConfiguration)4 Test (org.junit.Test)3 IpAddressAssignment (org.ovirt.engine.api.model.IpAddressAssignment)2 Ipv6BootProtocol (org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol)2 WebApplicationException (javax.ws.rs.WebApplicationException)1 Ip (org.ovirt.engine.api.model.Ip)1 ValidationResult (org.ovirt.engine.core.bll.ValidationResult)1 NetworkAttachment (org.ovirt.engine.core.common.businessentities.network.NetworkAttachment)1 NicToIpv4AddressFunction (org.ovirt.engine.core.utils.network.function.NicToIpv4AddressFunction)1 NicToIpv6AddressFunction (org.ovirt.engine.core.utils.network.function.NicToIpv6AddressFunction)1 NetworkParameters (org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkParameters)1