libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1200980 - /libcloud/trunk/libcloud/common/openstack.py
Date Fri, 11 Nov 2011 17:32:38 GMT
Author: tomaz
Date: Fri Nov 11 17:32:38 2011
New Revision: 1200980

URL: http://svn.apache.org/viewvc?rev=1200980&view=rev
Log:
Fix a bug in OpenStack connection class. morph_action_hook shouldn't ignore
_force_base url attribute if it's present.

Modified:
    libcloud/trunk/libcloud/common/openstack.py

Modified: libcloud/trunk/libcloud/common/openstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/openstack.py?rev=1200980&r1=1200979&r2=1200980&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/openstack.py (original)
+++ libcloud/trunk/libcloud/common/openstack.py Fri Nov 11 17:32:38 2011
@@ -207,11 +207,16 @@ class OpenStackBaseConnection(Connection
         return headers
 
     def morph_action_hook(self, action):
+        if self._force_base_url:
+            _, _, request_path, _, _, _ = urlparse.urlparse(self._force_base_url)
+            return request_path + action
+
         value = getattr(self, self._url_key, None)
         if not value:
             self._populate_hosts_and_request_paths()
         request_path = getattr(self, '__request_path_%s' % (self._url_key), '')
         action = request_path + action
+
         return action
 
     @property



Mime
View raw message