def comm_all_rt_nlris(self, peer):
        """Shares/communicates current best rt_nlri paths with this peers.

        Can be used to send initial updates after we have established session
        with `peer` with which RTC capability is valid. Takes into account
        peers RTC_AS setting and filters all RT NLRIs whose origin AS do not
        match this setting.
        """
        # First check if for this peer mpbgp-rtc is valid.
        if not peer.is_mbgp_cap_valid(RF_RTC_UC):
            return

        neigh_conf = self._neighbors_conf.get_neighbor_conf(peer.ip_address)
        peer_rtc_as = neigh_conf.rtc_as
        # Iterate over all RT_NLRI destination communicate qualifying RT_NLRIs
        rtc_table = self._table_manager.get_rtc_table()
        for dest in rtc_table.values():
            best_path = dest.best_path
            # Ignore a destination that currently does not have best path
            if not best_path:
                continue

            # If this is a local path
            if best_path.source is None:
                # Check RT NLRI's origin AS matches peer RTC_AS setting
                origin_as = best_path.nlri.origin_as
                if origin_as == peer_rtc_as:
                    peer.communicate_path(best_path)
            else:
                # Communicate all remote RT NLRIs
                peer.communicate_path(best_path)

        # Also communicate EOR as per RFC
        peer.enque_end_of_rib(RF_RTC_UC)
def comm_all_rt_nlris ( self , peer ) : if not peer . is_mbgp_cap_valid ( RF_RTC_UC ) : return neigh_conf = self . _neighbors_conf . get_neighbor_conf ( peer . ip_address ) peer_rtc_as = neigh_conf . rtc_as rtc_table = self . _table_manager . get_rtc_table ( ) for dest in rtc_table . values ( ) : best_path = dest . best_path if not best_path : continue if best_path . source is None : origin_as = best_path . nlri . origin_as if origin_as == peer_rtc_as : peer . communicate_path ( best_path ) else : peer . communicate_path ( best_path ) peer . enque_end_of_rib ( RF_RTC_UC )
Shares/communicates current best rt_nlri paths with this peers.

        Can be used to send initial updates after we have established session
        with `peer` with which RTC capability is valid. Takes into account
        peers RTC_AS setting and filters all RT NLRIs whose origin AS do not
        match this setting.