summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/catalog.py
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2023-05-08 11:32:01 +0100
committerStephen Finucane <sfinucan@redhat.com>2023-05-10 10:51:30 +0100
commitaed521d426f45b335e1c69d8b2f6d103c916f75c (patch)
tree39eca8c658a0339cfbbe3b0e9e69232037be17f6 /openstackclient/identity/v3/catalog.py
parent6475dc58e8baa199d948c4b2d250c1fb45e0bd30 (diff)
downloadpython-openstackclient-aed521d426f45b335e1c69d8b2f6d103c916f75c.tar.gz
Blacken openstackclient.identity
Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I2eeade1ce6653be8e9179ecc40105182c5ff5f16 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/identity/v3/catalog.py')
-rw-r--r--openstackclient/identity/v3/catalog.py22
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: