use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp.capabilities.AddPathCapability in project bgpcep by opendaylight.
the class OpenConfigMappingUtil method toAddPathCapability.
static List<AddressFamilies> toAddPathCapability(final Collection<AfiSafi> afiSafis, final BGPTableTypeRegistryConsumer tableTypeRegistry) {
final List<AddressFamilies> addPathCapability = new ArrayList<>();
for (final AfiSafi afiSafi : afiSafis) {
final BgpNeighborAddPathsConfig afiSafi1 = afiSafi.augmentation(NeighborAddPathsConfig.class);
final BgpTableType bgpTableType = tableTypeRegistry.getTableType(afiSafi.getAfiSafiName());
if (afiSafi1 != null && bgpTableType != null) {
final AddressFamiliesBuilder builder = new AddressFamiliesBuilder(bgpTableType);
builder.setSendReceive(toSendReceiveMode(afiSafi1));
addPathCapability.add(builder.build());
}
}
return addPathCapability;
}
Aggregations