use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6PrefixBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv6Prefix prefix, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv6PrefixAfi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new Ipv6PrefixBuilder().setIpv6Prefix(prefix).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6PrefixBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method asIpv6PrefixEid.
public static Eid asIpv6PrefixEid(Eid eid, Inet6Address address, short mask) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv6PrefixAfi.class);
builder.setVirtualNetworkId(eid.getVirtualNetworkId());
builder.setAddress(new Ipv6PrefixBuilder().setIpv6Prefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(address, mask)).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6PrefixBuilder in project lispflowmapping by opendaylight.
the class Ipv6PrefixSerializer method deserializeEidData.
@Override
protected Eid deserializeEidData(ByteBuffer buffer, LispAddressSerializerContext ctx) {
EidBuilder eb = new EidBuilder();
eb.setAddressType(Ipv6PrefixAfi.class);
eb.setVirtualNetworkId(getVni(ctx));
eb.setAddress(new Ipv6PrefixBuilder().setIpv6Prefix(deserializeData(buffer, ctx)).build());
return eb.build();
}
Aggregations