(self, version)
return health_url, stats_url, pshard_stats_url, pending_tasks_url, slm_url
Compute the URLs we need to hit depending on the running ES version
Compute the URLs we need to hit depending on the running ES version
Compute the URLs we need to hit depending on the running ES version
def _get_urls(self, version):
        """
        Compute the URLs we need to hit depending on the running ES version
        """
        pshard_stats_url = "/_stats"
        health_url = "/_cluster/health"
        slm_url = None

        if version >= [0, 90, 10]:
            pending_tasks_url = "/_cluster/pending_tasks"
            stats_url = "/_nodes/stats" if self._config.cluster_stats else "/_nodes/_local/stats"
            if version < [5, 0, 0]:
                # version 5 errors out if the `all` parameter is set
                stats_url += "?all=true"
            if version >= [7, 4, 0] and self._config.slm_stats:
                slm_url = "/_slm/policy"
        else:
            # legacy
            pending_tasks_url = None
            stats_url = (
                "/_cluster/nodes/stats?all=true"
                if self._config.cluster_stats
                else "/_cluster/nodes/_local/stats?all=true"
            )

        return health_url, stats_url, pshard_stats_url, pending_tasks_url, slm_url
def _get_urls ( self , version ) : pshard_stats_url = "/_stats" health_url = "/_cluster/health" slm_url = None if version >= [ 0 , 90 , 10 ] : pending_tasks_url = "/_cluster/pending_tasks" stats_url = "/_nodes/stats" if self . _config . cluster_stats else "/_nodes/_local/stats" if version < [ 5 , 0 , 0 ] : # version 5 errors out if the `all` parameter is set stats_url += "?all=true" if version >= [ 7 , 4 , 0 ] and self . _config . slm_stats : slm_url = "/_slm/policy" else : # legacy pending_tasks_url = None stats_url = ( "/_cluster/nodes/stats?all=true" if self . _config . cluster_stats else "/_cluster/nodes/_local/stats?all=true" ) return health_url , stats_url , pshard_stats_url , pending_tasks_url , slm_url