[compute] Add suspend_server request
This commit is contained in:
34
lib/aviator/openstack/compute/v2/public/suspend_server.rb
Normal file
34
lib/aviator/openstack/compute/v2/public/suspend_server.rb
Normal file
@@ -0,0 +1,34 @@
|
||||
module Aviator
|
||||
|
||||
define_request :suspend_server, inherit: [:openstack, :common, :v2, :public, :base] do
|
||||
|
||||
meta :service, :compute
|
||||
|
||||
link 'documentation',
|
||||
'http://docs.openstack.org/api/openstack-compute/2/content/POST_suspend_v2__tenant_id__servers__server_id__action_ext-os-admin-actions.html'
|
||||
|
||||
param :id, required: true
|
||||
|
||||
|
||||
def body
|
||||
{ suspend: nil }
|
||||
end
|
||||
|
||||
|
||||
def headers
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
def http_method
|
||||
:post
|
||||
end
|
||||
|
||||
|
||||
def url
|
||||
"#{ base_url_for :public }/servers/#{ params[:id] }/action"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
125
test/aviator/openstack/compute/v2/public/suspend_server_test.rb
Normal file
125
test/aviator/openstack/compute/v2/public/suspend_server_test.rb
Normal file
@@ -0,0 +1,125 @@
|
||||
require 'test_helper'
|
||||
|
||||
class Aviator::Test
|
||||
|
||||
describe 'aviator/openstack/compute/v2/public/suspend_server' do
|
||||
|
||||
def create_request(session_data = get_session_data, &block)
|
||||
block ||= lambda { |params| params[: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', 'compute', 'v2', 'public', 'suspend_server.rb')
|
||||
end
|
||||
|
||||
|
||||
def session
|
||||
unless @session
|
||||
@session = Aviator::Session.new(
|
||||
config_file: Environment.path,
|
||||
environment: 'openstack_member'
|
||||
)
|
||||
@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 :public
|
||||
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 :post
|
||||
end
|
||||
|
||||
|
||||
validate_attr :required_params do
|
||||
klass.required_params.must_equal [:id]
|
||||
end
|
||||
|
||||
|
||||
validate_attr :url do
|
||||
service_spec = get_session_data[:access][:serviceCatalog].find{ |s| s[:type] == 'compute' }
|
||||
server_id = 'sampleId'
|
||||
url = "#{ service_spec[:endpoints][0][:publicURL] }/servers/#{ server_id }/action"
|
||||
|
||||
request = create_request do |params|
|
||||
params[:id] = server_id
|
||||
end
|
||||
|
||||
request.url.must_equal url
|
||||
end
|
||||
|
||||
|
||||
validate_response 'valid params are provided' do
|
||||
service = session.compute_service
|
||||
server = service.request(:list_servers).body[:servers].first
|
||||
|
||||
response = service.request :suspend_server do |params|
|
||||
params[:id] = server[:id]
|
||||
end
|
||||
|
||||
response.status.must_equal 202
|
||||
response.headers.wont_be_nil
|
||||
end
|
||||
|
||||
|
||||
validate_response 'invalid server id is provided' do
|
||||
server_id = 'abogusserveridthatdoesnotexist'
|
||||
|
||||
response = session.compute_service.request :suspend_server do |params|
|
||||
params[:id] = server_id
|
||||
end
|
||||
|
||||
response.status.must_equal 404
|
||||
response.body.wont_be_nil
|
||||
response.headers.wont_be_nil
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_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:
|
||||
- '2677'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:23 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-25T02:08:23.535164",
|
||||
"expires": "2013-09-26T02:08:23Z", "id": "32b5e0a442e74c1f86fcdb52ca78badb",
|
||||
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "3cc6591515c24569bc5342bc82159a77", "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": "6842e55991f14f66b1ccf7c924d83ca6", "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": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"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": "3c91fce7434e4a798e8093841d09c6cc",
|
||||
"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":
|
||||
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
||||
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
||||
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
||||
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:23 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers/abogusserveridthatdoesnotexist/action
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"suspend":null}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
X-Auth-Token:
|
||||
- 32b5e0a442e74c1f86fcdb52ca78badb
|
||||
response:
|
||||
status:
|
||||
code: 404
|
||||
message:
|
||||
headers:
|
||||
content-length:
|
||||
- '73'
|
||||
content-type:
|
||||
- application/json; charset=UTF-8
|
||||
x-compute-request-id:
|
||||
- req-78037332-6cd5-4064-a715-269d4ee6cbb1
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:23 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"itemNotFound": {"message": "Instance could not be found", "code":
|
||||
404}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:23 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_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:
|
||||
- '2677'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:24 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-25T02:08:24.037534",
|
||||
"expires": "2013-09-26T02:08:23Z", "id": "0b55524c320c4b0f87e2372966b673d1",
|
||||
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "3cc6591515c24569bc5342bc82159a77", "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": "6842e55991f14f66b1ccf7c924d83ca6", "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": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"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": "3c91fce7434e4a798e8093841d09c6cc",
|
||||
"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":
|
||||
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
||||
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
||||
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
||||
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:24 GMT
|
||||
- request:
|
||||
method: get
|
||||
uri: http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
X-Auth-Token:
|
||||
- 0b55524c320c4b0f87e2372966b673d1
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message:
|
||||
headers:
|
||||
x-compute-request-id:
|
||||
- req-5c05caa3-e474-48a8-a889-755fa8e680b6
|
||||
content-type:
|
||||
- application/json
|
||||
content-length:
|
||||
- '360'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:24 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"servers": [{"id": "9e43634d-71bf-4e04-97b3-783ce9e6d4bc", "links":
|
||||
[{"href": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers/9e43634d-71bf-4e04-97b3-783ce9e6d4bc",
|
||||
"rel": "self"}, {"href": "http://127.0.0.1:8774/87b582d56d3f4ed19a25c919bb59a6f0/servers/9e43634d-71bf-4e04-97b3-783ce9e6d4bc",
|
||||
"rel": "bookmark"}], "name": "test-instance"}]}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:24 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers/9e43634d-71bf-4e04-97b3-783ce9e6d4bc/action
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"suspend":null}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- Faraday v0.8.8
|
||||
X-Auth-Token:
|
||||
- 0b55524c320c4b0f87e2372966b673d1
|
||||
response:
|
||||
status:
|
||||
code: 202
|
||||
message:
|
||||
headers:
|
||||
content-type:
|
||||
- text/html; charset=UTF-8
|
||||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:24 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:24 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_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:
|
||||
- '2677'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:23 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-25T02:08:23.820142",
|
||||
"expires": "2013-09-26T02:08:23Z", "id": "de11763d8dc24a9bb80f4d62cd613f8e",
|
||||
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "3cc6591515c24569bc5342bc82159a77", "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": "6842e55991f14f66b1ccf7c924d83ca6", "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": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"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": "3c91fce7434e4a798e8093841d09c6cc",
|
||||
"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":
|
||||
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
||||
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
||||
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
||||
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:23 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_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:
|
||||
- '2677'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:24 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-25T02:08:24.924491",
|
||||
"expires": "2013-09-26T02:08:24Z", "id": "bbf730abb77d4d12b6809dd4cbe945ec",
|
||||
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "3cc6591515c24569bc5342bc82159a77", "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": "6842e55991f14f66b1ccf7c924d83ca6", "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": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"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": "3c91fce7434e4a798e8093841d09c6cc",
|
||||
"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":
|
||||
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
||||
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
||||
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
||||
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:24 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_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:
|
||||
- '2677'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:23 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-25T02:08:23.327378",
|
||||
"expires": "2013-09-26T02:08:23Z", "id": "a7ce4e67e354488eabc77efa1ef4046e",
|
||||
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "3cc6591515c24569bc5342bc82159a77", "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": "6842e55991f14f66b1ccf7c924d83ca6", "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": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"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": "3c91fce7434e4a798e8093841d09c6cc",
|
||||
"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":
|
||||
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
||||
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
||||
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
||||
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:23 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_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:
|
||||
- '2677'
|
||||
date:
|
||||
- Wed, 25 Sep 2013 02:08:24 GMT
|
||||
connection:
|
||||
- close
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ! '{"access": {"token": {"issued_at": "2013-09-25T02:08:24.678306",
|
||||
"expires": "2013-09-26T02:08:24Z", "id": "87f7c553eea14f109d4432c2f0127f76",
|
||||
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
||||
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
||||
"id": "3cc6591515c24569bc5342bc82159a77", "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": "6842e55991f14f66b1ccf7c924d83ca6", "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": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
||||
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
||||
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
||||
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
||||
"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": "3c91fce7434e4a798e8093841d09c6cc",
|
||||
"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":
|
||||
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
||||
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
||||
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
||||
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
||||
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
||||
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
||||
http_version:
|
||||
recorded_at: Wed, 25 Sep 2013 02:08:24 GMT
|
||||
recorded_with: VCR 2.5.0
|
||||
Reference in New Issue
Block a user