From 70d6203625edfe8223a829b587ee81beafac3f8f Mon Sep 17 00:00:00 2001 From: Michael Gibson Date: Mon, 16 Nov 2015 11:28:03 -0700 Subject: [PATCH] Add bytes param to cat.shards and cat.segments --- 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 f7a5075f..092ce300 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -175,7 +175,7 @@ class CatClient(NamespacedClient): 'recovery', index), params=params) return data - @query_params('h', 'help', 'local', 'master_timeout', 'v') + @query_params('bytes', 'h', 'help', 'local', 'master_timeout', 'v') def shards(self, index=None, params=None): """ The shards command is the detailed view of what nodes contain which shards. @@ -183,6 +183,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', 'm', 'g' :arg h: Comma-separated list of column names to display :arg help: Return help information, default False :arg local: Return local information, do not retrieve the state from @@ -195,7 +197,7 @@ class CatClient(NamespacedClient): 'shards', index), params=params) return data - @query_params('h', 'help', 'v') + @query_params('bytes', 'h', 'help', 'v') def segments(self, index=None, params=None): """ The segments command is the detailed view of Lucene segments per index. @@ -203,6 +205,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', 'm', 'g' :arg h: Comma-separated list of column names to display :arg help: Return help information, default False :arg v: Verbose mode. Display column headers, default False