lib/fog/rackspace/service.rb in fog-maestrodev-1.15.0.20130927082724 vs lib/fog/rackspace/service.rb in fog-maestrodev-1.18.0.20131111203459
- old
+ new
@@ -50,10 +50,14 @@
process_response(response) if parse_json
response
end
+ def service_net?
+ false
+ end
+
private
def process_response(response)
if response &&
response.body &&
@@ -77,11 +81,10 @@
end
def request_params(params)
params.merge({
:headers => headers(params),
- :host => endpoint_uri.host,
:path => "#{endpoint_uri.path}/#{params[:path]}"
})
end
def authentication_method
@@ -117,19 +120,24 @@
def authenticate_v1(options)
raise Fog::Errors::NotImplemented.new("Authentication of legacy endpoints is not implemented for this service.")
end
def endpoint_uri_v2
- @uri = @identity_service.service_catalog.get_endpoint(service_name, region)
+ @uri = @identity_service.service_catalog.get_endpoint(service_name, region, service_net?)
end
def auth_token
@auth_token || @identity_service.auth_token
end
def select_options(keys)
return nil unless @options && keys
- @options.select {|k,v| keys.include?(k)}
+ selected = {}
+ keys.each do |k|
+ selected[k] = @options[k]
+ end
+
+ selected
end
end
end
end