Search in sources :

Example 21 with ProtocolId

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.ProtocolId in project bgpcep by opendaylight.

the class SrNodeAttributesParser method parseSrCapabilities.

public static SrCapabilities parseSrCapabilities(final ByteBuf buffer, final ProtocolId protocol) {
    final SrCapabilitiesBuilder builder = new SrCapabilitiesBuilder();
    final BitArray flags = BitArray.valueOf(buffer, FLAGS_SIZE);
    setFlags(flags, protocol, builder);
    buffer.skipBytes(RESERVERED);
    builder.setRangeSize((long) buffer.readUnsignedMedium());
    builder.setSidLabelIndex(SidLabelIndexParser.parseSidSubTlv(buffer));
    return builder.build();
}
Also used : BitArray(org.opendaylight.protocol.util.BitArray) SrCapabilitiesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.node.state.SrCapabilitiesBuilder)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)9 Test (org.junit.Test)6 BitArray (org.opendaylight.protocol.util.BitArray)6 BigInteger (java.math.BigInteger)5 ArrayList (java.util.ArrayList)5 AsNumber (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber)5 DomainIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.DomainIdentifier)5 NodeIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier)5 ChoiceNode (org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode)4 UnkeyedListEntryNode (org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode)4 ImmutableLeafNodeBuilder (org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder)4 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)3 Identifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.Identifier)3 CLinkstateDestination (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.linkstate.destination.CLinkstateDestination)3 IsoSystemIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.IsoSystemIdentifier)3 AreaIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.AreaIdentifier)2 Ipv4InterfaceIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.Ipv4InterfaceIdentifier)2 Ipv4RouterIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.Ipv4RouterIdentifier)2 Ipv6RouterIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.Ipv6RouterIdentifier)2 OspfInterfaceIdentifier (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.OspfInterfaceIdentifier)2