From 5f154636c2037ee16e972c7dd1d78f60807dfacf Mon Sep 17 00:00:00 2001 From: yamini sardana Date: Thu, 18 Dec 2014 16:10:52 +0530 Subject: [PATCH] Display tenant id with nova list --all-tenants For each server, nova list --all-tenants will now display its corresponding tenant ID as well. Change-Id: I586d6c5bbb15ebb5df25dc4fa849ac4d5af149e9 Closes-bug: #1403431 --- novaclient/v1_1/shell.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py index 3a438fdff..a8acb5bf7 100644 --- a/novaclient/v1_1/shell.py +++ b/novaclient/v1_1/shell.py @@ -1396,6 +1396,10 @@ def do_list(cs, args): 'Power State', 'Networks' ] + # If getting the data for all tenants, print + # Tenant ID as well + if search_opts['all_tenants']: + columns.insert(2, 'Tenant ID') formatters['Networks'] = utils._format_servers_list_networks sortby_index = 1 if args.sort: