From cfec19afd872875d4f0ee58a1ea0ff43c8ca451a Mon Sep 17 00:00:00 2001 From: Glen Smith Date: Wed, 11 Oct 2017 14:16:50 -0600 Subject: [PATCH] Add `bytes` param to cat.shards and cat.segments (#654) --- elasticsearch/client/cat.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elasticsearch/client/cat.py b/elasticsearch/client/cat.py index 8e77c794..5b3801a1 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -201,7 +201,7 @@ class CatClient(NamespacedClient): return self.transport.perform_request('GET', _make_path('_cat', 'recovery', index), params=params) - @query_params('format', 'h', 'help', 'local', 'master_timeout', 's', 'v') + @query_params('bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v') def shards(self, index=None, params=None): """ The shards command is the detailed view of what nodes contain which shards. @@ -209,6 +209,8 @@ class CatClient(NamespacedClient): :arg index: A comma-separated list of index names to limit the returned information + :arg bytes: The unit in which to display byte values, valid choices are: + 'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb' :arg format: a short version of the Accept header, e.g. json, yaml :arg h: Comma-separated list of column names to display :arg help: Return help information, default False @@ -223,7 +225,7 @@ class CatClient(NamespacedClient): return self.transport.perform_request('GET', _make_path('_cat', 'shards', index), params=params) - @query_params('format', 'h', 'help', 's', 'v') + @query_params('bytes', 'format', 'h', 'help', 's', 'v') def segments(self, index=None, params=None): """ The segments command is the detailed view of Lucene segments per index. @@ -231,6 +233,8 @@ class CatClient(NamespacedClient): :arg index: A comma-separated list of index names to limit the returned information + :arg bytes: The unit in which to display byte values, valid choices are: + 'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb' :arg format: a short version of the Accept header, e.g. json, yaml :arg h: Comma-separated list of column names to display :arg help: Return help information, default False