Search in sources :

Example 1 with PrefixSidCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.PrefixSidCase in project bgpcep by opendaylight.

the class Ipv4PrefixSidParser method serializeSubTlv.

@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
    checkArgument(bindingSubTlv instanceof PrefixSidCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
    final PrefixSid prefix = ((PrefixSidCase) bindingSubTlv).getPrefixSid();
    final ByteBuf buffer = Unpooled.buffer();
    SrPrefixAttributesParser.serializePrefixAttributes(prefix.getFlags(), prefix.getAlgorithm(), prefix.getSidLabelIndex(), buffer);
    TlvUtil.writeTLV(getType(), buffer, aggregator);
}
Also used : PrefixSidCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.PrefixSidCase) PrefixSid(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.prefix.sid._case.PrefixSid) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)1 PrefixSidCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.PrefixSidCase)1 PrefixSid (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.prefix.sid._case.PrefixSid)1