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

Merge pull request #1816 from ceraslabs/region

Added support for OpenStack region for network service
This commit is contained in:
Dan Prince 2013-05-16 07:10:56 -07:00
commit 11fb98a53b

View file

@ -9,7 +9,7 @@ module Fog
recognizes :openstack_auth_token, :openstack_management_url, :persistent,
:openstack_service_type, :openstack_service_name, :openstack_tenant,
:openstack_api_key, :openstack_username, :openstack_endpoint_type,
:current_user, :current_tenant
:current_user, :current_tenant, :openstack_region
## MODELS
#
@ -134,6 +134,7 @@ module Fog
@openstack_service_type = options[:openstack_service_type] || ['network']
@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] || {}
@ -152,7 +153,8 @@ module Fog
:openstack_auth_token => @auth_token,
:openstack_management_url => @openstack_management_url,
:current_user => @current_user,
:current_tenant => @current_tenant }
:current_tenant => @current_tenant,
:openstack_region => @openstack_region }
end
def reload
@ -204,7 +206,8 @@ 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,
:openstack_region => @openstack_region
}
credentials = Fog::OpenStack.authenticate_v2(options, @connection_options)