Add user_id in receiver list
This patch adds the "user_id" column in receiver list.
Change-Id: Ic6a635cc652e4a7356cdd5984099e0c174f330fc
Closes-Bug: #1653579
(cherry picked from commit a834bf97e3)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user