Updated Branches:
  refs/heads/trunk 38f029766 -> 998af4499

Update region handling in the CloudFiles driver.


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

Branch: refs/heads/trunk
Commit: 998af44993bfcd3551627c30d2e631b11b3e28b3
Parents: 38f0297
Author: Tomaz Muraus <[email protected]>
Authored: Sat Oct 12 11:50:20 2013 +0200
Committer: Tomaz Muraus <[email protected]>
Committed: Sat Oct 12 11:50:20 2013 +0200

----------------------------------------------------------------------
 libcloud/storage/drivers/cloudfiles.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/998af449/libcloud/storage/drivers/cloudfiles.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/cloudfiles.py 
b/libcloud/storage/drivers/cloudfiles.py
index 6fd54d4..7505c20 100644
--- a/libcloud/storage/drivers/cloudfiles.py
+++ b/libcloud/storage/drivers/cloudfiles.py
@@ -218,12 +218,10 @@ class CloudFilesStorageDriver(StorageDriver, 
OpenStackDriverMixin):
         if 'ex_force_service_region' in kwargs:
             region = kwargs['ex_force_service_region']
 
-        self.region = region
-
         OpenStackDriverMixin.__init__(self, (), **kwargs)
         super(CloudFilesStorageDriver, self).__init__(key=key, secret=secret,
                                             secure=secure, host=host,
-                                            port=port, **kwargs)
+                                            port=port, region=region, **kwargs)
 
     def iterate_containers(self):
         response = self.connection.request('')
@@ -824,12 +822,13 @@ class CloudFilesStorageDriver(StorageDriver, 
OpenStackDriverMixin):
     def _ex_connection_class_kwargs(self):
         kwargs = {'ex_force_service_region': self.region}
 
-        if self.region in ['dfw', 'ord', 'iad', 'syd']:
-            kwargs['auth_url'] = AUTH_URL_US
-        elif self.region == 'lon':
+        if self.region == 'lon':
             kwargs['auth_url'] = AUTH_URL_UK
+        else:
+            kwargs['auth_url'] = AUTH_URL_US
 
-        kwargs.update(self.openstack_connection_kwargs())
+        base_kwargs = self.openstack_connection_kwargs()
+        kwargs.update(base_kwargs)
         return kwargs
 
 

Reply via email to