We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bc9b4e commit 20253ddCopy full SHA for 20253dd
bin/cli.py
@@ -148,6 +148,11 @@ def list(
148
"""Retrieve the list of Gateways
149
150
:param output: how to display the output [text|table|json]
151
+ :param query: jmespath (https://jmespath.org/) query
152
+
153
+ Example::
154
155
+ hpecp gateway list --output json --query '[0].ip'
156
"""
157
if output == "table":
158
print(get_client().gateway.list().tabulate(columns=columns))
@@ -162,8 +167,9 @@ def list(
162
167
else:
163
168
data = get_client().gateway.list().json
164
169
if query:
165
- print(jmespath.search(query, data))
166
- print(data)
170
+ print(jmespath.search(str(query), data))
171
+ else:
172
+ print(data)
173
174
def delete(
175
self, gateway_id, wait_for_delete_secs=0,
0 commit comments