Class BGPPeer

    • Constructor Detail

      • BGPPeer

        public BGPPeer​(BGPTableTypeRegistryConsumer tableTypeRegistry,
                       org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone neighborAddress,
                       String peerGroupName,
                       RIB rib,
                       PeerRole role,
                       ClusterIdentifier clusterId,
                       org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber localAs,
                       org.opendaylight.mdsal.binding.api.RpcProviderService rpcRegistry,
                       Set<TablesKey> afiSafisAdvertized,
                       Set<TablesKey> afiSafisGracefulAdvertized,
                       Map<TablesKey,​Integer> llGracefulTablesAdvertised,
                       BgpPeer bgpPeer)
    • Method Detail

      • instantiateServiceInstance

        public void instantiateServiceInstance()
      • close

        public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> close()
        Description copied from interface: Peer
        Close Peers and performs asynchronously DS clean up.
        Specified by:
        close in interface Peer
        Returns:
        future
      • onSessionUp

        public void onSessionUp​(BGPSession session)
        Description copied from interface: BGPSessionListener
        Fired when the session was established successfully.
        Specified by:
        onSessionUp in interface BGPSessionListener
        Parameters:
        session - Peer address families which we accepted
      • onSessionDown

        public void onSessionDown​(BGPSession session,
                                  Exception exc)
        Description copied from interface: BGPSessionListener
        Fired when the session went down because of an IO error. Implementation should take care of closing underlying session.
        Specified by:
        onSessionDown in interface BGPSessionListener
        Parameters:
        session - that went down
        exc - Exception that was thrown as the cause of session being down
      • onSessionTerminated

        public void onSessionTerminated​(BGPSession session,
                                        BGPTerminationReason cause)
        Description copied from interface: BGPSessionListener
        Fired when the session is terminated locally. The session has already been closed and transitioned to IDLE state. Any outstanding queued messages were not sent. The user should not attempt to make any use of the session.
        Specified by:
        onSessionTerminated in interface BGPSessionListener
        cause - the cause why the session went down
      • releaseConnection

        public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> releaseConnection()
        Description copied from interface: PeerRPCs
        Release Peer session.
        Specified by:
        releaseConnection in interface PeerRPCs
      • supportsTable

        public boolean supportsTable​(TablesKey tableKey)
        Description copied from interface: PeerTrackerInformation
        Returns 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:
        supportsTable in interface PeerTrackerInformation
        Parameters:
        tableKey - table
        Returns:
        true if the table is being advertized to the peer.
      • onTransactionChainFailed

        public void onTransactionChainFailed​(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain,
                                             org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction transaction,
                                             Throwable cause)
        Specified by:
        onTransactionChainFailed in interface org.opendaylight.mdsal.dom.api.DOMTransactionChainListener
      • onTransactionChainFailed

        public void onTransactionChainFailed​(org.opendaylight.mdsal.binding.api.TransactionChain chain,
                                             org.opendaylight.mdsal.binding.api.Transaction transaction,
                                             Throwable cause)
        Specified by:
        onTransactionChainFailed in interface org.opendaylight.mdsal.binding.api.TransactionChainListener
      • markUptodate

        public void markUptodate​(TablesKey tablesKey)
        Description copied from interface: BGPSessionListener
        Marks synchronization finished for given Table key.
        Specified by:
        markUptodate in interface BGPSessionListener
        Parameters:
        tablesKey - of the table where synchronization finished
      • restartGracefully

        public com.google.common.util.concurrent.ListenableFuture<?> restartGracefully​(long selectionDeferralTimerSeconds)
        Description copied from interface: PeerRPCs
        Perform graceful restart. Wait with route selection until EOR is received or selection-deferral-timer expires.
        Specified by:
        restartGracefully in interface PeerRPCs
        Parameters:
        selectionDeferralTimerSeconds - time to wait in seconds
      • getRawIdentifier

        public final byte[] getRawIdentifier()
        Description copied from interface: Peer
        Return the peer's BGP identifier as raw byte array.
        Specified by:
        getRawIdentifier in interface Peer
        Returns:
        byte[] raw identifier
      • onTransactionChainSuccessful

        public final void onTransactionChainSuccessful​(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain)
        Specified by:
        onTransactionChainSuccessful in interface org.opendaylight.mdsal.dom.api.DOMTransactionChainListener
      • onTransactionChainSuccessful

        public final void onTransactionChainSuccessful​(org.opendaylight.mdsal.binding.api.TransactionChain chain)
        Specified by:
        onTransactionChainSuccessful in interface org.opendaylight.mdsal.binding.api.TransactionChainListener
      • getName

        public final String getName()
        Description copied from interface: Peer
        Return peer's symbolic name.
        Specified by:
        getName in interface Peer
        Returns:
        symbolic name.
      • getLocalAs

        public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getLocalAs()
        Description copied from interface: PeerTrackerInformation
        Returns Local AS.
        Specified by:
        getLocalAs in interface PeerTrackerInformation
        Returns:
        AS
      • getDomChain

        public org.opendaylight.mdsal.dom.api.DOMTransactionChain getDomChain()
        Description copied from interface: PeerTransactionChain
        Returns Peer DOMTransactionChain.
        Specified by:
        getDomChain in interface PeerTransactionChain
        Returns:
        DOMTransactionChain
      • initializeRibOut

        public final <C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,​S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,​R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,​I extends org.opendaylight.yangtools.yang.binding.Identifier<R>> void initializeRibOut​(RouteEntryDependenciesContainer entryDep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<ActualBestPathRoutes<C,​S,​R,​I>> routesToStore)
        Description copied from interface: Peer
        Stores under peers rib Out already present routes, before proceed to process any new route advertizement.
        Specified by:
        initializeRibOut in interface Peer
        Parameters:
        entryDep - RouteEntryDependenciesContainer
        routesToStore - routes to be advertized.
      • refreshRibOut

        public final <C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,​S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,​R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,​I extends org.opendaylight.yangtools.yang.binding.Identifier<R>> void refreshRibOut​(RouteEntryDependenciesContainer entryDep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                         List<StaleBestPathRoute<C,​S,​R,​I>> staleRoutes,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                         List<AdvertizedRoute<C,​S,​R,​I>> newRoutes)
        Description copied from interface: Peer
        Update peers ribout after path selection processing.
        Specified by:
        refreshRibOut in interface Peer
        Parameters:
        entryDep - RouteEntryDependenciesContainer
        staleRoutes - routes to be removed.
        newRoutes - routes to be advertized.
      • reEvaluateAdvertizement

        public final <C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,​S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,​R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,​I extends org.opendaylight.yangtools.yang.binding.Identifier<R>> void reEvaluateAdvertizement​(RouteEntryDependenciesContainer entryDep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   List<ActualBestPathRoutes<C,​S,​R,​I>> routesToStore)
        Description copied from interface: Peer
        Applies 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:
        reEvaluateAdvertizement in interface Peer
        Parameters:
        entryDep - RouteEntryDependenciesContainer
        routesToStore - routes to be updated.