use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtilTest method toEid_mac.
/**
* Test
* - {@link LispAddressUtil#toEid(MacAddress, InstanceIdType)}
* - {@link LispAddressUtil#asMacEid(String)}
* - {@link LispAddressUtil#asMacEid(String, long)}
* methods.
*/
@Test
public void toEid_mac() {
Eid eidFromMac = LispAddressUtil.toEid(MAC_ADDRESS_TEST, INSTANCE_ID_TYPE_TEST);
verifyToEidWithMacAddress(eidFromMac, true);
eidFromMac = LispAddressUtil.asMacEid(MAC_ADDRESS_VALUE_TEST);
verifyToEidWithMacAddress(eidFromMac, false);
eidFromMac = LispAddressUtil.asMacEid(MAC_ADDRESS_VALUE_TEST, INSTANCE_ID_TYPE_VALUE_TEST);
verifyToEidWithMacAddress(eidFromMac, true);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtilTest method asBinaryEidTest_ipv6Prefix.
/**
* Tests {@link LispAddressUtil#asBinaryEid(SimpleAddress, InstanceIdType)} method with ipv6Prefix.
*/
@Test
public void asBinaryEidTest_ipv6Prefix() {
final Eid result = LispAddressUtil.asBinaryEid(SIMPLE_ADDRESS_IPV6_PREFIX_TEST, INSTANCE_ID_TYPE_TEST);
assertEquals(IPV6_ADDRESS_PREFIX_BINARY_EID_1, result);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtilTest method asBinaryEidTest_mac.
/**
* Tests {@link LispAddressUtil#asBinaryEid(SimpleAddress, InstanceIdType)} method with mac.
*/
@Test
public void asBinaryEidTest_mac() {
final Eid result = LispAddressUtil.asBinaryEid(SIMPLE_ADDRESS_MAC_TEST, INSTANCE_ID_TYPE_TEST);
assertEquals(MAC_ADDRESS_EID, result);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtilTest method asBinaryEidTest_ipv6.
/**
* Tests {@link LispAddressUtil#asBinaryEid(SimpleAddress, InstanceIdType)} method with ipv6.
*/
@Test
public void asBinaryEidTest_ipv6() {
final Eid result = LispAddressUtil.asBinaryEid(SIMPLE_ADDRESS_IPV6_TEST, INSTANCE_ID_TYPE_TEST);
assertEquals(IPV6_ADDRESS_BINARY_EID, result);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtilTest method toEid_ipv4.
/**
* Test
* - {@link LispAddressUtil#toEid(Ipv4Address, InstanceIdType)}
* - {@link LispAddressUtil#toEid(Ipv4AddressBinary, InstanceIdType)}
* - {@link LispAddressUtil#asIpv4Eid(String)}
* - {@link LispAddressUtil#asIpv4Eid(String, long)}
* methods.
*/
@Test
public void toEid_ipv4() {
Eid eidFromIpv4 = LispAddressUtil.toEid(IPV4_ADDRESS_TEST, INSTANCE_ID_TYPE_TEST);
verifyToEidWithIpv4(eidFromIpv4, true);
eidFromIpv4 = LispAddressUtil.toEid(IPV4_ADDRESS_BINARY_TEST, INSTANCE_ID_TYPE_TEST);
verifyToEidWithIpv4Binary(eidFromIpv4, true);
eidFromIpv4 = LispAddressUtil.asIpv4Eid(IPV4_ADDRESS_VALUE_TEST);
verifyToEidWithIpv4Binary(eidFromIpv4, false);
eidFromIpv4 = LispAddressUtil.asIpv4Eid(IPV4_ADDRESS_VALUE_TEST, INSTANCE_ID_TYPE_VALUE_TEST);
verifyToEidWithIpv4Binary(eidFromIpv4, true);
}
Aggregations