libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [1/3] libcloud git commit: Fix #LIBCLOUD-840
Date Fri, 11 Aug 2017 04:56:12 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 1fdb4df1c -> 57fe73347


Fix #LIBCLOUD-840

Update OpenStackSwiftConnection to work with auth version 3.0


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

Branch: refs/heads/trunk
Commit: 0378495ab879fb33f493d6c67164d39202bf7849
Parents: 1fdb4df
Author: Hakan Carlsson <hakan.carlsson@gmail.com>
Authored: Wed Jun 7 13:22:40 2017 +0200
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Fri Aug 11 14:54:20 2017 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/cloudfiles.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0378495a/libcloud/storage/drivers/cloudfiles.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/cloudfiles.py b/libcloud/storage/drivers/cloudfiles.py
index ba2ed76..06ccf2a 100644
--- a/libcloud/storage/drivers/cloudfiles.py
+++ b/libcloud/storage/drivers/cloudfiles.py
@@ -129,7 +129,7 @@ class OpenStackSwiftConnection(OpenStackBaseConnection):
             self._service_region = None
 
     def get_endpoint(self, *args, **kwargs):
-        if '2.0' in self._auth_version:
+        if ('2.0' in self._auth_version) or ('3.x' in self._auth_version):
             endpoint = self.service_catalog.get_endpoint(
                 service_type=self._service_type,
                 name=self._service_name,
@@ -137,6 +137,8 @@ class OpenStackSwiftConnection(OpenStackBaseConnection):
         elif ('1.1' in self._auth_version) or ('1.0' in self._auth_version):
             endpoint = self.service_catalog.get_endpoint(
                 name=self._service_name, region=self._service_region)
+        else:                                                                           
                                                                                         
                                                          
+            endpoint = None  
 
         if endpoint:
             return endpoint.url


Mime
View raw message