use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sid.tlv.flags.IsisBindingFlagsCase 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;
}
Aggregations