diff --git a/senlinclient/v1/receiver.py b/senlinclient/v1/receiver.py index dc9b766..76f8264 100644 --- a/senlinclient/v1/receiver.py +++ b/senlinclient/v1/receiver.py @@ -96,6 +96,7 @@ class ListReceiver(command.Lister): formatters = {} if parsed_args.global_project: columns.append('project_id') + columns.append('user_id') if not parsed_args.full_id: formatters = { 'id': lambda x: x[:8], @@ -103,6 +104,7 @@ class ListReceiver(command.Lister): } if 'project_id' in columns: formatters['project_id'] = lambda x: x[:8] + formatters['user_id'] = lambda x: x[:8] return ( columns, diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index 43fce84..5949832 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -1374,6 +1374,7 @@ def do_receiver_list(service, args): formatters = {} if args.global_project: fields.append('project_id') + fields.append('user_id') if not args.full_id: formatters = { 'id': lambda x: x.id[:8], @@ -1381,6 +1382,7 @@ def do_receiver_list(service, args): } if 'project_id' in fields: formatters['project_id'] = lambda x: x.project_id[:8] + formatters['user_id'] = lambda x: x.user_id[:8] utils.print_list(receivers, fields, formatters=formatters, sortby_index=sortby_index)