Search in sources :

Example 6 with IpAddressBinary

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary in project lispflowmapping by opendaylight.

the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withApplicationDataIpv6Address.

/**
 * Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with ApplicationData type Ipv6 address.
 */
@Test
public void getTransportAddressFromRlocTest_withApplicationDataIpv6Address() {
    final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV6_BINARY)).setPort(new PortNumber(PORT)).build();
    assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_APPLICATION_DATA_IPV6));
}
Also used : IpAddressBinary(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary) TransportAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) TransportAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder) Test(org.junit.Test)

Example 7 with IpAddressBinary

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary in project lispflowmapping by opendaylight.

the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withApplicationDataIpv4Address.

/**
 * Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with ApplicationData type Ipv4 address.
 */
@Test
public void getTransportAddressFromRlocTest_withApplicationDataIpv4Address() {
    final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV4_BINARY)).setPort(new PortNumber(PORT)).build();
    assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_APPLICATION_DATA_IPV4));
}
Also used : IpAddressBinary(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary) TransportAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) TransportAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder) Test(org.junit.Test)

Example 8 with IpAddressBinary

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary in project lispflowmapping by opendaylight.

the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withIpv4Address.

/**
 * Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with Ipv4 type address.
 */
@Test
public void getTransportAddressFromRlocTest_withIpv4Address() {
    final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV4_BINARY)).setPort(new PortNumber(LispMessage.PORT_NUM)).build();
    assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_IPV4));
}
Also used : IpAddressBinary(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary) TransportAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) TransportAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder) Test(org.junit.Test)

Example 9 with IpAddressBinary

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary in project lispflowmapping by opendaylight.

the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withKeyValueAddress.

/**
 * Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with KeyValueAddress type address.
 */
@Test
public void getTransportAddressFromRlocTest_withKeyValueAddress() {
    final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV4_BINARY)).setPort(new PortNumber(PORT)).build();
    assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_KEYVALUE_ADDRESS));
}
Also used : IpAddressBinary(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary) TransportAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) TransportAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder) Test(org.junit.Test)

Example 10 with IpAddressBinary

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary in project lispflowmapping by opendaylight.

the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withDistinguishedNameAddress.

/**
 * Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with DistinguishedName type address.
 */
@Test
public void getTransportAddressFromRlocTest_withDistinguishedNameAddress() {
    final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV4_BINARY)).setPort(new PortNumber(PORT)).build();
    assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_DISTINGUISHED_NAME_ADDRESS));
}
Also used : IpAddressBinary(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary) TransportAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) TransportAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder) Test(org.junit.Test)

Aggregations

IpAddressBinary (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary)16 TransportAddress (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress)11 Test (org.junit.Test)10 PortNumber (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber)10 TransportAddressBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder)10 MappingData (org.opendaylight.lispflowmapping.lisp.type.MappingData)4 InetAddress (java.net.InetAddress)3 ArrayList (java.util.ArrayList)3 Eid (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)3 MappingRecord (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord)3 HashSet (java.util.HashSet)2 MappingRecordItemBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItemBuilder)2 ItrRloc (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.maprequest.ItrRloc)2 Rloc (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.Rloc)2 UnknownHostException (java.net.UnknownHostException)1 Date (java.util.Date)1 Iterator (java.util.Iterator)1 Set (java.util.Set)1 ILispDAO (org.opendaylight.lispflowmapping.interfaces.dao.ILispDAO)1 SmrEvent (org.opendaylight.lispflowmapping.interfaces.lisp.SmrEvent)1