σ α¬_Zc@s6ddlmZmZmZdefd„ƒYZdS(i(tNamespacedClientt query_paramst _make_patht ClusterClientc Bs+eZedddddddddƒ ddd „ƒZeddƒdd „ƒZed d d dddƒdddd„ƒZed dƒddd„ƒZeddddddƒddd„ƒZed dddƒdd„ƒZ ed ddƒddd„ƒZ eddƒddd„ƒZ RS(tleveltlocaltmaster_timeoutttimeouttwait_for_active_shardstwait_for_eventstwait_for_no_relocating_shardstwait_for_nodestwait_for_statuscCs%|jjdtdd|ƒd|ƒS(s4 Get a very simple status on the health of the cluster. ``_ :arg index: Limit the information returned to a specific index :arg level: Specify the level of detail for returned information, default 'cluster', valid choices are: 'cluster', 'indices', 'shards' :arg local: Return local information, do not retrieve the state from master node (default: false) :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout :arg wait_for_active_shards: Wait until the specified number of shards is active :arg wait_for_events: Wait until all currently queued events with the given priority are processed, valid choices are: 'immediate', 'urgent', 'high', 'normal', 'low', 'languid' :arg wait_for_no_relocating_shards: Whether to wait until there are no relocating shards in the cluster :arg wait_for_nodes: Wait until the specified number of nodes is available :arg wait_for_status: Wait until cluster is in a specific state, default None, valid choices are: 'green', 'yellow', 'red' tGETt_clusterthealthtparams(t transporttperform_requestR(tselftindexR((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyRscCs|jjddd|ƒS(sη The pending cluster tasks API returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed. ``_ :arg local: Return local information, do not retrieve the state from master node (default: false) :arg master_timeout: Specify timeout for connection to master R s/_cluster/pending_tasksR(RR(RR((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyt pending_tasks#s tallow_no_indicestexpand_wildcardst flat_settingstignore_unavailablecCs>|r| rd}n|jjdtdd||ƒd|ƒS(sΉ Get a comprehensive state information of the whole cluster. ``_ :arg metric: Limit the information returned to the specified metrics :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) :arg expand_wildcards: Whether to expand wildcard expression to concrete indices that are open, closed or both., default 'open', valid choices are: 'open', 'closed', 'none', 'all' :arg flat_settings: Return settings in flat format (default: false) :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg local: Return local information, do not retrieve the state from master node (default: false) :arg master_timeout: Specify timeout for connection to master t_allR RtstateR(RRR(RtmetricRR((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyR2s  cCs7d}|rtd|ƒ}n|jjd|d|ƒS(s΄ The Cluster Stats API allows to retrieve statistics from a cluster wide perspective. The API returns basic index metrics and information about the current nodes that form the cluster. ``_ :arg node_id: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes :arg flat_settings: Return settings in flat format (default: false) :arg timeout: Explicit operation timeout s/_cluster/statss_cluster/stats/nodesR R(RRR(Rtnode_idRturl((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pytstatsNstdry_runtexplainRt retry_failedcCs|jjddd|d|ƒS(sδ Explicitly execute a cluster reroute allocation command including specific commands. ``_ :arg body: The definition of `commands` to perform (`move`, `cancel`, `allocate`) :arg dry_run: Simulate the operation only and return the resulting state :arg explain: Return an explanation of why the commands can or cannot be executed :arg master_timeout: Explicit operation timeout for connection to master node :arg metric: Limit the information returned to the specified metrics. Defaults to all but metadata, valid choices are: '_all', 'blocks', 'metadata', 'nodes', 'routing_table', 'master_node', 'version' :arg retry_failed: Retries allocation of shards that are blocked due to too many subsequent allocation failures :arg timeout: Explicit operation timeout tPOSTs/_cluster/rerouteRtbody(RR(RR$R((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pytreroutebstinclude_defaultscCs|jjddd|ƒS(sΪ Get cluster settings. ``_ :arg flat_settings: Return settings in flat format (default: false) :arg include_defaults: Whether to return all default clusters setting., default False :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout R s/_cluster/settingsR(RR(RR((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyt get_settingszscCs|jjddd|d|ƒS(s Update cluster wide specific settings. ``_ :arg body: The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). :arg flat_settings: Return settings in flat format (default: false) :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout tPUTs/_cluster/settingsRR$(RR(RR$R((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyt put_settings‹s tinclude_disk_infotinclude_yes_decisionscCs|jjddd|d|ƒS(sΝ ``_ :arg body: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' :arg include_disk_info: Return information about disk usage and shard sizes (default: false) :arg include_yes_decisions: Return 'YES' decisions in explanation (default: false) R s/_cluster/allocation/explainRR$(RR(RR$R((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pytallocation_explain›s N( t__name__t __module__RtNoneRRRRR%R'R)R,(((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyRs*        N(tutilsRRRR(((sw/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/client/cluster.pyts