use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.linkstate.ObjectType in project bgpcep by opendaylight.
the class TeLspIpv6NlriParser method parseObjectType.
@Override
protected ObjectType parseObjectType(final ByteBuf buffer) {
final TeLspCaseBuilder builder = new TeLspCaseBuilder();
final Ipv6CaseBuilder ipv6CaseBuilder = new Ipv6CaseBuilder();
ipv6CaseBuilder.setIpv6TunnelSenderAddress(Ipv6Util.addressForByteBuf(buffer));
builder.setTunnelId(new TunnelId(buffer.readUnsignedShort()));
builder.setLspId(new LspId((long) buffer.readUnsignedShort()));
ipv6CaseBuilder.setIpv6TunnelEndpointAddress(Ipv6Util.addressForByteBuf(buffer));
return builder.setAddressFamily(ipv6CaseBuilder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.linkstate.ObjectType in project bgpcep by opendaylight.
the class AbstractTeLspNlriCodec method serializeTeLsp.
public static TeLspCase serializeTeLsp(final ChoiceNode objectType) {
final TeLspCaseBuilder teLsp = new TeLspCaseBuilder();
teLsp.setLspId(new LspId((Long) objectType.getChild(LSP_ID).get().getValue()));
teLsp.setTunnelId(new TunnelId((Integer) objectType.getChild(TUNNEL_ID).get().getValue()));
final ChoiceNode addressFamily = (ChoiceNode) objectType.getChild(ADDRESS_FAMILY).get();
teLsp.setAddressFamily(serializeAddressFamily(addressFamily, addressFamily.getChild(IPV4_TUNNEL_SENDER_ADDRESS).isPresent()));
return teLsp.build();
}
Aggregations