Remove use of formatter function
Change-Id: I9ef88a4d69ffc3eaae183c77445ac10358d86337 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
dc8596fe74
commit
d95e23d92b
@ -428,23 +428,22 @@ class ListRole(command.Lister):
|
|||||||
domain = identity_client.find_domain(
|
domain = identity_client.find_domain(
|
||||||
name_or_id=parsed_args.domain,
|
name_or_id=parsed_args.domain,
|
||||||
)
|
)
|
||||||
columns: tuple[str, ...] = ('ID', 'Name', 'Domain')
|
|
||||||
data = identity_client.roles(domain_id=domain.id)
|
data = identity_client.roles(domain_id=domain.id)
|
||||||
else:
|
return (
|
||||||
columns = ('ID', 'Name')
|
('ID', 'Name', 'Domain'),
|
||||||
data = identity_client.roles()
|
(
|
||||||
|
utils.get_item_properties(s, ('id', 'name'))
|
||||||
|
+ (domain.name,)
|
||||||
|
for s in data
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
else:
|
||||||
columns,
|
data = identity_client.roles()
|
||||||
(
|
return (
|
||||||
utils.get_item_properties(
|
('ID', 'Name'),
|
||||||
s,
|
(utils.get_item_properties(s, ('id', 'name')) for s in data),
|
||||||
columns,
|
)
|
||||||
formatters={'Domain': lambda _: domain.name},
|
|
||||||
)
|
|
||||||
for s in data
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class RemoveRole(command.Command):
|
class RemoveRole(command.Command):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user