2 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.protocol.bgp.rib.spi;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.SendReceive;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.PeerId;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.PeerRole;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier;
20 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
23 * Exposes information required from peer to PeerTracker.
25 public interface PeerTrackerInformation {
36 * Returns if peer supports Additional Path for specific table.
38 * @param tableKey table
39 * @return true if Additional Path is supported for defined table
41 default boolean supportsAddPathSupported(@Nonnull TablesKey tableKey) {
42 final SendReceive sendReceive = getSupportedAddPathTables(tableKey);
43 return sendReceive != null && (sendReceive.equals(SendReceive.Both) || sendReceive.equals(SendReceive.Receive));
47 * Returns AddPath support configuration if supported, otherwise null.
49 * @param tableKey table
50 * @return AddPath support configuration if supported, otherwise null
53 SendReceive getSupportedAddPathTables(@Nonnull TablesKey tableKey);
56 * Returns if peer supports table.
58 * @param tableKey table
59 * @return true if Additional Path is supported for defined table
61 boolean supportsTable(@Nonnull TablesKey tableKey);
64 * Creates Table Adj Rib Out Instance identifier.
66 * @param tablekey table key
67 * @return instance identifier.
70 KeyedInstanceIdentifier<Tables, TablesKey> getRibOutIId(@Nonnull TablesKey tablekey);
86 ClusterIdentifier getClusterId();
94 AsNumber getLocalAs();