libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1392555 - in /libcloud/trunk/libcloud: common/openstack.py compute/drivers/rackspace.py
Date Mon, 01 Oct 2012 19:41:50 GMT
Author: tomaz
Date: Mon Oct  1 19:41:49 2012
New Revision: 1392555

URL: http://svn.apache.org/viewvc?rev=1392555&view=rev
Log:
Default to auth version 2.0 in the new Rackspace drivers, fix the _auth__version
issue.

Modified:
    libcloud/trunk/libcloud/common/openstack.py
    libcloud/trunk/libcloud/compute/drivers/rackspace.py

Modified: libcloud/trunk/libcloud/common/openstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/openstack.py?rev=1392555&r1=1392554&r2=1392555&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/openstack.py (original)
+++ libcloud/trunk/libcloud/common/openstack.py Mon Oct  1 19:41:49 2012
@@ -31,7 +31,7 @@ try:
 except ImportError:
     import json
 
-AUTH_API_VERSION = '2.0'
+AUTH_API_VERSION = '1.1'
 
 __all__ = [
     "OpenStackBaseConnection",
@@ -388,6 +388,7 @@ class OpenStackBaseConnection(Connection
     service_type = None
     service_name = None
     service_region = None
+    _auth_version = None
 
     def __init__(self, user_id, key, secure=True,
                  host=None, port=None, timeout=None,
@@ -402,11 +403,12 @@ class OpenStackBaseConnection(Connection
 
         self._ex_force_base_url = ex_force_base_url
         self._ex_force_auth_url = ex_force_auth_url
-        self._auth_version = ex_force_auth_version
+        self._auth_version = self._auth_version or ex_force_auth_version
         self._ex_tenant_name = ex_tenant_name
         self._ex_force_service_type = ex_force_service_type
         self._ex_force_service_name = ex_force_service_name
         self._ex_force_service_region = ex_force_service_region
+
         if ex_force_auth_token:
             self.auth_token = ex_force_auth_token
 

Modified: libcloud/trunk/libcloud/compute/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/rackspace.py?rev=1392555&r1=1392554&r2=1392555&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/rackspace.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/rackspace.py Mon Oct  1 19:41:49 2012
@@ -153,6 +153,12 @@ class RackspaceNodeDriver(OpenStack_1_1_
         elif region in ['uk']:
             datacenter = 'default'
 
+        if region == 'us':
+            self.connectionCls.auth_url = AUTH_URL_US
+        elif region == 'uk':
+            self.connectionCls.auth_url = AUTH_URL_UK
+
+        self.connectionCls._auth_version = '2.0'
         self.connectionCls.get_endpoint_args = \
                 ENDPOINT_ARGS_MAP[region][datacenter]
 



Mime
View raw message