Implements #13: get_image_details

This commit is contained in:
Mark Maglana
2013-09-10 01:15:15 -07:00
parent 0c32d078ac
commit 379e2eefff
8 changed files with 709 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
module Aviator
define_request :get_image_details 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/Get_Image_Details-d1e4848.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] }/images/#{ params[:id]}"
end
end
end

View File

@@ -0,0 +1,134 @@
require 'test_helper'
class Aviator::Test
describe 'aviator/openstack/compute/v2/public/get_image_details' 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', 'get_image_details.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
klass.body?.must_equal false
create_request.body?.must_equal false
end
validate_attr :endpoint_type do
klass.endpoint_type.must_equal :public
end
validate_attr :headers do
session_data = get_session_data
headers = { 'X-Auth-Token' => session_data[:access][:token][:id] }
request = create_request(session_data)
request.headers.must_equal headers
end
validate_attr :http_method do
create_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
session_data = get_session_data
service_spec = session_data[:access][:serviceCatalog].find{|s| s[:type] == 'compute' }
image_id = 'it does not matter for this test'
url = "#{ service_spec[:endpoints][0][:publicURL] }/images/#{ image_id }"
request = klass.new(session_data) do |p|
p[:id] = image_id
end
request.url.must_equal url
end
validate_response 'valid params are provided' do
image = session.compute_service.request(:list_images).body[:images].first
image_id = image[:id]
response = session.compute_service.request :get_image_details do |params|
params[:id] = image_id
end
response.status.must_equal 200
response.body.wont_be_nil
response.headers.wont_be_nil
end
validate_response 'invalid params are provided' do
image_id = 'bogusimageid'
response = session.compute_service.request :get_image_details do |params|
params[:id] = image_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,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:
- Tue, 10 Sep 2013 08:13:22 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-10T08:13:21.989412",
"expires": "2013-09-10T14:13:21Z", "id": "76a89d99b8374b0e9b2e3fc6563f7720",
"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: Tue, 10 Sep 2013 08:13:22 GMT
- request:
method: get
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/bogusimageid
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 76a89d99b8374b0e9b2e3fc6563f7720
response:
status:
code: 404
message:
headers:
content-length:
- '62'
content-type:
- application/json; charset=UTF-8
x-compute-request-id:
- req-e5363ec4-2ae4-42cf-96c0-6e5430375aca
date:
- Tue, 10 Sep 2013 08:13:23 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"itemNotFound": {"message": "Image not found.", "code": 404}}'
http_version:
recorded_at: Tue, 10 Sep 2013 08:13:24 GMT
recorded_with: VCR 2.5.0

View File

