Implements #10: list_addresses

This commit is contained in:
Mark Maglana
2013-09-06 14:05:05 -07:00
parent 90d75defe4
commit c1e46a45f9
8 changed files with 656 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
module Aviator
define_request :list_addresses 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/List_Addresses-d1e3014.html'
param :id, required: true
def headers
h = {}
unless self.anonymous?
h['X-Auth-Token'] = session_data[:access][:token][:id]
end
h
end
def http_method
:get
end
def url
service_spec = session_data[:access][:serviceCatalog].find{|s| s[:type] == service.to_s }
"#{ service_spec[:endpoints][0][:publicURL] }/servers/#{ params[:id] }/ips"
end
end
end

View File

@@ -0,0 +1,137 @@
require 'test_helper'
class Aviator::Test
describe 'aviator/openstack/compute/v2/public/list_addresses' do
def create_request(session_data = get_session_data, &block)
klass.new(session_data, &block)
end
def session
unless @session
@session = Aviator::Session.new(
config_file: Environment.path,
environment: 'openstack_member'
)
@session.authenticate
end
@session
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', 'list_addresses.rb')
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
klass.body?.must_equal false
request = create_request do |params|
params[:id] = 'doesntmatter'
end
request.body?.must_equal false
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 do |params|
params[:id] = 'doesntmatter'
end
request.headers.must_equal headers
end
validate_attr :http_method do
request = create_request do |params|
params[:id] = 'doesntmatter'
end
request.http_method.must_equal :get
end
validate_attr :optional_params do
klass.optional_params.must_equal []
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 = '52415800-8b69-11e0-9b19-734f000004d2'
url = "#{ service_spec[:endpoints][0][:publicURL] }/servers/#{ server_id }/ips"
request = create_request do |p|
p[:id] = server_id
end
request.url.must_equal url
end
validate_response 'a valid server id is provided' do
server_id = session.compute_service.request(:list_servers).body[:servers].first[:id]
response = session.compute_service.request :list_addresses do |params|
params[:id] = server_id
end
response.status.must_equal 200
response.body.wont_be_nil
response.body[:addresses].wont_be_nil
response.headers.wont_be_nil
end
validate_response 'an invalid server id is provided' do
server_id = 'bogusserveridthatdoesntexist'
response = session.compute_service.request :list_addresses 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,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:
- '2701'
date:
- Fri, 06 Sep 2013 21:02:37 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-06T21:02:37.674709",
"expires": "2013-09-07T03:02:37Z", "id": "f8e7bf962b234ad0a213a9c7210c871b",
"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: Fri, 06 Sep 2013 21:02:37 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:
- f8e7bf962b234ad0a213a9c7210c871b
response:
status:
code: 200
message:
headers:
x-compute-request-id:
- req-be56eb1c-d239-4581-acc6-3c1e3b9b1146
content-type:
- application/json
content-length:
- '390'
date:
- Fri, 06 Sep 2013 21:02:38 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: Fri, 06 Sep 2013 21:02:38 GMT
- request:
method: get
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/servers/7ff01c2a-325d-4c05-ac77-5f76df18962a/ips
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- f8e7bf962b234ad0a213a9c7210c871b
response:
status:
code: 200
message:
headers:
x-compute-request-id:
- req-534d55d3-c737-4535-b907-9b466a31ed39
content-type:
- application/json
content-length:
- '70'
date:
- Fri, 06 Sep 2013 21:02:38 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"addresses": {"novanetwork_5": [{"version": 4, "addr": "10.3.5.3"}]}}'
http_version:
recorded_at: Fri, 06 Sep 2013 21:02:38 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,96 @@
---
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:
- Fri, 06 Sep 2013 21:03:09 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-06T21:03:09.866179",
"expires": "2013-09-07T03:03:09Z", "id": "4ee99d0994f147e09c646979001c2cf5",
"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: Fri, 06 Sep 2013 21:03:09 GMT
- request:
method: get
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/servers/bogusserveridthatdoesntexist/ips
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 4ee99d0994f147e09c646979001c2cf5
response:
status:
code: 404
message:
headers:
content-length:
- '69'
content-type:
- application/json; charset=UTF-8
x-compute-request-id:
- req-dcf7fa4c-6184-46a6-af33-2928423ea02e
date:
- Fri, 06 Sep 2013 21:03:10 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"itemNotFound": {"message": "Instance does not exist", "code": 404}}'
http_version:
recorded_at: Fri, 06 Sep 2013 21:03:10 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:
- Fri, 06 Sep 2013 20:37:59 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-06T20:37:59.515071",
"expires": "2013-09-07T02:37:59Z", "id": "b97f6f0220db4bca9ca950de485261fd",
"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: Fri, 06 Sep 2013 20:37:59 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:
- Fri, 06 Sep 2013 20:38:23 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-06T20:38:23.164106",
"expires": "2013-09-07T02:38:23Z", "id": "1294e6f286394d3f9656b3231d2a340d",
"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: Fri, 06 Sep 2013 20:38:23 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:
- Fri, 06 Sep 2013 20:38:43 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-06T20:38:43.471622",
"expires": "2013-09-07T02:38:43Z", "id": "e7b67bc6fb34436ca06d130d2cd78638",
"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: Fri, 06 Sep 2013 20:38:43 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:
- Fri, 06 Sep 2013 20:39:35 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-06T20:39:35.452945",
"expires": "2013-09-07T02:39:35Z", "id": "e23676461c5f442e90f78d5cecf8b2f6",
"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: Fri, 06 Sep 2013 20:39:35 GMT
recorded_with: VCR 2.5.0