use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.adj.flags.flags.OspfAdjFlagsCase in project bgpcep by opendaylight.
the class SrLinkAttributesParser method serializeAdjFlags.
private static BitArray serializeAdjFlags(final Flags flags, final SidLabelIndex sidLabelIndex) {
final BitArray bitFlags = new BitArray(FLAGS_BITS_SIZE);
if (flags instanceof OspfAdjFlagsCase) {
final OspfAdjFlagsCase ospfFlags = (OspfAdjFlagsCase) flags;
bitFlags.set(BACKUP_OSPF, ospfFlags.isBackup());
bitFlags.set(SET_OSPF, ospfFlags.isSet());
SidLabelIndexParser.setFlags(sidLabelIndex, bitFlags, VALUE_OSPF, LOCAL_OSPF);
} else if (flags instanceof IsisAdjFlagsCase) {
final IsisAdjFlagsCase isisFlags = (IsisAdjFlagsCase) flags;
bitFlags.set(ADDRESS_FAMILY_FLAG, isisFlags.isAddressFamily());
bitFlags.set(BACKUP_ISIS, isisFlags.isBackup());
bitFlags.set(SET_ISIS, isisFlags.isSet());
SidLabelIndexParser.setFlags(sidLabelIndex, bitFlags, VALUE_ISIS, LOCAL_ISIS);
} else if (flags == null) {
SidLabelIndexParser.setFlags(sidLabelIndex, bitFlags, VALUE_EPE, LOCAL_EPE);
}
return bitFlags;
}
Aggregations