lib/fog/openstack/volume.rb in fog-maestrodev-1.18.0.20131209091424 vs lib/fog/openstack/volume.rb in fog-maestrodev-1.18.0.20131218202447
- old
+ new
@@ -7,11 +7,11 @@
requires :openstack_auth_url
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
+ :openstack_endpoint_type, :openstack_region
model_path 'fog/openstack/models/volume'
model :volume
collection :volumes
@@ -123,10 +123,11 @@
@openstack_auth_uri = URI.parse(options[:openstack_auth_url])
@openstack_management_url = options[:openstack_management_url]
@openstack_must_reauthenticate = false
@openstack_service_type = options[:openstack_service_type] || ['volume']
@openstack_service_name = options[:openstack_service_name]
+ @openstack_region = options[:openstack_region]
@openstack_endpoint_type = options[:openstack_endpoint_type] || 'adminURL'
@connection_options = options[:connection_options] || {}
@current_user = options[:current_user]
@@ -186,9 +187,10 @@
private
def authenticate
if !@openstack_management_url || @openstack_must_reauthenticate
options = {
+ :openstack_region => @openstack_region,
:openstack_tenant => @openstack_tenant,
:openstack_api_key => @openstack_api_key,
:openstack_username => @openstack_username,
:openstack_auth_uri => @openstack_auth_uri,
:openstack_auth_token => @openstack_auth_token,