Fix catalog list when region name is absent
Some service catalogs in the wild have services without region names defined. Let's be nice and stuff in a default value indicating this state. Closes-Bug: #1429211 Change-Id: I3ebe2534dc6e3438aaeddc7757fb2db4117eae4b
This commit is contained in:
parent
d05b5e14f1
commit
ee2ba48aa4
@ -28,7 +28,8 @@ def _format_endpoints(eps=None):
|
||||
return ""
|
||||
ret = ''
|
||||
for index, ep in enumerate(eps):
|
||||
ret += eps[index]['region'] + '\n'
|
||||
region = eps[index].get('region', '<none>')
|
||||
ret += region + '\n'
|
||||
for url in ['publicURL', 'internalURL', 'adminURL']:
|
||||
ret += " %s: %s\n" % (url, eps[index]['publicURL'])
|
||||
return ret
|
||||
|
Loading…
x
Reference in New Issue
Block a user