use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.address.family.ipv6._case.Ipv6Builder in project lispflowmapping by opendaylight.
the class LispAddressUtilTest method ipAddressToByteArray_ipv6.
/**
* Tests {@link LispAddressUtil#ipAddressToByteArray(Address)} method with ipv6 value.
*/
@Test
public void ipAddressToByteArray_ipv6() {
final Ipv6 expectedIpv6 = new Ipv6Builder().setIpv6(IPV6_ADDRESS_TEST).build();
final byte[] testedAddress = LispAddressUtil.ipAddressToByteArray(expectedIpv6);
assertArrayEquals(IPV6_ADDRESS_BYTES_A_TEST, testedAddress);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.address.family.ipv6._case.Ipv6Builder in project lispflowmapping by opendaylight.
the class Ipv6Serializer method deserializeRlocData.
@Override
protected Rloc deserializeRlocData(ByteBuffer buffer) {
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(Ipv6Afi.class);
rb.setVirtualNetworkId(null);
rb.setAddress(new Ipv6Builder().setIpv6(deserializeData(buffer)).build());
return rb.build();
}
Aggregations