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

Add availability zone required parameter for storage and cdn services.

This commit is contained in:
Rupak Ganguly 2012-04-27 14:27:49 -04:00
commit 713c994b1c
8 changed files with 25 additions and 3 deletions

View file

@ -107,7 +107,7 @@ module Fog
@hp_secret_key = options[:hp_secret_key]
@hp_tenant_id = options[:hp_tenant_id]
@hp_service_type = options[:hp_service_type]
@hp_avl_zone = options[:hp_avl_zone] || :az1
@hp_avl_zone = options[:hp_avl_zone]
### Decide which auth style to use
unless (@hp_use_upass_auth_style)

View file

@ -5,7 +5,7 @@ module Fog
module CDN
class HP < Fog::Service
requires :hp_secret_key, :hp_account_id, :hp_tenant_id
requires :hp_secret_key, :hp_account_id, :hp_tenant_id, :hp_avl_zone
recognizes :hp_auth_uri, :hp_cdn_uri, :persistent, :connection_options, :hp_use_upass_auth_style, :hp_auth_version
model_path 'fog/hp/models/cdn'

View file

@ -5,7 +5,7 @@ module Fog
module Storage
class HP < Fog::Service
requires :hp_secret_key, :hp_account_id, :hp_tenant_id
requires :hp_secret_key, :hp_account_id, :hp_tenant_id, :hp_avl_zone
recognizes :hp_auth_uri, :hp_servicenet, :hp_cdn_ssl, :hp_cdn_uri, :persistent, :connection_options, :hp_use_upass_auth_style, :hp_auth_version
model_path 'fog/hp/models/storage'
@ -37,6 +37,7 @@ module Fog
:hp_auth_uri => @hp_auth_uri,
:hp_cdn_uri => @hp_cdn_uri,
:hp_tenant_id => @hp_tenant_id,
:hp_avl_zone => @hp_avl_zone,
:connection_options => @connection_options
)
if @cdn.enabled?
@ -137,6 +138,7 @@ module Fog
### Pass the service type for object storage to the authentication call
options[:hp_service_type] = "object-store"
@hp_tenant_id = options[:hp_tenant_id]
@hp_avl_zone = options[:hp_avl_zone]
### Make the authentication call
if (auth_version == :v2)

View file

@ -1,6 +1,10 @@
Shindo.tests("Fog::Compute[:hp] | address", ['hp']) do
<<<<<<< HEAD
@base_image_id = ENV["BASE_IMAGE_ID"] ||= "1242"
=======
@base_image_id = ENV["BASE_IMAGE_ID"] || 1242
>>>>>>> cs_auth
model_tests(Fog::Compute[:hp].addresses, {}, true) do

View file

@ -7,7 +7,11 @@ Shindo.tests('Fog::Compute[:hp] | address requests', ['hp']) do
'id' => Integer
}
<<<<<<< HEAD
@base_image_id = ENV["BASE_IMAGE_ID"] ||= "1242"
=======
@base_image_id = ENV["BASE_IMAGE_ID"] || 1242
>>>>>>> cs_auth
tests('success') do

View file

@ -18,7 +18,11 @@ Shindo.tests('Fog::Compute[:hp] | image requests', ['hp']) do
'name' => String
}
<<<<<<< HEAD
@base_image_id = ENV["BASE_IMAGE_ID"] ||= "1242"
=======
@base_image_id = ENV["BASE_IMAGE_ID"] || 1242
>>>>>>> cs_auth
tests('success') do
@server_name = "fogservertest"

View file

@ -1,6 +1,10 @@
Shindo.tests('Fog::Compute[:hp] | address requests', ['hp']) do
<<<<<<< HEAD
@base_image_id = ENV["BASE_IMAGE_ID"] ||= "1242"
=======
@base_image_id = ENV["BASE_IMAGE_ID"] || 1242
>>>>>>> cs_auth
tests('success') do
@server = Fog::Compute[:hp].servers.create(:name => 'fogaddresstests', :flavor_id => 100, :image_id => @base_image_id)

View file

@ -34,7 +34,11 @@ Shindo.tests('Fog::Compute[:hp] | server requests', ['hp']) do
'output' => String
}
<<<<<<< HEAD
@base_image_id = ENV["BASE_IMAGE_ID"] ||= "1242"
=======
@base_image_id = ENV["BASE_IMAGE_ID"] || 1242
>>>>>>> cs_auth
tests('success') do