From fe2b2d9f305aa57d16a14092a77861c3e6abe8ab Mon Sep 17 00:00:00 2001 From: "Brian D. Burns" Date: Fri, 11 Oct 2013 11:21:56 -0400 Subject: [PATCH] [openstack] remove :host from Excon request params --- lib/fog/openstack/compute.rb | 3 +-- lib/fog/openstack/identity.rb | 3 +-- lib/fog/openstack/image.rb | 3 +-- lib/fog/openstack/metering.rb | 1 - lib/fog/openstack/network.rb | 1 - lib/fog/openstack/orchestration.rb | 1 - lib/fog/openstack/storage.rb | 1 - lib/fog/openstack/volume.rb | 3 +-- 8 files changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/fog/openstack/compute.rb b/lib/fog/openstack/compute.rb index 2240f4d80..a735bf4bb 100644 --- a/lib/fog/openstack/compute.rb +++ b/lib/fog/openstack/compute.rb @@ -342,7 +342,6 @@ module Fog 'Accept' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{@tenant_id}/#{params[:path]}", :query => params[:query] })) @@ -416,7 +415,7 @@ module Fog @port = uri.port @scheme = uri.scheme - + # Not all implementations have identity service in the catalog if @openstack_identity_public_endpoint || @openstack_management_url @identity_connection = Fog::Connection.new( diff --git a/lib/fog/openstack/identity.rb b/lib/fog/openstack/identity.rb index 5edfe0095..36bf4d5e4 100644 --- a/lib/fog/openstack/identity.rb +++ b/lib/fog/openstack/identity.rb @@ -192,7 +192,7 @@ module Fog @connection_options = options[:connection_options] || {} @openstack_current_user_id = options[:openstack_current_user_id] - + @openstack_endpoint_type = options[:openstack_endpoint_type] || 'adminURL' @current_user = options[:current_user] @@ -227,7 +227,6 @@ module Fog 'Accept' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{params[:path]}"#, })) rescue Excon::Errors::Unauthorized => error diff --git a/lib/fog/openstack/image.rb b/lib/fog/openstack/image.rb index e252f4109..57e5ceebc 100644 --- a/lib/fog/openstack/image.rb +++ b/lib/fog/openstack/image.rb @@ -148,7 +148,6 @@ module Fog 'Content-Type' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{params[:path]}"#, })) rescue Excon::Errors::Unauthorized => error @@ -186,7 +185,7 @@ module Fog :openstack_auth_token => @openstack_auth_token, :openstack_service_type => @openstack_service_type, :openstack_service_name => @openstack_service_name, - :openstack_endpoint_type => @openstack_endpoint_type + :openstack_endpoint_type => @openstack_endpoint_type } credentials = Fog::OpenStack.authenticate_v2(options, @connection_options) diff --git a/lib/fog/openstack/metering.rb b/lib/fog/openstack/metering.rb index e46c790dc..c2c41504f 100644 --- a/lib/fog/openstack/metering.rb +++ b/lib/fog/openstack/metering.rb @@ -144,7 +144,6 @@ module Fog 'Accept' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/v2/#{params[:path]}"#, # Causes errors for some requests like tenants?limit=1 # :query => ('ignore_awful_caching' << Time.now.to_i.to_s) diff --git a/lib/fog/openstack/network.rb b/lib/fog/openstack/network.rb index 28db5c42e..2c36ec11d 100644 --- a/lib/fog/openstack/network.rb +++ b/lib/fog/openstack/network.rb @@ -235,7 +235,6 @@ module Fog 'Accept' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{params[:path]}"#, })) rescue Excon::Errors::Unauthorized => error diff --git a/lib/fog/openstack/orchestration.rb b/lib/fog/openstack/orchestration.rb index 4871ee458..1bd744da1 100644 --- a/lib/fog/openstack/orchestration.rb +++ b/lib/fog/openstack/orchestration.rb @@ -142,7 +142,6 @@ module Fog 'X-Auth-User' => @openstack_username, 'X-Auth-Key' => @openstack_api_key }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{@tenant_id}/#{params[:path]}", :query => params[:query] })) diff --git a/lib/fog/openstack/storage.rb b/lib/fog/openstack/storage.rb index 0d3279c4d..5a1444970 100644 --- a/lib/fog/openstack/storage.rb +++ b/lib/fog/openstack/storage.rb @@ -152,7 +152,6 @@ module Fog 'Accept' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{params[:path]}", })) rescue Excon::Errors::Unauthorized => error diff --git a/lib/fog/openstack/volume.rb b/lib/fog/openstack/volume.rb index 9b66e2e84..b17015d93 100644 --- a/lib/fog/openstack/volume.rb +++ b/lib/fog/openstack/volume.rb @@ -29,7 +29,7 @@ module Fog request :list_snapshots request :get_snapshot_details request :delete_snapshot - + request :update_quota request :get_quota request :get_quota_defaults @@ -157,7 +157,6 @@ module Fog 'Accept' => 'application/json', 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), - :host => @host, :path => "#{@path}/#{params[:path]}"#, })) rescue Excon::Errors::Unauthorized => error