@@ -0,0 +1,187 @@
---
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:
- Tue, 10 Sep 2013 08:12:14 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-10T08:12:14.388564",
"expires": "2013-09-10T14:12:14Z", "id": "28e29abf4e0f4a6dbbaa981c4b772600",
"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: Tue, 10 Sep 2013 08:12:14 GMT
- request:
method: get
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 28e29abf4e0f4a6dbbaa981c4b772600
response:
status:
code: 200
message:
headers:
x-compute-request-id:
- req-f2ad3aeb-dc8e-4cbc-aef6-947fd0807b97
content-type:
- application/json
content-length:
- '5017'
date:
- Tue, 10 Sep 2013 08:12:17 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"images": [{"id": "b8017829-2e9c-4fb4-b8f5-7efd5e2449c8", "links":
[{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "setthenewnametothis"},
{"id": "dd1fb82a-e290-4a91-97f6-1b9343d9f489", "links": [{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/dd1fb82a-e290-4a91-97f6-1b9343d9f489",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/dd1fb82a-e290-4a91-97f6-1b9343d9f489",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/dd1fb82a-e290-4a91-97f6-1b9343d9f489",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "503_cent62"},
{"id": "3f02eeb4-c812-4ab1-9d20-f15fa1cfc5a6", "links": [{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/3f02eeb4-c812-4ab1-9d20-f15fa1cfc5a6",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/3f02eeb4-c812-4ab1-9d20-f15fa1cfc5a6",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/3f02eeb4-c812-4ab1-9d20-f15fa1cfc5a6",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "503_cent62
Ramdisk Image"}, {"id": "269b1680-ecdf-4d7d-8167-3860980868de", "links": [{"href":
"<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/269b1680-ecdf-4d7d-8167-3860980868de",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/269b1680-ecdf-4d7d-8167-3860980868de",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/269b1680-ecdf-4d7d-8167-3860980868de",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "503_cent62
Kernel Image"}, {"id": "b69a1d86-c544-4927-a9c7-efcb7b3dd6ff", "links": [{"href":
"<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/b69a1d86-c544-4927-a9c7-efcb7b3dd6ff",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/b69a1d86-c544-4927-a9c7-efcb7b3dd6ff",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/b69a1d86-c544-4927-a9c7-efcb7b3dd6ff",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "503_snapwithapp"},
{"id": "21a7ea4d-909b-4734-8111-39b4cae80a4a", "links": [{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/21a7ea4d-909b-4734-8111-39b4cae80a4a",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/21a7ea4d-909b-4734-8111-39b4cae80a4a",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/21a7ea4d-909b-4734-8111-39b4cae80a4a",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "centos5.8(byadmin)"},
{"id": "f1e96d3c-268c-4824-a2d3-69a009be6993", "links": [{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/f1e96d3c-268c-4824-a2d3-69a009be6993",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/f1e96d3c-268c-4824-a2d3-69a009be6993",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/f1e96d3c-268c-4824-a2d3-69a009be6993",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "centos5.8(byadmin)
Kernel Image"}, {"id": "bc83c721-b1a7-44e0-90bc-5b1bbc9d14cb", "links": [{"href":
"<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/bc83c721-b1a7-44e0-90bc-5b1bbc9d14cb",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/bc83c721-b1a7-44e0-90bc-5b1bbc9d14cb",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/bc83c721-b1a7-44e0-90bc-5b1bbc9d14cb",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "centos5.8(byadmin)
Ramdisk Image"}, {"id": "ded9797a-d88a-412d-8812-8dc46b515387", "links": [{"href":
"<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/ded9797a-d88a-412d-8812-8dc46b515387",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/ded9797a-d88a-412d-8812-8dc46b515387",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/ded9797a-d88a-412d-8812-8dc46b515387",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "64Bit
Ubuntu 12.04"}]}'
http_version:
recorded_at: Tue, 10 Sep 2013 08:12:17 GMT
- request:
method: get
uri: <OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 28e29abf4e0f4a6dbbaa981c4b772600
response:
status:
code: 200
message:
headers:
x-compute-request-id:
- req-fc00ad9e-1716-4c87-81fa-73b40f0577fe
content-type:
- application/json
content-length:
- '1770'
date:
- Tue, 10 Sep 2013 08:12:19 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"image": {"status": "ACTIVE", "updated": "2013-09-10T00:14:12Z",
"links": [{"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/v2/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"rel": "self"}, {"href": "<OPENSTACK_ADMIN_HOST_URI>:8774/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"rel": "bookmark"}, {"href": "http://10.50.3.1:9292/eb87dfa8fdec48678b0f0b0f80b44677/images/b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "b8017829-2e9c-4fb4-b8f5-7efd5e2449c8",
"OS-EXT-IMG-SIZE:size": 1362034688, "name": "setthenewnametothis", "created":
"2013-09-10T00:13:33Z", "minDisk": 0, "server": {"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"}]}, "progress": 100, "minRam": 0, "metadata": {"instance_uuid":
"7ff01c2a-325d-4c05-ac77-5f76df18962a", "image_location": "snapshot", "image_state":
"available", "instance_type_memory_mb": "2048", "user_id": "400351b4991d40d79434539b4cee9d36",
"instance_type_vcpu_weight": "None", "image_type": "snapshot", "instance_type_id":
"5", "ramdisk_id": "3f02eeb4-c812-4ab1-9d20-f15fa1cfc5a6", "instance_type_name":
"m1.small", "instance_type_ephemeral_gb": "0", "instance_type_rxtx_factor":
"1", "instance_type_root_gb": "10", "instance_type_flavorid": "2", "instance_type_vcpus":
"1", "kernel_id": "269b1680-ecdf-4d7d-8167-3860980868de", "instance_type_swap":
"1024", "owner_id": "eb87dfa8fdec48678b0f0b0f80b44677"}}}'
http_version:
recorded_at: Tue, 10 Sep 2013 08:12:19 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:
- Tue, 10 Sep 2013 08:06:35 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-10T08:06:35.807306",
"expires": "2013-09-10T14:06:35Z", "id": "0216072730dd401d875db870960e99b0",
"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: Tue, 10 Sep 2013 08:06:35 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:
- Tue, 10 Sep 2013 08:07:29 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-10T08:07:29.437047",
"expires": "2013-09-10T14:07:29Z", "id": "a9fea4e0b8b64e969e1467534be8a6df",
"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: Tue, 10 Sep 2013 08:07:29 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:
- Tue, 10 Sep 2013 08:06:36 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-10T08:06:36.313224",
"expires": "2013-09-10T14:06:36Z", "id": "49ae601a350340f2a2c4bd3fc31b9f6d",
"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: Tue, 10 Sep 2013 08:06:36 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:
- Tue, 10 Sep 2013 08:08:56 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-09-10T08:08:55.991485",
"expires": "2013-09-10T14:08:55Z", "id": "d08bb86a345a4c3b9050decf161e4a05",
"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: Tue, 10 Sep 2013 08:08:56 GMT
recorded_with: VCR 2.5.0