Implements #11: reboot_server

This commit is contained in:
Mark Maglana
2013-09-06 21:58:34 -07:00
parent 5106c1557d
commit 3aeab58fb1
8 changed files with 667 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
module Aviator
define_request :reboot_server do
meta :provider, :openstack
meta :service, :compute
meta :api_version, :v2
meta :endpoint_type, :public
link 'documentation',
'http://docs.openstack.org/api/openstack-compute/2/content/Reboot_Server-d1e3371.html'
param :id, required: true
param :type, required: false
def body
p = {
reboot: {
type: params[:type] || 'SOFT'
}
}
p
end
def headers
h = {}
unless self.anonymous?
h['X-Auth-Token'] = session_data[:access][:token][:id]
end
h
end
def http_method
:post
end
def url
service_spec = session_data[:access][:serviceCatalog].find{|s| s[:type] == service.to_s }
"#{ service_spec[:endpoints][0][:publicURL] }/servers/#{ params[:id] }/action"
end
end
end

View File

@@ -0,0 +1,137 @@
require 'test_helper'
class Aviator::Test
describe 'aviator/openstack/compute/v2/public/reboot_server' do
def create_request(session_data = get_session_data, &block)
block ||= lambda do |params|
params[:id] = 0
end
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', 'reboot_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 :optional_params do
klass.optional_params.must_equal [
:type
]
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 = '105b09f0b6500d36168480ad84'
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
server = session.compute_service.request(:list_servers).body[:servers].first
server_id = server[:id]
response = session.compute_service.request :reboot_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 :reboot_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

View File

