summaryrefslogtreecommitdiff
path: root/heatclient/v1/shell.py
diff options
context:
space:
mode:
authorKanagaraj Manickam <mkr1481@gmail.com>2015-12-15 17:37:42 +0530
committerKanagaraj Manickam <mkr1481@gmail.com>2016-02-20 03:54:55 +0000
commit6302614f086b3f930d497fe572f3d1b1c758af0a (patch)
treea34567ad9143b4a6af52a7033d01e36c09d0a382 /heatclient/v1/shell.py
parenta5fdf2318e350e89ad5b74d1bdad81450800a355 (diff)
downloadpython-heatclient-6302614f086b3f930d497fe572f3d1b1c758af0a.tar.gz
Stack resource search
heat resource-list -f <filters> implements blueprint heat-stack-resource-search depends-on: Iaae88f3b32bc2ba7b41a4078ef3aa8ffc07079b7 Change-Id: I2d1f6ee68623e08bb9654dbcba28336364d14d6d
Diffstat (limited to 'heatclient/v1/shell.py')
-rw-r--r--heatclient/v1/shell.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py
index a56da63..894bda2 100644
--- a/heatclient/v1/shell.py
+++ b/heatclient/v1/shell.py
@@ -850,12 +850,19 @@ def do_template_validate(hc, args):
@utils.arg('--with-detail', default=False, action="store_true",
help=_('Enable detail information presented for each resource '
'in resources list.'))
+@utils.arg('-f', '--filter', metavar='<KEY=VALUE>',
+ help=_('Filter parameters to apply on returned resources based on'
+ ' their name, status, type, action, id and'
+ ' physcial_resource_id. This can be specified multiple'
+ ' times.'),
+ action='append')
def do_resource_list(hc, args):
'''Show list of resources belonging to a stack.'''
fields = {
'stack_id': args.id,
'nested_depth': args.nested_depth,
'with_detail': args.with_detail,
+ 'filters': utils.format_parameters(args.filter)
}
try:
resources = hc.resources.list(**fields)