We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ade7da8 + d95e23d commit 2148a86Copy full SHA for 2148a86
1 file changed
openstackclient/identity/v3/role.py
@@ -428,23 +428,22 @@ def take_action(self, parsed_args):
428
domain = identity_client.find_domain(
429
name_or_id=parsed_args.domain,
430
)
431
- columns: tuple[str, ...] = ('ID', 'Name', 'Domain')
432
data = identity_client.roles(domain_id=domain.id)
+ return (
433
+ ('ID', 'Name', 'Domain'),
434
+ (
435
+ utils.get_item_properties(s, ('id', 'name'))
436
+ + (domain.name,)
437
+ for s in data
438
+ ),
439
+ )
440
+
441
else:
- columns = ('ID', 'Name')
442
data = identity_client.roles()
-
- return (
- columns,
- (
- utils.get_item_properties(
- s,
443
- formatters={'Domain': lambda _: domain.name},
444
- )
445
- for s in data
446
- ),
447
+ ('ID', 'Name'),
+ (utils.get_item_properties(s, ('id', 'name')) for s in data),
448
449
450
class RemoveRole(command.Command):
0 commit comments