import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import org.opendaylight.protocol.bgp.rib.spi.RibSupportUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerRole;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.bgp.rib.rib.peer.SupportedTables;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.TablesKey;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
}
boolean isTableSupported(final PeerId peerId, final TablesKey tablesKey) {
- return this.peerTables.get(peerId).contains(tablesKey);
+ return this.peerTables.get(peerId).contains(RibSupportUtils.toYangKey(SupportedTables.QNAME, tablesKey));
}
}
\ No newline at end of file
if (peerGroup != null) {
final ContainerNode attributes = entry == null ? null : entry.attributes();
final PeerId peerId = key.getPeerId();
- if (!this.peerPolicyTracker.isTableSupported(peerId, this.localTablesKey)) {
- LOG.trace("Route rejected, peer {} does not support this table type {}", peerId, this.tableKey);
- continue;
- }
final ContainerNode effectiveAttributes = peerGroup.effectiveAttributes(peerId, attributes);
for (final Entry<PeerId, YangInstanceIdentifier> pid : peerGroup.getPeers()) {
+ if (!this.peerPolicyTracker.isTableSupported(pid.getKey(), this.localTablesKey)) {
+ LOG.trace("Route rejected, peer {} does not support this table type {}", pid.getKey(), this.localTablesKey);
+ continue;
+ }
final YangInstanceIdentifier routeTarget = this.ribSupport.routePath(pid.getValue().node(AdjRibOut.QNAME).node(Tables.QNAME).node(this.tableKey).node(ROUTES_IDENTIFIER), key.getRouteId());
if (effectiveAttributes != null && value != null && !peerId.equals(pid.getKey())) {
LOG.debug("Write route {} to peers AdjRibsOut {}", value, pid.getKey());