From aba9003c3f2572133c6ef8802afe77e25896b3ea Mon Sep 17 00:00:00 2001 From: Julian Weber Date: Mon, 30 Sep 2013 17:58:29 +0200 Subject: [PATCH] Hp provider: ensures that hp_auth_version is loaded as symbol --- lib/fog/hp/block_storage.rb | 3 ++- lib/fog/hp/cdn.rb | 3 ++- lib/fog/hp/compute.rb | 3 ++- lib/fog/hp/storage.rb | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/fog/hp/block_storage.rb b/lib/fog/hp/block_storage.rb index 616f2ff50..2413784c7 100644 --- a/lib/fog/hp/block_storage.rb +++ b/lib/fog/hp/block_storage.rb @@ -104,7 +104,8 @@ module Fog @hp_auth_uri = options[:hp_auth_uri] @connection_options = options[:connection_options] || {} ### Set an option to use the style of authentication desired; :v1 or :v2 (default) - auth_version = options[:hp_auth_version] || :v2 + ### A symbol is required, we should ensure that the value is loaded as a symbol + auth_version = options[:hp_auth_version].to_sym || :v2 ### Pass the service name for object storage to the authentication call options[:hp_service_type] = "Block Storage" @hp_tenant_id = options[:hp_tenant_id] diff --git a/lib/fog/hp/cdn.rb b/lib/fog/hp/cdn.rb index 3ced28ad1..4b4552b92 100644 --- a/lib/fog/hp/cdn.rb +++ b/lib/fog/hp/cdn.rb @@ -79,7 +79,8 @@ module Fog @hp_secret_key = options[:hp_secret_key] @connection_options = options[:connection_options] || {} ### Set an option to use the style of authentication desired; :v1 or :v2 (default) - auth_version = options[:hp_auth_version] || :v2 + ### A symbol is required, we should ensure that the value is loaded as a symbol + auth_version = options[:hp_auth_version].to_sym || :v2 ### Pass the service name for object storage to the authentication call options[:hp_service_type] = "CDN" @hp_tenant_id = options[:hp_tenant_id] diff --git a/lib/fog/hp/compute.rb b/lib/fog/hp/compute.rb index f04e74ba0..d0d4359d6 100644 --- a/lib/fog/hp/compute.rb +++ b/lib/fog/hp/compute.rb @@ -188,7 +188,8 @@ module Fog @hp_secret_key = options[:hp_secret_key] @connection_options = options[:connection_options] || {} ### Set an option to use the style of authentication desired; :v1 or :v2 (default) - auth_version = options[:hp_auth_version] || :v2 + ### A symbol is required, we should ensure that the value is loaded as a symbol + auth_version = options[:hp_auth_version].to_sym || :v2 ### Pass the service name for compute via the options hash options[:hp_service_type] = "Compute" @hp_tenant_id = options[:hp_tenant_id] diff --git a/lib/fog/hp/storage.rb b/lib/fog/hp/storage.rb index 72de3a240..2beaff3d7 100644 --- a/lib/fog/hp/storage.rb +++ b/lib/fog/hp/storage.rb @@ -263,7 +263,8 @@ module Fog @hp_cdn_ssl = options[:hp_cdn_ssl] @connection_options = options[:connection_options] || {} ### Set an option to use the style of authentication desired; :v1 or :v2 (default) - auth_version = options[:hp_auth_version] || :v2 + ### A symbol is required, we should ensure that the value is loaded as a symbol + auth_version = options[:hp_auth_version].to_sym || :v2 ### Pass the service name for object storage to the authentication call options[:hp_service_type] = "Object Storage" @hp_tenant_id = options[:hp_tenant_id]