Search in sources :

Example 1 with OspfBindingFlagsCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sid.tlv.flags.OspfBindingFlagsCase in project bgpcep by opendaylight.

the class BindingSidLabelParser method serializeBindingSidFlags.

private static BitArray serializeBindingSidFlags(final Flags flags) {
    final BitArray bitFlags = new BitArray(FLAGS_SIZE);
    if (flags instanceof IsisBindingFlagsCase) {
        final IsisBindingFlagsCase isisFlags = (IsisBindingFlagsCase) flags;
        bitFlags.set(AFI, isisFlags.isAddressFamily());
        bitFlags.set(MIRROR_CONTEXT, isisFlags.isMirrorContext());
        bitFlags.set(SPREAD_TLV, isisFlags.isSpreadTlv());
        bitFlags.set(LEAKED, isisFlags.isLeakedFromLevel2());
        bitFlags.set(ATTACHED, isisFlags.isAttachedFlag());
    } else if (flags instanceof OspfBindingFlagsCase) {
        final OspfBindingFlagsCase ospfFlags = (OspfBindingFlagsCase) flags;
        bitFlags.set(MIRROR_CONTEXT_OSPF, ospfFlags.isMirroring());
    }
    return bitFlags;
}
Also used : OspfBindingFlagsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sid.tlv.flags.OspfBindingFlagsCase) IsisBindingFlagsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sid.tlv.flags.IsisBindingFlagsCase) BitArray(org.opendaylight.protocol.util.BitArray)

Aggregations

BitArray (org.opendaylight.protocol.util.BitArray)1 IsisBindingFlagsCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sid.tlv.flags.IsisBindingFlagsCase)1 OspfBindingFlagsCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sid.tlv.flags.OspfBindingFlagsCase)1