Permalink
Browse files

Show Tenant_ID for secgroup-list with all-tenant

For the secgroup-list command, append the Tenant_ID
column if the --all-tenants flag is used.

Fixes bug #1118477

Change-Id: If2ff108cb0aec1327ceecc47a8c5ed9a08678e51
  • Loading branch information...
1 parent 5c9fc02 commit f294635c16cbf56ee90647de4fb2a35c171174a1 Scott Devoid committed Feb 7, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 novaclient/v1_1/shell.py
@@ -1924,7 +1924,11 @@ def do_secgroup_delete(cs, args):
def do_secgroup_list(cs, args):
"""List security groups for the current tenant."""
search_opts = {'all_tenants': args.all_tenants}
- _print_secgroups(cs.security_groups.list(search_opts=search_opts))
+ columns = ['Name', 'Description']
+ if args.all_tenants:
+ columns.append('Tenant_ID')
+ groups = cs.security_groups.list(search_opts=search_opts)
+ utils.print_list(groups, columns)
@utils.arg('secgroup', metavar='<secgroup>', help='Name of security group.')

0 comments on commit f294635

Please sign in to comment.