mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[openstack|image] Update Image Service Authentication Options
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
This commit is contained in:
parent
33471086de
commit
9a0a5f2da2
2 changed files with 5 additions and 2 deletions
|
@ -100,6 +100,7 @@ module Fog
|
|||
req_body['auth']['tenantName'] = @openstack_tenant if @openstack_tenant
|
||||
|
||||
body = retrieve_tokens_v2(connection, req_body, uri)
|
||||
|
||||
svc = body['access']['serviceCatalog'].
|
||||
detect{|x| @service_name.include?(x['type']) }
|
||||
identity_svc = body['access']['serviceCatalog'].
|
||||
|
|
|
@ -94,10 +94,11 @@ module Fog
|
|||
raise ArgumentError, "Missing required arguments: #{missing_credentials.join(', ')}" unless missing_credentials.empty?
|
||||
end
|
||||
|
||||
@openstack_auth_uri = URI.parse(options[:openstack_auth_url])
|
||||
@openstack_tenant = options[:openstack_tenant]
|
||||
@openstack_auth_uri = URI.parse(options[:openstack_auth_url])
|
||||
@openstack_management_url = options[:openstack_management_url]
|
||||
@openstack_must_reauthenticate = false
|
||||
@openstack_service_name = options[:openstack_service_name] || ['image']
|
||||
@openstack_service_name = options[:openstack_service_name] || ['image']
|
||||
|
||||
@connection_options = options[:connection_options] || {}
|
||||
|
||||
|
@ -157,6 +158,7 @@ module Fog
|
|||
def authenticate
|
||||
if @openstack_must_reauthenticate || @openstack_auth_token.nil?
|
||||
options = {
|
||||
:openstack_tenant => @openstack_tenant,
|
||||
:openstack_api_key => @openstack_api_key,
|
||||
:openstack_username => @openstack_username,
|
||||
:openstack_auth_uri => @openstack_auth_uri,
|
||||
|
|
Loading…
Reference in a new issue