[identity] Add update_user request
This commit is contained in:
61
lib/aviator/openstack/identity/v2/admin/update_user.rb
Normal file
61
lib/aviator/openstack/identity/v2/admin/update_user.rb
Normal file
@@ -0,0 +1,61 @@
|
||||
module Aviator
|
||||
|
||||
define_request :update_user do
|
||||
|
||||
meta :provider, :openstack
|
||||
meta :service, :identity
|
||||
meta :api_version, :v2
|
||||
meta :endpoint_type, :admin
|
||||
|
||||
|
||||
link 'documentation',
|
||||
'http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_updateUser_v2.0_users__userId__.html'
|
||||
|
||||
|
||||
param :id, required: true
|
||||
param :name, required: false
|
||||
param :password, required: false
|
||||
param :email, required: false
|
||||
param :enabled, required: false
|
||||
param :tenant_id, required: false
|
||||
|
||||
|
||||
def body
|
||||
p = {
|
||||
user: {}
|
||||
}
|
||||
|
||||
(optional_params - [:tenant_id]).each do |key|
|
||||
p[:user][key] = params[key] if params[key]
|
||||
end
|
||||
|
||||
p[:user][:tenantId] = params[:tenant_id] if params[:tenant_id]
|
||||
|
||||
p
|
||||
end
|
||||
|
||||
|
||||
def headers
|
||||
h = {}
|
||||
|
||||
unless self.anonymous?
|
||||
h['X-Auth-Token'] = session_data[:access][:token][:id]
|
||||
end
|
||||
|
||||
h
|
||||
end
|
||||
|
||||
|
||||
def http_method
|
||||
:put
|
||||
end
|
||||
|
||||
|
||||
def url
|
||||
service_spec = session_data[:access][:serviceCatalog].find { |s| s[:type] == 'identity' }
|
||||
"#{ service_spec[:endpoints][0][:adminURL] }/users/#{ params[:id] }"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
143
test/aviator/openstack/identity/v2/admin/update_user_test.rb
Normal file
143
test/aviator/openstack/identity/v2/admin/update_user_test.rb
Normal file
@@ -0,0 +1,143 @@
|
||||
require 'test_helper'
|
||||
|
||||
class Aviator::Test
|
||||
|
||||
describe 'aviator/openstack/identity/v2/admin/update_user' do
|
||||
|
||||
def create_request(session_data = get_session_data, &block)
|
||||
block ||= lambda { |p| p[:id] = 0 }
|
||||
klass.new(session_data, &block)
|
||||
end
|
||||
|
||||
|
||||
def get_session_data
|
||||
session.send :auth_info
|
||||
end
|
||||
|
||||
|
||||
def helper
|
||||
Aviator::Test::RequestHelper
|
||||
end
|
||||
|
||||
|
||||
def klass
|
||||
@klass ||= helper.load_request('openstack', 'identity', 'v2', 'admin', 'update_user.rb')
|
||||
end
|
||||
|
||||
|
||||
def session
|
||||
unless @session
|
||||
@session = Aviator::Session.new(
|
||||
config_file: Environment.path,
|
||||
environment: 'openstack_admin'
|
||||
)
|
||||
@session.authenticate
|
||||
end
|
||||
|
||||
@session
|
||||
end
|
||||
|
||||
|
||||
validate_attr :anonymous? do
|
||||
klass.anonymous?.must_equal false
|
||||
end
|
||||
|
||||
|
||||
validate_attr :api_version do
|
||||
klass.api_version.must_equal :v2
|
||||
end
|
||||
|
||||
validate_attr :body do
|
||||
request = create_request
|
||||
|
||||
klass.body?.must_equal true
|
||||
request.body?.must_equal true
|
||||
request.body.wont_be_nil
|
||||
end
|
||||
|
||||
|
||||
validate_attr :endpoint_type do
|
||||
klass.endpoint_type.must_equal :admin
|
||||
end
|
||||
|
||||
|
||||
validate_attr :headers do
|
||||
headers = { 'X-Auth-Token' => get_session_data[:access][:token][:id] }
|
||||
|
||||
request = create_request
|
||||
|
||||
request.headers.must_equal headers
|
||||
end
|
||||
|
||||
|
||||
validate_attr :http_method do
|
||||
create_request.http_method.must_equal :put
|
||||
end
|
||||
|
||||
|
||||
validate_attr :required_params do
|
||||
klass.required_params.must_equal [:id]
|
||||
end
|
||||
|
||||
|
||||
validate_attr :optional_params do
|
||||
klass.optional_params.must_equal [
|
||||
:name,
|
||||
:password,
|
||||
:email,
|
||||
:enabled,
|
||||
:tenant_id
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
validate_attr :url do
|
||||
user_id = 'thisdoesntneedtobevalidinthistest'
|
||||
|
||||
service_spec = get_session_data[:access][:serviceCatalog].find { |s| s[:type] == 'identity' }
|
||||
url = "#{ service_spec[:endpoints][0][:adminURL] }/users/#{ user_id }"
|
||||
|
||||
request = create_request do |params|
|
||||
params[:id] = user_id
|
||||
end
|
||||
|
||||
request.url.must_equal url
|
||||
end
|
||||
|
||||
|
||||
validate_response 'valid user id is provided' do
|
||||
# must be hardcoded so as not to inadvertently alter random resources
|
||||
# in case the corresponding cassette is deleted
|
||||
user_id = 'cf086a74f0854398a2a8f6bbee2029e8'
|
||||
new_name = 'updated_name'
|
||||
|
||||
response = session.identity_service.request :update_user do |params|
|
||||
params[:id] = user_id
|
||||
params[:name] = new_name
|
||||
end
|
||||
|
||||
response.status.must_equal 200
|
||||
response.body.wont_be_nil
|
||||
response.body[:user].wont_be_nil
|
||||
response.body[:user][:name].must_equal new_name
|
||||
response.headers.wont_be_nil
|
||||
end
|
||||
|
||||
|
||||
validate_response 'invalid user id is provided' do
|
||||
user_id = 'abogususeridthatdoesnotexist'
|
||||
|
||||
response = session.identity_service.request :update_user do |params|
|
||||
params[:id] = user_id
|
||||
params[:name] = 'it does not matter'
|
||||
end
|
||||
|
||||
response.status.must_equal 404
|
||||
response.body.wont_be_nil
|
||||
response.headers.wont_be_nil
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,98 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_ADMIN_USERNAME>","password":"<OPENSTACK_ADMIN_PASSWORD>"},"tenantName":"<OPENSTACK_ADMIN_TENANTNAME>"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '2573'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:00:39.429150",
|
||||
"expires": "2013-09-18T07:00:39Z", "id": "68a40e859acc46b4932052072c3e48d9",
|
||||
"tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"name": "<OPENSTACK_ADMIN_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}],
|
||||
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
||||
"id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}],
|
||||
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
||||
"id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
||||
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096",
|
||||
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
||||
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
||||
"011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_ADMIN_USERNAME>", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a",
|
||||
"roles": [{"name": "admin"}], "name": "<OPENSTACK_ADMIN_USERNAME>"}, "metadata":
|
||||
{"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
- request:
|
||||
method: put
|
||||
uri: http://127.0.0.1:35357/v2.0/users/abogususeridthatdoesnotexist
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"user":{"name":"it does not matter"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
X-Auth-Token:
|
||||
- 68a40e859acc46b4932052072c3e48d9
|
||||
response:
|
||||
status:
|
||||
code: 404
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '110'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"error": {"message": "Could not find user: abogususeridthatdoesnotexist",
|
||||
"code": 404, "title": "Not Found"}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_ADMIN_USERNAME>","password":"<OPENSTACK_ADMIN_PASSWORD>"},"tenantName":"<OPENSTACK_ADMIN_TENANTNAME>"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '2573'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:00:39.106411",
|
||||
"expires": "2013-09-18T07:00:39Z", "id": "896b98072fba47ed8f767a4a46533fcf",
|
||||
"tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"name": "<OPENSTACK_ADMIN_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}],
|
||||
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
||||
"id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}],
|
||||
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
||||
"id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
||||
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096",
|
||||
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
||||
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
||||
"011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_ADMIN_USERNAME>", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a",
|
||||
"roles": [{"name": "admin"}], "name": "<OPENSTACK_ADMIN_USERNAME>"}, "metadata":
|
||||
{"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
- request:
|
||||
method: put
|
||||
uri: http://127.0.0.1:35357/v2.0/users/cf086a74f0854398a2a8f6bbee2029e8
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"user":{"name":"updated_name"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
X-Auth-Token:
|
||||
- 896b98072fba47ed8f767a4a46533fcf
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '272'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"user": {"name": "updated_name", "extra": {"email": "newusername@example.org",
|
||||
"tenantId": "e7b1b62aa1474f758c4974b8be44cf6c"}, "enabled": true, "email":
|
||||
"newusername@example.org", "id": "cf086a74f0854398a2a8f6bbee2029e8", "tenantId":
|
||||
"e7b1b62aa1474f758c4974b8be44cf6c"}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_ADMIN_USERNAME>","password":"<OPENSTACK_ADMIN_PASSWORD>"},"tenantName":"<OPENSTACK_ADMIN_TENANTNAME>"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '2573'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:38 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:00:38.948708",
|
||||
"expires": "2013-09-18T07:00:38Z", "id": "7b1f3c1a404c430c854a43ca64ae2962",
|
||||
"tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"name": "<OPENSTACK_ADMIN_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}],
|
||||
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
||||
"id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}],
|
||||
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
||||
"id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
||||
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096",
|
||||
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
||||
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
||||
"011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_ADMIN_USERNAME>", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a",
|
||||
"roles": [{"name": "admin"}], "name": "<OPENSTACK_ADMIN_USERNAME>"}, "metadata":
|
||||
{"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_ADMIN_USERNAME>","password":"<OPENSTACK_ADMIN_PASSWORD>"},"tenantName":"<OPENSTACK_ADMIN_TENANTNAME>"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '2573'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:00:39.593505",
|
||||
"expires": "2013-09-18T07:00:39Z", "id": "cf30ac5ec307457cac9c54c3be4bd9ac",
|
||||
"tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"name": "<OPENSTACK_ADMIN_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}],
|
||||
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
||||
"id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}],
|
||||
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
||||
"id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
||||
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096",
|
||||
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
||||
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
||||
"011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_ADMIN_USERNAME>", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a",
|
||||
"roles": [{"name": "admin"}], "name": "<OPENSTACK_ADMIN_USERNAME>"}, "metadata":
|
||||
{"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_ADMIN_USERNAME>","password":"<OPENSTACK_ADMIN_PASSWORD>"},"tenantName":"<OPENSTACK_ADMIN_TENANTNAME>"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '2573'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:00:39.722482",
|
||||
"expires": "2013-09-18T07:00:39Z", "id": "3da2c5bfd10b4c5cb715adabc987fdb4",
|
||||
"tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"name": "<OPENSTACK_ADMIN_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}],
|
||||
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
||||
"id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}],
|
||||
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
||||
"id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
||||
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096",
|
||||
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
||||
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
||||
"011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_ADMIN_USERNAME>", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a",
|
||||
"roles": [{"name": "admin"}], "name": "<OPENSTACK_ADMIN_USERNAME>"}, "metadata":
|
||||
{"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:42 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_ADMIN_USERNAME>","password":"<OPENSTACK_ADMIN_PASSWORD>"},"tenantName":"<OPENSTACK_ADMIN_TENANTNAME>"}}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
vary:
|
||||
- X-Auth-Token
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '2573'
|
||||
date:
|
||||
- Tue, 17 Sep 2013 07:00:39 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:00:39.298207",
|
||||
"expires": "2013-09-18T07:00:39Z", "id": "71311086ab614d2a9a7b1bbaefa35796",
|
||||
"tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"name": "<OPENSTACK_ADMIN_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}],
|
||||
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
||||
"id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}],
|
||||
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
||||
"id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a",
|
||||
"id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}],
|
||||
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
||||
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096",
|
||||
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
||||
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
||||
"011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_ADMIN_USERNAME>", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a",
|
||||
"roles": [{"name": "admin"}], "name": "<OPENSTACK_ADMIN_USERNAME>"}, "metadata":
|
||||
{"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}'
|
||||
http_version:
|
||||
recorded_at: Tue, 17 Sep 2013 07:00:41 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
Reference in New Issue
Block a user