use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toRloc.
public static Rloc toRloc(SimpleAddress address) {
RlocBuilder builder = new RlocBuilder();
builder.setAddressType(addressTypeFromSimpleAddress(address));
builder.setVirtualNetworkId(null);
builder.setAddress(addressFromSimpleAddress(address));
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toRloc.
public static Rloc toRloc(Ipv4Address address) {
RlocBuilder builder = new RlocBuilder();
builder.setAddressType(Ipv4Afi.class);
builder.setVirtualNetworkId(null);
builder.setAddress((Address) new Ipv4Builder().setIpv4(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toRloc.
public static Rloc toRloc(Ipv4AddressBinary address) {
RlocBuilder builder = new RlocBuilder();
builder.setAddressType(Ipv4BinaryAfi.class);
builder.setVirtualNetworkId(null);
builder.setAddress((Address) new Ipv4BinaryBuilder().setIpv4Binary(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method convertFromBinary.
public static Rloc convertFromBinary(Rloc rloc) {
Pair<Class<? extends LispAddressFamily>, Address> converted = convertFromBinary(rloc.getAddress());
if (converted.getRight() == null) {
return rloc;
}
RlocBuilder rb = new RlocBuilder(rloc);
rb.setAddressType(converted.getLeft());
rb.setAddress(converted.getRight());
return rb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class ExplicitLocatorPathSerializer method deserializeLcafRlocData.
@Override
protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length, LispAddressSerializerContext ctx) {
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(ExplicitLocatorPathLcaf.class);
rb.setVirtualNetworkId(null);
rb.setAddress(deserializeData(buffer, length, ctx));
return rb.build();
}
Aggregations