Add accessor method for raw catalog content
There are cases, such as os_auth in ansible, where a user wants to be able to get at the raw catalog content. This is often extremely useful when debugging cloud applications. Change-Id: Ibe51b5f1a4b1d93efb6076b5f97b0fd10376cd16
This commit is contained in:
parent
35113c7854
commit
78c7d6448c
@ -34,6 +34,16 @@ class ServiceCatalog(object):
|
||||
def _get_endpoint_region(self, endpoint):
|
||||
return endpoint.get('region_id') or endpoint.get('region')
|
||||
|
||||
@property
|
||||
def catalog(self):
|
||||
"""Return the raw service catalog content, mostly useful for debugging.
|
||||
|
||||
Applications should avoid this and use accessor methods instead.
|
||||
However, there are times when inspecting the raw catalog can be useful
|
||||
for analysis and other reasons.
|
||||
"""
|
||||
return self._catalog
|
||||
|
||||
@abc.abstractmethod
|
||||
def is_interface_match(self, endpoint, interface):
|
||||
"""Helper function to normalize endpoint matching across v2 and v3.
|
||||
|
Loading…
x
Reference in New Issue
Block a user