use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.linkstate.ObjectType in project bgpcep by opendaylight.
the class NodeNlriParser method parseObjectType.
@Override
protected ObjectType parseObjectType(final ByteBuf buffer) {
final NodeCaseBuilder builder = new NodeCaseBuilder();
builder.setNodeDescriptors(new NodeDescriptorsBuilder((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.NodeIdentifier) SimpleNlriTypeRegistry.getInstance().parseTlv(buffer)).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.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(ByteBufUtils.readUint16(buffer)));
builder.setLspId(new LspId(Uint32.valueOf(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.rev200120.linkstate.ObjectType in project bgpcep by opendaylight.
the class AbstractPrefixNlriParser method parseObjectType.
@Override
protected final ObjectType parseObjectType(final ByteBuf buffer) {
final NodeIdentifier oType = SimpleNlriTypeRegistry.getInstance().parseTlv(buffer);
final PrefixCaseBuilder builder = new PrefixCaseBuilder();
builder.setAdvertisingNodeDescriptors(new AdvertisingNodeDescriptorsBuilder(oType).build());
builder.setPrefixDescriptors(parsePrefixDescriptor(buffer));
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.linkstate.ObjectType in project bgpcep by opendaylight.
the class AbstractPrefixNlriParser method serializeObjectType.
@Override
protected final void serializeObjectType(final ObjectType objectType, final ByteBuf buffer) {
final PrefixCase prefix = (PrefixCase) objectType;
SimpleNlriTypeRegistry.getInstance().serializeTlv(AdvertisingNodeDescriptors.QNAME, prefix.getAdvertisingNodeDescriptors(), buffer);
serializePrefixDescriptor(prefix.getPrefixDescriptors(), buffer);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.linkstate.ObjectType in project bgpcep by opendaylight.
the class LinkstateNlriParser method serializeNodeDescriptor.
private static void serializeNodeDescriptor(final CLinkstateDestinationBuilder builder, final ChoiceNode objectType) {
final NodeCaseBuilder nodeBuilder = new NodeCaseBuilder();
// node descriptors
nodeBuilder.setNodeDescriptors(NodeNlriParser.serializeNodeDescriptors((ContainerNode) objectType.findChildByArg(NODE_DESCRIPTORS_NID).get()));
builder.setObjectType(nodeBuilder.build());
}
Aggregations