mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge branch 'minter'
This commit is contained in:
commit
767b3773e9
3 changed files with 8 additions and 4 deletions
|
@ -3,7 +3,7 @@ module Fog
|
|||
class Compute < Fog::Service
|
||||
|
||||
requires :rackspace_api_key, :rackspace_username
|
||||
recognizes :rackspace_auth_url, :persistent
|
||||
recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/rackspace'
|
||||
|
@ -86,7 +86,9 @@ module Fog
|
|||
@rackspace_api_key = options[:rackspace_api_key]
|
||||
@rackspace_username = options[:rackspace_username]
|
||||
@rackspace_auth_url = options[:rackspace_auth_url]
|
||||
@rackspace_servicenet = options[:rackspace_servicenet]
|
||||
authenticate
|
||||
Excon.ssl_verify_peer = false if options[:rackspace_servicenet] == true
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", options[:persistent])
|
||||
end
|
||||
|
||||
|
@ -137,7 +139,7 @@ module Fog
|
|||
credentials = Fog::Rackspace.authenticate(options)
|
||||
@auth_token = credentials['X-Auth-Token']
|
||||
uri = URI.parse(credentials['X-Server-Management-Url'])
|
||||
@host = uri.host
|
||||
@host = @rackspace_servicenet == true ? "snet-#{uri.host}" : uri.host
|
||||
@path = uri.path
|
||||
@port = uri.port
|
||||
@scheme = uri.scheme
|
||||
|
|
|
@ -84,6 +84,7 @@ An alternate file may be used by placing its path in the FOG_RC environment vari
|
|||
:private_key_path:
|
||||
:rackspace_api_key:
|
||||
:rackspace_username:
|
||||
:rackspace_servicenet:
|
||||
:slicehost_password:
|
||||
:terremark_username:
|
||||
:terremark_password:
|
||||
|
|
|
@ -3,7 +3,7 @@ module Fog
|
|||
class Storage < Fog::Service
|
||||
|
||||
requires :rackspace_api_key, :rackspace_username
|
||||
recognizes :rackspace_auth_url, :persistent
|
||||
recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/storage/models/rackspace'
|
||||
|
@ -85,10 +85,11 @@ module Fog
|
|||
@auth_token = credentials['X-Auth-Token']
|
||||
|
||||
uri = URI.parse(credentials['X-Storage-Url'])
|
||||
@host = uri.host
|
||||
@host = options[:rackspace_servicenet] == true ? "snet-#{uri.host}" : uri.host
|
||||
@path = uri.path
|
||||
@port = uri.port
|
||||
@scheme = uri.scheme
|
||||
Excon.ssl_verify_peer = false if options[:rackspace_servicenet] == true
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", options[:persistent])
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue