From 78c7d6448c18547801086ad7324f663d14235623 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 2 Sep 2015 16:04:10 -0400 Subject: [PATCH] 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 --- keystoneauth1/access/service_catalog.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keystoneauth1/access/service_catalog.py b/keystoneauth1/access/service_catalog.py index 7d14c4e9..f328df52 100644 --- a/keystoneauth1/access/service_catalog.py +++ b/keystoneauth1/access/service_catalog.py @@ -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.