Support listing users by group name

Listing users within a group is not presently domain scoped. We
do not use the domain info at all when the group option is present.
A new --group-domain option is not needed since we cannot list
users by --project and --group, they are mutually exclusive (as
per the identity API).

Closes-Bug: 1492916
Change-Id: I50f995ee4a03c2bdb21f2b5722546ab8fe786eb6
This commit is contained in:
Steve Martinelli 2015-08-13 21:57:53 -07:00
parent 0cc1e5aa2b
commit 36a9703a19

View File

@ -214,13 +214,11 @@ class ListUser(lister.Lister):
domain = common.find_domain(identity_client,
parsed_args.domain).id
group = None
if parsed_args.group:
group = utils.find_resource(
identity_client.groups,
parsed_args.group,
).id
else:
group = None
group = common.find_group(identity_client,
parsed_args.group,
parsed_args.domain).id
if parsed_args.project:
if domain is not None: