Add 'global_project' option for cluster-list
This patch adds an option '-g'/'--global-project' to the 'cluster-list' command so that an admin user can list clusters from all tenants/projects. Change-Id: I9fac64f1e81a6d4e61a93d57a1272d175e8b61e0 Depends-On: Icab38c970de7704c3134afd1b96a03b3670bd2ad
This commit is contained in:
@@ -514,6 +514,10 @@ def do_policy_delete(sc, args):
|
||||
@utils.arg('-m', '--marker', metavar='<ID>',
|
||||
help=_('Only return clusters that appear after the given cluster '
|
||||
'ID.'))
|
||||
@utils.arg('-g', '--global-project', default=False, action="store_true",
|
||||
help=_('Indicate that the cluster list should include clusters from'
|
||||
' all projects. This option is subject to access policy '
|
||||
'checking. Default is False.'))
|
||||
@utils.arg('-F', '--full-id', default=False, action="store_true",
|
||||
help=_('Print full IDs in list.'))
|
||||
def do_cluster_list(sc, args=None):
|
||||
@@ -529,7 +533,8 @@ def do_cluster_list(sc, args=None):
|
||||
'sort_keys': args.sort_keys,
|
||||
'sort_dir': args.sort_dir,
|
||||
'show_deleted': args.show_deleted,
|
||||
'show_nested': args.show_nested
|
||||
'show_nested': args.show_nested,
|
||||
'global_project': args.global_project,
|
||||
}
|
||||
if args.filters:
|
||||
queries.update(utils.format_parameters(args.filters))
|
||||
|
||||
Reference in New Issue
Block a user