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

All OpenStack heat requests must contain User/Key.

Updates the OpenStack Orchestration request() method
so that all requests contain the X-Auth-User and X-Auth-Key
headers.

Heat requires these parameters so that it can make subsequent requests
based on the users behalf.

For reference see here:

https://github.com/openstack/python-heatclient/blob/master/heatclient/common/http.py#L186
This commit is contained in:
Dan Prince 2013-09-30 22:39:59 -04:00
parent 0f8cc3c27f
commit c284578ee6

View file

@ -138,7 +138,9 @@ module Fog
:headers => { :headers => {
'Content-Type' => 'application/json', 'Content-Type' => 'application/json',
'Accept' => 'application/json', 'Accept' => 'application/json',
'X-Auth-Token' => @auth_token 'X-Auth-Token' => @auth_token,
'X-Auth-User' => @openstack_username,
'X-Auth-Key' => @openstack_api_key
}.merge!(params[:headers] || {}), }.merge!(params[:headers] || {}),
:host => @host, :host => @host,
:path => "#{@path}/#{@tenant_id}/#{params[:path]}", :path => "#{@path}/#{@tenant_id}/#{params[:path]}",