use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.prefix.sid.tlv.flags.isis.prefix.flags._case.IsisPrefixFlags in project bgpcep by opendaylight.
the class SrPrefixAttributesParser method serializePrefixFlags.
private static BitArray serializePrefixFlags(final Flags flags, final SidLabelIndex sidLabelIndex) {
final BitArray bitFlags = new BitArray(FLAGS_SIZE);
SidLabelIndexParser.setFlags(sidLabelIndex, bitFlags, VALUE, LOCAL);
if (flags instanceof OspfPrefixFlagsCase) {
final OspfPrefixFlags ospfFlags = ((OspfPrefixFlagsCase) flags).getOspfPrefixFlags();
bitFlags.set(NO_PHP_OSPF, ospfFlags.getNoPhp());
bitFlags.set(MAPPING_SERVER, ospfFlags.getMappingServer());
bitFlags.set(EXPLICIT_NULL, ospfFlags.getExplicitNull());
} else if (flags instanceof IsisPrefixFlagsCase) {
final IsisPrefixFlags isisFlags = ((IsisPrefixFlagsCase) flags).getIsisPrefixFlags();
bitFlags.set(RE_ADVERTISEMENT, isisFlags.getReadvertisement());
bitFlags.set(NODE_SID, isisFlags.getNodeSid());
bitFlags.set(NO_PHP, isisFlags.getNoPhp());
bitFlags.set(EXPLICIT_NULL, isisFlags.getExplicitNull());
}
return bitFlags;
}
Aggregations