* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.mvpn.impl.attributes.tunnel.identifier;
import static org.junit.Assert.assertArrayEquals;
import org.opendaylight.protocol.util.ByteArray;
import org.opendaylight.protocol.util.Ipv4Util;
import org.opendaylight.protocol.util.Ipv6Util;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.PAddressPMulticastGroup;
public final class PAddressPMulticastGroupUtilTest {
private static final String IPV6_MODEL = "2001::1";
- private static final IpAddress IPV6 = new IpAddress(new Ipv6Address(IPV6_MODEL));
+ private static final IpAddressNoZone IPV6 = new IpAddressNoZone(new Ipv6AddressNoZone(IPV6_MODEL));
private static final byte[] IPV4_ADDRESS_EXPECTED = {(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01};
private static final byte[] IPV6_ADDRESS_EXPECTED = {
0x20, (byte) 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
private static final byte[] SENDER_P_MULTICAST_GROUP_EXPECTED = {
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x17, (byte) 0x01, (byte) 0x01, (byte) 0x01
};
- private static final IpAddress IP_ADDRESS = new IpAddress(new Ipv4Address("1.1.1.1"));
- private static final IpAddress P_MULTICAST = new IpAddress(new Ipv4Address("23.1.1.1"));
+ private static final IpAddressNoZone IP_ADDRESS = new IpAddressNoZone(new Ipv4AddressNoZone("1.1.1.1"));
+ private static final IpAddressNoZone P_MULTICAST = new IpAddressNoZone(new Ipv4AddressNoZone("23.1.1.1"));
@Test
public void parseIpAddress() {
private static class MyPAddressPMulticastGroup implements PAddressPMulticastGroup {
@Override
- public IpAddress getPAddress() {
+ public IpAddressNoZone getPAddress() {
return IP_ADDRESS;
}
@Override
- public IpAddress getPMulticastGroup() {
+ public IpAddressNoZone getPMulticastGroup() {
return P_MULTICAST;
}