Class ApplicationPeer
java.lang.Object
org.opendaylight.protocol.bgp.rib.DefaultRibReference
org.opendaylight.protocol.bgp.rib.impl.state.BGPPeerStateImpl
org.opendaylight.protocol.bgp.rib.impl.ApplicationPeer
- All Implemented Interfaces:
com.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>,org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener,BGPMessagesListener,PeerTransactionChain,RibReference,Peer,PeerTrackerInformation,BGPRouteEntryImportParameters,RouteTargetMembershipConsumer,BGPAfiSafiState,BGPErrorHandlingState,BGPGracelfulRestartState,BGPLlGracelfulRestartState,BGPPeerMessagesState,BGPPeerState,BGPPeerStateProvider,InstanceReference<Rib>
public class ApplicationPeer
extends BGPPeerStateImpl
implements org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener
Application Peer is a special case of BGP peer. It serves as an interface for user to advertise user routes to ODL
and through ODL to other BGP peers.
This peer has it's own RIB, where it stores all user routes. This RIB is located in configurational datastore. Routes are added through RESTCONF.
They are then processed as routes from any other peer, through AdjRib, EffectiveRib, LocRib and if they are advertised further, through AdjRibOut.
For purposed of import policies such as Best Path Selection, application peer needs to have a BGP-ID that is configurable.
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationPeer(BGPTableTypeRegistryConsumer tableTypeRegistry, ApplicationRibId applicationRibId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone ipAddress, RIB rib) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> close()Close Peers and performs asynchronously DS clean up.final BGPAfiSafiStateAfi Safi Operational State.final BGPErrorHandlingStateError Handling State.BGP Session Operational State.BGP Operation Timers State.BGP Operational Transport State.final ClusterIdentifierReturns Cluster Id.org.opendaylight.mdsal.dom.api.DOMTransactionChainReturns Peer DOMTransactionChain.final ClusterIdentifierPeer id of Peer route entry announcer.final PeerIdPeer id of Peer route entry announcer.final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumberPeer local AS of route entry announcer.final PeerRolePeer id of Peer route entry announcer.final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumberReturns Local AS.Returns list of Route target advertized per Peer.final StringgetName()Return peer's symbolic name.final PeerIdReturns Peer id.org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifiergetRibOutIId(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates tablekey) Creates Table Adj Rib Out Instance identifier.final PeerRolegetRole()Returns Peer Role.getSupportedAddPathTables(TablesKey tableKey) Returns AddPath support configuration if supported, otherwise null.final <C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>>
voidinitializeRibOut(RouteEntryDependenciesContainer entryDep, List<ActualBestPathRoutes<C, S>> routesToStore) Stores under peers rib Out already present routes, before proceed to process any new route advertizement.voidinstantiateServiceInstance(org.opendaylight.mdsal.dom.api.DOMDataBroker.DataTreeChangeExtension dataTreeChangeService, org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier appPeerDOMId) voidonDataTreeChanged(List<org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate> changes) Routes come from application RIB that is identified by (configurable) name.voidvoidfinal voidonSuccess(org.opendaylight.yangtools.yang.common.Empty value) final <C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>>
voidreEvaluateAdvertizement(RouteEntryDependenciesContainer entryDep, List<ActualBestPathRoutes<C, S>> routesToStore) Applies all policies through all present routes, and advertize/withdraws based on new results.final <C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>>
voidrefreshRibOut(RouteEntryDependenciesContainer entryDep, List<StaleBestPathRoute> staleRoutes, List<AdvertizedRoute<C, S>> newRoutes) Update peers ribout after path selection processing.booleansupportsAddPathSupported(TablesKey tableKey) Returns if peer supports Additional Path for specific table.booleansupportsTable(TablesKey tableKey) Returns true if we have advertized support for a table, i.e.Methods inherited from class org.opendaylight.protocol.bgp.rib.impl.state.BGPPeerStateImpl
getAfiSafisAdvertized, getAfiSafisReceived, getBGPGracelfulRestart, getBGPPeerMessagesState, getErroneousUpdateReceivedCount, getGroupId, getLlGracefulRestartTimer, getMode, getNeighborAddress, getNotificationMessagesReceivedCount, getNotificationMessagesSentCount, getPeerRestartTime, getPeerState, getPrefixesInstalledCount, getPrefixesReceivedCount, getPrefixesSentCount, getTotalPrefixes, getUpdateMessagesReceivedCount, getUpdateMessagesSentCount, isActive, isAfiSafiSupported, isGracefulRestartAdvertized, isGracefulRestartReceived, isLlGracefulRestartAdvertised, isLlGracefulRestartReceived, isLocalRestarting, isPeerRestarting, messageReceived, messageSent, registerPrefixesCounters, registerPrefixesSentCounter, resetState, setActive, setAdvertizedGracefulRestartTableTypes, setAdvertizedLlGracefulRestartTableTypes, setAfiSafiGracefulRestartState, setLocalRestartingState, setRestartingStateMethods inherited from class org.opendaylight.protocol.bgp.rib.DefaultRibReference
getInstanceIdentifierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opendaylight.protocol.bgp.rib.spi.state.BGPPeerState
getTotalPathsCountMethods inherited from interface org.opendaylight.protocol.bgp.rib.RibReference
getInstanceIdentifier
-
Constructor Details
-
ApplicationPeer
public ApplicationPeer(BGPTableTypeRegistryConsumer tableTypeRegistry, ApplicationRibId applicationRibId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone ipAddress, RIB rib)
-
-
Method Details
-
instantiateServiceInstance
public void instantiateServiceInstance(org.opendaylight.mdsal.dom.api.DOMDataBroker.DataTreeChangeExtension dataTreeChangeService, org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier appPeerDOMId) -
getMemberships
Description copied from interface:RouteTargetMembershipConsumerReturns list of Route target advertized per Peer.- Specified by:
getMembershipsin interfaceRouteTargetMembershipConsumer
-
onInitialData
public void onInitialData()- Specified by:
onInitialDatain interfaceorg.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener
-
onDataTreeChanged
public void onDataTreeChanged(List<org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate> changes) Routes come from application RIB that is identified by (configurable) name. Each route is pushed into AdjRibsInWriter with it's whole context. In this method, it doesn't matter if the routes are removed or added, this will be determined in LocRib.- Specified by:
onDataTreeChangedin interfaceorg.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener
-
close
public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> close()Description copied from interface:PeerClose Peers and performs asynchronously DS clean up. -
supportsAddPathSupported
Description copied from interface:PeerTrackerInformationReturns if peer supports Additional Path for specific table.- Specified by:
supportsAddPathSupportedin interfacePeerTrackerInformation- Parameters:
tableKey- table- Returns:
- true if Additional Path is supported for defined table
-
getSupportedAddPathTables
Description copied from interface:PeerTrackerInformationReturns AddPath support configuration if supported, otherwise null.- Specified by:
getSupportedAddPathTablesin interfacePeerTrackerInformation- Parameters:
tableKey- table- Returns:
- AddPath support configuration if supported, otherwise null
-
supportsTable
Description copied from interface:PeerTrackerInformationReturns true if we have advertized support for a table, i.e. any prefix from this table should be subject to export towards the peer.- Specified by:
supportsTablein interfacePeerTrackerInformation- Parameters:
tableKey- table- Returns:
- true if the table is being advertized to the peer.
-
getRibOutIId
public org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier getRibOutIId(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates tablekey) Description copied from interface:PeerTrackerInformationCreates Table Adj Rib Out Instance identifier.- Specified by:
getRibOutIIdin interfacePeerTrackerInformation- Parameters:
tablekey- table key- Returns:
- instance identifier.
-
onFailure
- Specified by:
onFailurein interfacecom.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>
-
getBGPSessionState
Description copied from interface:BGPPeerStateBGP Session Operational State.- Specified by:
getBGPSessionStatein interfaceBGPPeerState- Returns:
- BGPSessionState
-
getBGPTimersState
Description copied from interface:BGPPeerStateBGP Operation Timers State.- Specified by:
getBGPTimersStatein interfaceBGPPeerState- Returns:
- BGPTimersState
-
getBGPTransportState
Description copied from interface:BGPPeerStateBGP Operational Transport State.- Specified by:
getBGPTransportStatein interfaceBGPPeerState- Returns:
- BGPTransportState
-
getPeerId
Description copied from interface:PeerTrackerInformationReturns Peer id.- Specified by:
getPeerIdin interfacePeerTrackerInformation- Returns:
- PeerID
-
getRole
Description copied from interface:PeerTrackerInformationReturns Peer Role.- Specified by:
getRolein interfacePeerTrackerInformation- Returns:
- PeerRole
-
getFromPeerRole
Description copied from interface:BGPRouteEntryImportParametersPeer id of Peer route entry announcer.- Specified by:
getFromPeerRolein interfaceBGPRouteEntryImportParameters- Returns:
- peer Role of announcer Peer
-
getFromPeerId
Description copied from interface:BGPRouteEntryImportParametersPeer id of Peer route entry announcer.- Specified by:
getFromPeerIdin interfaceBGPRouteEntryImportParameters- Returns:
- peer Id of announcer Peer
-
getFromClusterId
Description copied from interface:BGPRouteEntryImportParametersPeer id of Peer route entry announcer.- Specified by:
getFromClusterIdin interfaceBGPRouteEntryImportParameters- Returns:
- peer Id of announcer Peer
-
onSuccess
public final void onSuccess(org.opendaylight.yangtools.yang.common.Empty value) - Specified by:
onSuccessin interfacecom.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>
-
getBGPErrorHandlingState
Description copied from interface:BGPPeerStateError Handling State.- Specified by:
getBGPErrorHandlingStatein interfaceBGPPeerState- Returns:
- ErrorHandlingState
-
getBGPAfiSafiState
Description copied from interface:BGPPeerStateAfi Safi Operational State.- Specified by:
getBGPAfiSafiStatein interfaceBGPPeerState- Returns:
- AfiSafiState
-
getFromPeerLocalAs
public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getFromPeerLocalAs()Description copied from interface:BGPRouteEntryImportParametersPeer local AS of route entry announcer.- Specified by:
getFromPeerLocalAsin interfaceBGPRouteEntryImportParameters- Returns:
- peer Local AS
-
getName
Description copied from interface:PeerReturn peer's symbolic name. -
getClusterId
Description copied from interface:PeerTrackerInformationReturns Cluster Id.- Specified by:
getClusterIdin interfacePeerTrackerInformation- Returns:
- Cluster Id
-
getLocalAs
public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getLocalAs()Description copied from interface:PeerTrackerInformationReturns Local AS.- Specified by:
getLocalAsin interfacePeerTrackerInformation- Returns:
- AS
-
getDomChain
public org.opendaylight.mdsal.dom.api.DOMTransactionChain getDomChain()Description copied from interface:PeerTransactionChainReturns Peer DOMTransactionChain.- Specified by:
getDomChainin interfacePeerTransactionChain- Returns:
- DOMTransactionChain
-
initializeRibOut
public final <C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> void initializeRibOut(RouteEntryDependenciesContainer entryDep, List<ActualBestPathRoutes<C, S>> routesToStore) Description copied from interface:PeerStores under peers rib Out already present routes, before proceed to process any new route advertizement.- Specified by:
initializeRibOutin interfacePeer- Parameters:
entryDep- RouteEntryDependenciesContainerroutesToStore- routes to be advertized.
-
refreshRibOut
public final <C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> void refreshRibOut(RouteEntryDependenciesContainer entryDep, List<StaleBestPathRoute> staleRoutes, List<AdvertizedRoute<C, S>> newRoutes) Description copied from interface:PeerUpdate peers ribout after path selection processing.- Specified by:
refreshRibOutin interfacePeer- Parameters:
entryDep- RouteEntryDependenciesContainerstaleRoutes- routes to be removed.newRoutes- routes to be advertized.
-
reEvaluateAdvertizement
public final <C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> void reEvaluateAdvertizement(RouteEntryDependenciesContainer entryDep, List<ActualBestPathRoutes<C, S>> routesToStore) Description copied from interface:PeerApplies all policies through all present routes, and advertize/withdraws based on new results. Scenario would be for example a removal of RT membership. And reprocess VPN routes.- Specified by:
reEvaluateAdvertizementin interfacePeer- Parameters:
entryDep- RouteEntryDependenciesContainerroutesToStore- routes to be updated.
-