From aa8d44c551643bb97e039624d602bd4ad07cbe9c Mon Sep 17 00:00:00 2001 From: Paul Voccio Date: Fri, 16 Nov 2012 11:34:12 -0600 Subject: [PATCH] Adding support to filter instances by tenant from the admin api Change-Id: I37a2c5ad7bbe3e005e96416ea974051a82879adc --- novaclient/v1_1/shell.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py index c296d61d3..bcab119f5 100644 --- a/novaclient/v1_1/shell.py +++ b/novaclient/v1_1/shell.py @@ -670,6 +670,12 @@ def do_image_delete(cs, args): type=int, const=1, help=argparse.SUPPRESS) +@utils.arg('--tenant', + #nova db searches by project_id + dest='tenant', + metavar='', + nargs='?', + help='Display information from single tenant (Admin only).') def do_list(cs, args): """List active servers.""" search_opts = { @@ -681,6 +687,7 @@ def do_list(cs, args): 'image': args.image, 'flavor': args.flavor, 'status': args.status, + 'project_id': args.tenant, 'host': args.host, 'instance_name': args.instance_name}