File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
openstackclient/identity/v3 Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -428,23 +428,22 @@ def take_action(self, parsed_args):
428428 domain = identity_client .find_domain (
429429 name_or_id = parsed_args .domain ,
430430 )
431- columns : tuple [str , ...] = ('ID' , 'Name' , 'Domain' )
432431 data = identity_client .roles (domain_id = domain .id )
432+ 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+
433441 else :
434- columns = ('ID' , 'Name' )
435442 data = identity_client .roles ()
436-
437- return (
438- columns ,
439- (
440- utils .get_item_properties (
441- s ,
442- columns ,
443- formatters = {'Domain' : lambda _ : domain .name },
444- )
445- for s in data
446- ),
447- )
443+ return (
444+ ('ID' , 'Name' ),
445+ (utils .get_item_properties (s , ('id' , 'name' )) for s in data ),
446+ )
448447
449448
450449class RemoveRole (command .Command ):
You can’t perform that action at this time.
0 commit comments