Skip to content

Commit 9cdcc5b

Browse files
committed
Adding new params for cluster.health and cluster.allocation_explain
1 parent 99c91b7 commit 9cdcc5b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

elasticsearch/client/cluster.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class ClusterClient(NamespacedClient):
44
@query_params('level', 'local', 'master_timeout', 'timeout',
5-
'wait_for_active_shards', 'wait_for_nodes',
5+
'wait_for_active_shards', 'wait_for_events', 'wait_for_nodes',
66
'wait_for_relocating_shards', 'wait_for_status')
77
def health(self, index=None, params=None):
88
"""
@@ -19,6 +19,9 @@ def health(self, index=None, params=None):
1919
:arg timeout: Explicit operation timeout
2020
:arg wait_for_active_shards: Wait until the specified number of shards
2121
is active
22+
:arg wait_for_events: Wait until all currently queued events with the
23+
given priorty are processed, valid choices are: 'immediate',
24+
'urgent', 'high', 'normal', 'low', 'languid'
2225
:arg wait_for_nodes: Wait until the specified number of nodes is
2326
available
2427
:arg wait_for_relocating_shards: Wait until the specified number of
@@ -151,13 +154,15 @@ def put_settings(self, body=None, params=None):
151154
return self.transport.perform_request('PUT', '/_cluster/settings',
152155
params=params, body=body)
153156

154-
@query_params('include_yes_decisions')
157+
@query_params('include_disk_info', 'include_yes_decisions')
155158
def allocation_explain(self, body=None, params=None):
156159
"""
157160
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_
158161
159162
:arg body: The index, shard, and primary flag to explain. Empty means
160163
'explain the first unassigned shard'
164+
:arg include_disk_info: Return information about disk usage and shard
165+
sizes (default: false)
161166
:arg include_yes_decisions: Return 'YES' decisions in explanation
162167
(default: false)
163168
"""

0 commit comments

Comments
 (0)