diff options
Diffstat (limited to 'openstackclient/identity/v3/catalog.py')
| -rw-r--r-- | openstackclient/identity/v3/catalog.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/openstackclient/identity/v3/catalog.py b/openstackclient/identity/v3/catalog.py index d1f7d319..a5c2ee47 100644 --- a/openstackclient/identity/v3/catalog.py +++ b/openstackclient/identity/v3/catalog.py @@ -42,7 +42,6 @@ class ListCatalog(command.Lister): _description = _("List services in the service catalog") def take_action(self, parsed_args): - # Trigger auth if it has not happened yet auth_ref = self.app.client_manager.auth_ref if not auth_ref: @@ -52,13 +51,19 @@ class ListCatalog(command.Lister): data = auth_ref.service_catalog.catalog columns = ('Name', 'Type', 'Endpoints') - return (columns, - (utils.get_dict_properties( - s, columns, + return ( + columns, + ( + utils.get_dict_properties( + s, + columns, formatters={ 'Endpoints': EndpointsColumn, }, - ) for s in data)) + ) + for s in data + ), + ) class ShowCatalog(command.ShowOne): @@ -74,7 +79,6 @@ class ShowCatalog(command.ShowOne): return parser def take_action(self, parsed_args): - # Trigger auth if it has not happened yet auth_ref = self.app.client_manager.auth_ref if not auth_ref: @@ -84,8 +88,10 @@ class ShowCatalog(command.ShowOne): data = None for service in auth_ref.service_catalog.catalog: - if (service.get('name') == parsed_args.service or - service.get('type') == parsed_args.service): + if ( + service.get('name') == parsed_args.service + or service.get('type') == parsed_args.service + ): data = dict(service) data['endpoints'] = EndpointsColumn(data['endpoints']) if 'links' in data: |
