Skip to content

Commit 36a9703

Browse files
author
Steve Martinelli
committed
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
1 parent 0cc1e5a commit 36a9703

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

openstackclient/identity/v3/user.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,11 @@ def take_action(self, parsed_args):
214214
domain = common.find_domain(identity_client,
215215
parsed_args.domain).id
216216

217+
group = None
217218
if parsed_args.group:
218-
group = utils.find_resource(
219-
identity_client.groups,
220-
parsed_args.group,
221-
).id
222-
else:
223-
group = None
219+
group = common.find_group(identity_client,
220+
parsed_args.group,
221+
parsed_args.domain).id
224222

225223
if parsed_args.project:
226224
if domain is not None:

0 commit comments

Comments
 (0)