lib/fog/openstack/compute.rb in fog-1.9.0 vs lib/fog/openstack/compute.rb in fog-1.10.0

- old
+ new

@@ -8,11 +8,12 @@ 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, :openstack_identity_endpoint, - :current_user, :current_tenant, :openstack_region + :current_user, :current_tenant, :openstack_region, + :openstack_endpoint_type ## MODELS # model_path 'fog/openstack/models/compute' model :server @@ -97,10 +98,14 @@ request :get_metadata request :set_metadata request :update_metadata request :delete_metadata + # Metadatam + request :delete_meta + request :update_meta + # Address request :list_addresses request :list_address_pools request :list_all_addresses request :list_private_addresses @@ -292,10 +297,11 @@ @openstack_management_url = options[:openstack_management_url] @openstack_must_reauthenticate = false @openstack_service_type = options[:openstack_service_type] || ['nova', 'compute'] @openstack_service_name = options[:openstack_service_name] @openstack_identity_service_type = options[:openstack_identity_service_type] || 'identity' + @openstack_endpoint_type = options[:openstack_endpoint_type] || 'publicURL' @openstack_region = options[:openstack_region] @connection_options = options[:connection_options] || {} @current_user = options[:current_user] @@ -369,11 +375,12 @@ :openstack_auth_uri => @openstack_auth_uri, :openstack_region => @openstack_region, :openstack_tenant => @openstack_tenant, :openstack_service_type => @openstack_service_type, :openstack_service_name => @openstack_service_name, - :openstack_identity_service_type => @openstack_identity_service_type + :openstack_identity_service_type => @openstack_identity_service_type, + :openstack_endpoint_type => @openstack_endpoint_type } if @openstack_auth_uri.path =~ /\/v2.0\// credentials = Fog::OpenStack.authenticate_v2(options, @connection_options) @@ -403,12 +410,12 @@ @port = uri.port @scheme = uri.scheme # Not all implementations have identity service in the catalog - if @openstack_identity_public_endpoint + if @openstack_identity_public_endpoint || @openstack_management_url @identity_connection = Fog::Connection.new( - @openstack_identity_public_endpoint, + @openstack_identity_public_endpoint || @openstack_management_url, false, @connection_options) end true end