1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[Rackspace] updated to select London athorization endpoint if the London Region endpoint is selected

This commit is contained in:
Kyle Rames 2013-01-17 16:41:18 -06:00
parent 4bcfef6956
commit 3d6bc99d57

View file

@ -63,7 +63,8 @@ module Fog
service(:databases, 'rackspace/databases', 'Databases')
def self.authenticate(options, connection_options = {})
rackspace_auth_url = options[:rackspace_auth_url] || "auth.api.rackspacecloud.com"
rackspace_auth_url = options[:rackspace_auth_url]
rackspace_auth_url ||= options[:rackspace_endpoint] == Fog::Compute::RackspaceV2::LON_ENDPOINT ? "lon.auth.api.rackspacecloud.com" : "auth.api.rackspacecloud.com"
url = rackspace_auth_url.match(/^https?:/) ? \
rackspace_auth_url : 'https://' + rackspace_auth_url
uri = URI.parse(url)