3 define_request :create_token, :inherit => [:openstack, :common, :v2, :public, :base] do
6 meta :service, :identity
9 'http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_authenticate_v2.0_tokens_.html'
11 link 'documentation bug',
12 'https://bugs.launchpad.net/keystone/+bug/1208607'
15 param :username, :required => false
16 param :password, :required => false
17 param :tokenId, :required => false, :alias => :token_id
18 param :tenantName, :required => false, :alias => :tenant_name
19 param :tenantId, :required => false, :alias => :tenant_id
23 p = if params[:tokenId]
27 :id => params[:tokenId]
34 :passwordCredentials => {
35 :username => params[:username],
36 :password => params[:password]
42 p[:auth][:tenantName] = params[:tenantName] if params[:tenantName]
43 p[:auth][:tenantId] = params[:tenantId] if params[:tenantId]
55 url = session_data[:auth_service][:host_uri]
56 url += '/v2.0' if (URI(url).path =~ /^\/?\w+/).nil?