Permalink
Browse files

Merge pull request #1411 from jtopjian/openstack-image-regions2

Added multi-region support for OpenStack Image service
  • Loading branch information...
2 parents a0d49d3 + 9b7be36 commit 3c6bf2d552369ef9cbe320d88630f1ab460fbf74 @geemus geemus committed Dec 21, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/fog/openstack/image.rb
@@ -7,7 +7,7 @@ class OpenStack < Fog::Service
recognizes :openstack_auth_token, :openstack_management_url, :persistent,
:openstack_service_type, :openstack_service_name, :openstack_tenant,
:openstack_api_key, :openstack_username,
- :current_user, :current_tenant, :openstack_endpoint_type
+ :current_user, :current_tenant, :openstack_endpoint_type, :openstack_region
model_path 'fog/openstack/models/image'
@@ -82,6 +82,7 @@ def credentials
{ :provider => 'openstack',
:openstack_auth_url => @openstack_auth_uri.to_s,
:openstack_auth_token => @auth_token,
+ :openstack_region => @openstack_region,
:openstack_management_url => @openstack_management_url }
end
end
@@ -112,6 +113,7 @@ def initialize(options={})
@openstack_service_type = options[:openstack_service_type] || ['image']
@openstack_service_name = options[:openstack_service_name]
@openstack_endpoint_type = options[:openstack_endpoint_type] || 'adminURL'
+ @openstack_region = options[:openstack_region]
@connection_options = options[:connection_options] || {}
@@ -180,6 +182,7 @@ def authenticate
:openstack_api_key => @openstack_api_key,
:openstack_username => @openstack_username,
:openstack_auth_uri => @openstack_auth_uri,
+ :openstack_region => @openstack_region,
:openstack_auth_token => @openstack_auth_token,
:openstack_service_type => @openstack_service_type,
:openstack_service_name => @openstack_service_name,

0 comments on commit 3c6bf2d

Please sign in to comment.