@@ -0,0 +1,97 @@
---
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:
- '2701'
date:
- Sat, 07 Sep 2013 04:58:10 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-07T04:58:10.045866",
"expires": "2013-09-07T10:58:09Z", "id": "459ab3e27d874ff88bb1585853b709ae",
"tenant": {"description": "<OPENSTACK_MEMBER_TENANTNAME>", "enabled": true,
"id": "eb87dfa8fdec48678b0f0b0f80b44677", "name": "<OPENSTACK_MEMBER_TENANTNAME>"}},
"serviceCatalog": [{"endpoints": [{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "430279a1221947c3ae56339b069f1b34", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:9292", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:9292",
"id": "0704bbb682c349cd8bad917183e7a7dd", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:8777", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8777",
"id": "94a8dead81c34afbaa8ae5e163b8b0c5", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "2aedb2fe28114b86a13c48e8bef42b77", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Admin", "region":
"RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud",
"id": "308574230d4a427a996d1f9c6e602e14", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:35357/v2.0", "region": "RegionOne", "internalURL":
"<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0", "id": "04e2c1aa204048529cd859b111362d46",
"publicURL": "<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "400351b4991d40d79434539b4cee9d36", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"972b832749e5458cafe44d40d5b0e895"]}}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:58:11 GMT
- request:
method: post
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/servers/abogusserveridthatdoesnotexist/action
body:
encoding: UTF-8
string: ! '{"reboot":{"type":"SOFT"}}'
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 459ab3e27d874ff88bb1585853b709ae
response:
status:
code: 404
message:
headers:
content-length:
- '73'
content-type:
- application/json; charset=UTF-8
x-compute-request-id:
- req-b6ea4ac6-1b36-4a85-959e-3984f83d9207
date:
- Sat, 07 Sep 2013 04:58:10 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"itemNotFound": {"message": "Instance could not be found", "code":
404}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:58:12 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,130 @@
---
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:
- '2701'
date:
- Sat, 07 Sep 2013 04:57:27 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-07T04:57:27.687660",
"expires": "2013-09-07T10:57:27Z", "id": "38be8f64ae8f4adc952426096fd28a37",
"tenant": {"description": "<OPENSTACK_MEMBER_TENANTNAME>", "enabled": true,
"id": "eb87dfa8fdec48678b0f0b0f80b44677", "name": "<OPENSTACK_MEMBER_TENANTNAME>"}},
"serviceCatalog": [{"endpoints": [{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "430279a1221947c3ae56339b069f1b34", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:9292", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:9292",
"id": "0704bbb682c349cd8bad917183e7a7dd", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:8777", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8777",
"id": "94a8dead81c34afbaa8ae5e163b8b0c5", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "2aedb2fe28114b86a13c48e8bef42b77", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Admin", "region":
"RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud",
"id": "308574230d4a427a996d1f9c6e602e14", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:35357/v2.0", "region": "RegionOne", "internalURL":
"<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0", "id": "04e2c1aa204048529cd859b111362d46",
"publicURL": "<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "400351b4991d40d79434539b4cee9d36", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"972b832749e5458cafe44d40d5b0e895"]}}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:57:28 GMT
- request:
method: get
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/servers
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 38be8f64ae8f4adc952426096fd28a37
response:
status:
code: 200
message:
headers:
x-compute-request-id:
- req-5b8f50bf-7568-425c-86b5-2a3a7c6c7bd5
content-type:
- application/json
content-length:
- '390'
date:
- Sat, 07 Sep 2013 04:57:28 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"servers": [{"id": "7ff01c2a-325d-4c05-ac77-5f76df18962a", "links":
[{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/servers/7ff01c2a-325d-4c05-ac77-5f76df18962a",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/servers/7ff01c2a-325d-4c05-ac77-5f76df18962a",
"rel": "bookmark"}], "name": "Aviator Testing"}]}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:57:30 GMT
- request:
method: post
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/servers/7ff01c2a-325d-4c05-ac77-5f76df18962a/action
body:
encoding: UTF-8
string: ! '{"reboot":{"type":"SOFT"}}'
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 38be8f64ae8f4adc952426096fd28a37
response:
status:
code: 202
message:
headers:
content-type:
- text/html; charset=UTF-8
content-length:
- '0'
date:
- Sat, 07 Sep 2013 04:57:29 GMT
connection:
- close
body:
encoding: US-ASCII
string: ''
http_version:
recorded_at: Sat, 07 Sep 2013 04:57:30 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,63 @@
---
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:
- '2701'
date:
- Sat, 07 Sep 2013 04:49:15 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-07T04:49:15.132910",
"expires": "2013-09-07T10:49:15Z", "id": "11fe3ddaee1743a0a1ecc8821f8ebfbb",
"tenant": {"description": "<OPENSTACK_MEMBER_TENANTNAME>", "enabled": true,
"id": "eb87dfa8fdec48678b0f0b0f80b44677", "name": "<OPENSTACK_MEMBER_TENANTNAME>"}},
"serviceCatalog": [{"endpoints": [{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "430279a1221947c3ae56339b069f1b34", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:9292", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:9292",
"id": "0704bbb682c349cd8bad917183e7a7dd", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:8777", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8777",
"id": "94a8dead81c34afbaa8ae5e163b8b0c5", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "2aedb2fe28114b86a13c48e8bef42b77", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Admin", "region":
"RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud",
"id": "308574230d4a427a996d1f9c6e602e14", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:35357/v2.0", "region": "RegionOne", "internalURL":
"<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0", "id": "04e2c1aa204048529cd859b111362d46",
"publicURL": "<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "400351b4991d40d79434539b4cee9d36", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"972b832749e5458cafe44d40d5b0e895"]}}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:49:16 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,63 @@
---
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:
- '2701'
date:
- Sat, 07 Sep 2013 04:52:25 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-07T04:52:25.062722",
"expires": "2013-09-07T10:52:24Z", "id": "811ca6f6f4b64d938a903ec704556325",
"tenant": {"description": "<OPENSTACK_MEMBER_TENANTNAME>", "enabled": true,
"id": "eb87dfa8fdec48678b0f0b0f80b44677", "name": "<OPENSTACK_MEMBER_TENANTNAME>"}},
"serviceCatalog": [{"endpoints": [{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "430279a1221947c3ae56339b069f1b34", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:9292", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:9292",
"id": "0704bbb682c349cd8bad917183e7a7dd", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:8777", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8777",
"id": "94a8dead81c34afbaa8ae5e163b8b0c5", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "2aedb2fe28114b86a13c48e8bef42b77", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Admin", "region":
"RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud",
"id": "308574230d4a427a996d1f9c6e602e14", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:35357/v2.0", "region": "RegionOne", "internalURL":
"<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0", "id": "04e2c1aa204048529cd859b111362d46",
"publicURL": "<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "400351b4991d40d79434539b4cee9d36", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"972b832749e5458cafe44d40d5b0e895"]}}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:52:26 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,63 @@
---
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:
- '2701'
date:
- Sat, 07 Sep 2013 04:52:40 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-07T04:52:40.907462",
"expires": "2013-09-07T10:52:40Z", "id": "a1fcd35e841949188f3307d7bb69cb0f",
"tenant": {"description": "<OPENSTACK_MEMBER_TENANTNAME>", "enabled": true,
"id": "eb87dfa8fdec48678b0f0b0f80b44677", "name": "<OPENSTACK_MEMBER_TENANTNAME>"}},
"serviceCatalog": [{"endpoints": [{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "430279a1221947c3ae56339b069f1b34", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:9292", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:9292",
"id": "0704bbb682c349cd8bad917183e7a7dd", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:8777", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8777",
"id": "94a8dead81c34afbaa8ae5e163b8b0c5", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "2aedb2fe28114b86a13c48e8bef42b77", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Admin", "region":
"RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud",
"id": "308574230d4a427a996d1f9c6e602e14", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:35357/v2.0", "region": "RegionOne", "internalURL":
"<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0", "id": "04e2c1aa204048529cd859b111362d46",
"publicURL": "<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "400351b4991d40d79434539b4cee9d36", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"972b832749e5458cafe44d40d5b0e895"]}}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:52:42 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,63 @@
---
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:
- '2701'
date:
- Sat, 07 Sep 2013 04:54:41 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-07T04:54:41.055155",
"expires": "2013-09-07T10:54:41Z", "id": "2bd42e33401a4c12aca2a744a2224f00",
"tenant": {"description": "<OPENSTACK_MEMBER_TENANTNAME>", "enabled": true,
"id": "eb87dfa8fdec48678b0f0b0f80b44677", "name": "<OPENSTACK_MEMBER_TENANTNAME>"}},
"serviceCatalog": [{"endpoints": [{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "430279a1221947c3ae56339b069f1b34", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:9292", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:9292",
"id": "0704bbb682c349cd8bad917183e7a7dd", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:8777", "region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8777",
"id": "94a8dead81c34afbaa8ae5e163b8b0c5", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"region": "RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677",
"id": "2aedb2fe28114b86a13c48e8bef42b77", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8776/v1/eb87dfa8fdec48678b0f0b0f80b44677"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Admin", "region":
"RegionOne", "internalURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud",
"id": "308574230d4a427a996d1f9c6e602e14", "publicURL": "<OPENSTACK_ADMIN_HOST_URI>:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"<OPENSTACK_ADMIN_HOST_URI>:35357/v2.0", "region": "RegionOne", "internalURL":
"<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0", "id": "04e2c1aa204048529cd859b111362d46",
"publicURL": "<OPENSTACK_ADMIN_HOST_URI>:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "400351b4991d40d79434539b4cee9d36", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"972b832749e5458cafe44d40d5b0e895"]}}}'
http_version:
recorded_at: Sat, 07 Sep 2013 04:54:42 GMT
recorded_with: VCR 2.5.0