print endpoints using new keystoneauth catalog object
cinderclient was assuming an identity v2 styled service catalog would always be returned (when using `cinder endpoints`). keystoneclient would return either a v2 or v3 styled catalog, whereas keystoneauth abstracts out the differences and handles them internally. the result is that there is no need to look for specific ['serviceCatalog'] or ['catalog'] keys in the dictionary returned from keystoneauth. it should be noted that perhaps cinderclient should deprecate the ability to list endpoints since that is mostly an identity and admin level operation, and likely an artifact from early openstack days, it should now be handled by openstackclient. further, it's not clear whether the command is meant to list all endpoints or just the endpoints in the user's token (which it does now). Change-Id: Ibfcccedee5baf43f5b5c517d37e3f046c8743078 Closes-Bug: 1608166
This commit is contained in:
parent
3722a2a9d5
commit
f66b0d57d1
|
@ -655,7 +655,7 @@ def do_type_key(cs, args):
|
|||
def do_endpoints(cs, args):
|
||||
"""Discovers endpoints registered by authentication service."""
|
||||
catalog = cs.client.service_catalog.catalog
|
||||
for e in catalog['serviceCatalog']:
|
||||
for e in catalog:
|
||||
utils.print_dict(e['endpoints'][0], e['name'])
|
||||
|
||||
|
||||
|
|
|
@ -1035,7 +1035,7 @@ def do_type_access_remove(cs, args):
|
|||
def do_endpoints(cs, args):
|
||||
"""Discovers endpoints registered by authentication service."""
|
||||
catalog = cs.client.service_catalog.catalog
|
||||
for e in catalog['serviceCatalog']:
|
||||
for e in catalog:
|
||||
utils.print_dict(e['endpoints'][0], e['name'])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue