Add a better comment.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6dde47c1 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6dde47c1 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6dde47c1 Branch: refs/heads/make_rackspace_drivers_multi_datacenter_aware Commit: 6dde47c1276932fd9976a45c984bbedf0d009ad4 Parents: 3c7a7f3 Author: Tomaz Muraus <[email protected]> Authored: Sun Jun 23 20:35:01 2013 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Sun Jun 23 20:35:01 2013 +0200 ---------------------------------------------------------------------- libcloud/compute/drivers/rackspace.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/6dde47c1/libcloud/compute/drivers/rackspace.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/rackspace.py b/libcloud/compute/drivers/rackspace.py index 44926f3..0665a86 100644 --- a/libcloud/compute/drivers/rackspace.py +++ b/libcloud/compute/drivers/rackspace.py @@ -70,14 +70,17 @@ class RackspaceFirstGenConnection(OpenStack_1_0_Connection): if not public_url: raise LibcloudError('Could not find specified endpoint') - # This is a nasty hack, but because of how global auth and old accounts - # work, there is no way around it. + # This is a nasty hack, but it's required because of how the + # auth system works. + # Old US accounts can access UK API endpoint, but they don't + # have this endpoint in the service catalog. Same goes for the + # old UK accounts and US endpoint. if self.region == 'us': - # Old UK account, which only has us endpoint in the catalog + # Old UK account, which only have uk endpoint in the catalog public_url = public_url.replace('https://lon.servers.api', 'https://servers.api') if self.region == 'uk': - # Old US account, which only has uk endpoint in the catalog + # Old US account, which only has us endpoints in the catalog public_url = public_url.replace('https://servers.api', 'https://lon.servers.api')
