libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/2] git commit: Make get_regions work with v3 auth.
Date Thu, 07 Aug 2014 15:56:00 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk ebb8f098c -> 13fe413d7


Make get_regions work with v3 auth.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1e28abe0
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1e28abe0
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1e28abe0

Branch: refs/heads/trunk
Commit: 1e28abe049e3466e03acfc048ef9d82c6505cbb2
Parents: ebb8f09
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Thu Aug 7 17:39:15 2014 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Thu Aug 7 17:39:15 2014 +0200

----------------------------------------------------------------------
 libcloud/common/openstack.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1e28abe0/libcloud/common/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index 65b4306..3d4786b 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -487,7 +487,11 @@ class OpenStackServiceCatalog(object):
 
         catalog_items = self._service_catalog.items()
 
-        if '2.0' in self._auth_version:
+        if '3.x' in self._auth_version:
+            for service_type, values in catalog_items:
+                for region in values.keys():
+                    regions.add(region)
+        elif '2.0' in self._auth_version:
             for service_type, services_by_name in catalog_items:
                 items = services_by_name.items()
                 for service_name, endpoints_by_region in items:


Mime
View raw message