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

Merge pull request #3107 from smashwilson/force-rackspace-region

Remove default region from Rackspace services
This commit is contained in:
Wesley Beary 2014-08-15 10:20:55 -05:00
commit c779c52c6c
7 changed files with 22 additions and 25 deletions

View file

@ -139,7 +139,7 @@ module Fog
@rackspace_endpoint = nil
@rackspace_region = :lon
else
@rackspace_region = options[:rackspace_region] || :dfw
@rackspace_region = options[:rackspace_region]
end
else
#if we are using auth1 and the endpoint is not set, default to DFW_ENDPOINT for historical reasons
@ -154,10 +154,6 @@ module Fog
regions = @identity_service.service_catalog.display_service_regions(service_name)
Fog::Logger.deprecation("Please specify region using :rackspace_region rather than :rackspace_endpoint. Valid region for :rackspace_region are #{regions}.")
end
unless options[:rackspace_region]
Fog::Logger.deprecation("Default region support will be removed in an upcoming release. Please switch to manually setting your endpoint. This requires setting the :rackspace_region option")
end
end
def append_tenant_v1(credentials)

View file

@ -29,7 +29,7 @@ module Fog
@connection_options = options[:connection_options] || {}
@rackspace_auth_url = options[:rackspace_auth_url]
@rackspace_cdn_url = options[:rackspace_cdn_url]
@rackspace_region = options[:rackspace_region] || :dfw
@rackspace_region = options[:rackspace_region]
end
def service_name

View file

@ -214,7 +214,7 @@ module Fog
@rackspace_region = :lon
else
# we are actually using a custom endpoint
@rackspace_region = options[:rackspace_region] || :dfw
@rackspace_region = options[:rackspace_region]
end
else
#if we are using auth1 and the endpoint is not set, default to DFW_ENDPOINT for historical reasons
@ -229,10 +229,6 @@ module Fog
regions = @identity_service.service_catalog.display_service_regions(service_name)
Fog::Logger.deprecation("Please specify region using :rackspace_region rather than :rackspace_endpoint. Valid regions for :rackspace_region are #{regions}.")
end
unless options[:rackspace_region]
Fog::Logger.deprecation("Default region support will be removed in an upcoming release. Please switch to manually setting your endpoint. This requires setting the :rackspace_region option")
end
end
def append_tenant_v1(credentials)

View file

@ -128,11 +128,11 @@ module Fog
@rackspace_region = :lon
else
# we are actually using a custom endpoint
@rackspace_region = options[:rackspace_region] || :dfw
@rackspace_region = options[:rackspace_region]
end
else
#if we are using auth1 and the endpoint is not set, default to DFW_ENDPOINT for historical reasons
@rackspace_endpoint ||= DFW_ENDPOINT
@rackspace_endpoint ||= DFW_ENDPOINT
end
end
@ -143,10 +143,6 @@ module Fog
regions = @identity_service.service_catalog.display_service_regions(service_name)
Fog::Logger.deprecation("Please specify region using :rackspace_region rather than :rackspace_endpoint. Valid region for :rackspace_region are #{regions}.")
end
unless options[:rackspace_region]
Fog::Logger.deprecation("Default region support will be removed in an upcoming release. Please switch to manually setting your endpoint. This requires setting the :rackspace_region option")
end
end
def append_tenant_v1(credentials)

View file

@ -170,7 +170,7 @@ module Fog
@rackspace_region = :lon
else
# we are actually using a custom endpoint
@rackspace_region = options[:rackspace_region] || :dfw
@rackspace_region = options[:rackspace_region]
end
else
#if we are using auth1 and the endpoint is not set, default to DFW_ENDPOINT for historical reasons
@ -185,10 +185,6 @@ module Fog
regions = @identity_service.service_catalog.display_service_regions(service_name)
Fog::Logger.deprecation("Please specify region using :rackspace_region rather than :rackspace_endpoint. Valid regions for :rackspace_region are #{regions}.")
end
unless options[:rackspace_region]
Fog::Logger.deprecation("Default region support will be removed in an upcoming release. Please switch to manually setting your endpoint. This requires setting the :rackspace_region option")
end
end
def append_tenant_v1(credentials)

View file

@ -47,13 +47,20 @@ module Fog
@rackspace_username = options[:rackspace_username]
@rackspace_queues_client_id = options[:rackspace_queues_client_id] || Fog::UUID.uuid
@rackspace_auth_url = options[:rackspace_auth_url]
@rackspace_queues_url = options[:rackspace_queues_url]
@rackspace_must_reauthenticate = false
@connection_options = options[:connection_options] || {}
@rackspace_region = options[:rackspace_region] || :ord
@rackspace_region = options[:rackspace_region]
unless v2_authentication?
raise Fog::Errors::NotImplemented.new("V2 authentication required for Queues")
end
unless @rackspace_region || @rackspace_queues_url
Fog::Logger.deprecation("Default region support will be removed in an upcoming release. Please switch to manually setting your endpoint. This requires settng the :rackspace_region option.")
end
@rackspace_region ||= :ord
end
def service_name
@ -65,7 +72,7 @@ module Fog
end
def endpoint_uri(service_endpoint_url=nil)
@uri = super(@rackspace_endpoint || service_endpoint_url, :rackspace_queues_url)
@uri = super(@rackspace_queues_url || service_endpoint_url, :rackspace_queues_url)
end
def authenticate(options={})

View file

@ -52,10 +52,16 @@ module Fog
@rackspace_auth_token = options[:rackspace_auth_token]
@rackspace_storage_url = options[:rackspace_storage_url]
@rackspace_cdn_url = options[:rackspace_cdn_url]
@rackspace_region = options[:rackspace_region] || :dfw
@rackspace_region = options[:rackspace_region]
@rackspace_temp_url_key = options[:rackspace_temp_url_key]
@rackspace_must_reauthenticate = false
@connection_options = options[:connection_options] || {}
unless @rackspace_region || (@rackspace_storage_url && @rackspace_cdn_url)
Fog::Logger.deprecation("Default region support will be removed in an upcoming release. Please switch to manually setting your endpoint. This requires settng the :rackspace_region option.")
end
@rackspace_region ||= :dfw
end
def cdn