[image] Add list_public_images request

This commit is contained in:
Alvin Garcia 2013-12-17 16:30:56 +08:00
parent 490a3d2bb0
commit d219ce3018
8 changed files with 677 additions and 0 deletions

View File

@ -0,0 +1,45 @@
module Aviator
define_request :list_public_images, inherit: [:openstack, :common, :v2, :public, :base] do
meta :service, :image
meta :api_version, :v1
link 'documentation', 'http://docs.openstack.org/api/openstack-image-service/1.1/content/requesting-a-list-of-public-vm-images.html'
param :name, required: false
param :container_format, required: false
param :disk_format, required: false
param :status, required: false
param :size_min, required: false
param :size_max, required: false
param :sort_key, required: false
param :sort_dir, required: false
def headers
super
end
def http_method
:get
end
def url
uri = URI(base_url)
url = "#{ uri.scheme }://#{ uri.host }:#{ uri.port.to_s }/v1/images"
filters = []
optional_params.each do |param_name|
filters << "#{ param_name }=#{ params[param_name] }" if params[param_name]
end
url += "?#{ filters.join('&') }" unless filters.empty?
url
end
end
end

View File

@ -0,0 +1,145 @@
require 'test_helper'
class Aviator::Test
describe 'aviator/openstack/image/v1/public/list_public_images' 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 session
unless @session
@session = Aviator::Session.new(
config_file: Environment.path,
environment: 'openstack_member'
)
@session.authenticate
end
@session
end
def helper
Aviator::Test::RequestHelper
end
def klass
@klass ||= helper.load_request('openstack', 'image', 'v1', 'public', 'list_public_images.rb')
end
validate_attr :anonymous? do
klass.anonymous?.must_equal false
end
validate_attr :api_version do
klass.api_version.must_equal :v1
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
headers = { 'X-Auth-Token' => get_session_data[:access][:token][:id] }
request = create_request
request.headers.must_equal headers
end
validate_attr :optional_params do
klass.optional_params.must_equal [
:name,
:container_format,
:disk_format,
:status,
:size_min,
:size_max,
:sort_key,
:sort_dir
]
end
validate_attr :required_params do
klass.required_params.must_equal []
end
validate_attr :http_method do
create_request.http_method.must_equal :get
end
validate_response 'no parameters are provided' do
response = session.image_service.request :list_public_images
response.status.must_equal 200
response.body.wont_be_nil
response.body[:images].length.wont_equal 0
response.headers.wont_be_nil
end
validate_response 'filtering with matches' do
response = session.image_service.request :list_public_images do |p|
p[:name] = '64Bit Ubuntu 12.04'
end
response.status.must_equal 200
response.body.wont_be_nil
response.body[:images].length.must_equal 1
response.headers.wont_be_nil
end
validate_response 'filtering with no matches' do
response = session.image_service.request :list_public_images do |p|
p[:name] = 'does-not-match-any-image'
end
response.status.must_equal 200
response.body.wont_be_nil
response.body[:images].length.must_equal 0
response.headers.wont_be_nil
end
end
end

View File

@ -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:
- '2697'
date:
- Tue, 17 Dec 2013 08:29:28 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-12-17T08:29:28.932221",
"expires": "2013-12-17T14:29:28Z", "id": "0eae8a2cc0be437790c58dc6397e7cb2",
"tenant": {"description": "for aviator tests", "enabled": true, "id": "a528b6d6af894f9babb4f1b02154ee3e",
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"id": "83a5fdd3477942d08ee03ea09ac0ae90", "publicURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:9292", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:9292", "id": "76042ed1db23403c985c77961a23de0b",
"publicURL": "http://mc.la-1-3.morphlabs.net:9292"}], "endpoints_links": [],
"type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://mc.la-1-3.morphlabs.net:8777",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8777",
"id": "6f707de4c79249bf9b421d0288fab17c", "publicURL": "http://mc.la-1-3.morphlabs.net:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"id": "0b957378d43f44b6a46e744c151bb6d5", "publicURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "volume", "name": "nova_volume"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8773/services/Admin", "region":
"RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud",
"id": "1818d07e119f405f83ae194df42b4fca", "publicURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:35357/v2.0", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:5000/v2.0", "id": "5546a130cbb54ba4a403f62ed5ebd1f4",
"publicURL": "http://mc.la-1-3.morphlabs.net:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "8a0962b47db14d7882abe7fb607e40a8", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"aa85ee926c174ed2a09912aa730e1fb5"]}}}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:29:38 GMT
- request:
method: get
uri: http://mc.la-1-3.morphlabs.net:9292/v1/images?name=64Bit+Ubuntu+12.04
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 0eae8a2cc0be437790c58dc6397e7cb2
response:
status:
code: 200
message:
headers:
content-type:
- application/json; charset=UTF-8
content-length:
- '208'
x-openstack-request-id:
- req-6ed13495-1325-42ad-9bc0-d3ce76803520
date:
- Tue, 17 Dec 2013 08:29:30 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"images": [{"name": "64Bit Ubuntu 12.04", "container_format": "ovf",
"disk_format": "qcow2", "checksum": "43d3a9e8bcd6c44366ac4634b8a28648", "id":
"3d520022-c1c8-439a-a96d-bfe8a0149846", "size": 252116992}]}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:29:39 GMT
recorded_with: VCR 2.5.0

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:
- '2697'
date:
- Tue, 17 Dec 2013 08:28:42 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-12-17T08:28:42.605252",
"expires": "2013-12-17T14:28:42Z", "id": "138a5fb7023c40749f00a28dd8677a2d",
"tenant": {"description": "for aviator tests", "enabled": true, "id": "a528b6d6af894f9babb4f1b02154ee3e",
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"id": "83a5fdd3477942d08ee03ea09ac0ae90", "publicURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:9292", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:9292", "id": "76042ed1db23403c985c77961a23de0b",
"publicURL": "http://mc.la-1-3.morphlabs.net:9292"}], "endpoints_links": [],
"type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://mc.la-1-3.morphlabs.net:8777",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8777",
"id": "6f707de4c79249bf9b421d0288fab17c", "publicURL": "http://mc.la-1-3.morphlabs.net:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"id": "0b957378d43f44b6a46e744c151bb6d5", "publicURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "volume", "name": "nova_volume"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8773/services/Admin", "region":
"RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud",
"id": "1818d07e119f405f83ae194df42b4fca", "publicURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:35357/v2.0", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:5000/v2.0", "id": "5546a130cbb54ba4a403f62ed5ebd1f4",
"publicURL": "http://mc.la-1-3.morphlabs.net:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "8a0962b47db14d7882abe7fb607e40a8", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"aa85ee926c174ed2a09912aa730e1fb5"]}}}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:28:52 GMT
- request:
method: get
uri: http://mc.la-1-3.morphlabs.net:9292/v1/images?name=does-not-match-any-image
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 138a5fb7023c40749f00a28dd8677a2d
response:
status:
code: 200
message:
headers:
content-type:
- application/json; charset=UTF-8
content-length:
- '14'
x-openstack-request-id:
- req-03d772d2-2abb-464e-bab1-a7d297affb6c
date:
- Tue, 17 Dec 2013 08:28:44 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"images": []}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:28:53 GMT
recorded_with: VCR 2.5.0

View File

@ -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:
- '2697'
date:
- Tue, 17 Dec 2013 08:26:32 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-12-17T08:26:32.599056",
"expires": "2013-12-17T14:26:32Z", "id": "4f9e8b4dc4e04555ac33bd36e4e97a35",
"tenant": {"description": "for aviator tests", "enabled": true, "id": "a528b6d6af894f9babb4f1b02154ee3e",
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"id": "83a5fdd3477942d08ee03ea09ac0ae90", "publicURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:9292", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:9292", "id": "76042ed1db23403c985c77961a23de0b",
"publicURL": "http://mc.la-1-3.morphlabs.net:9292"}], "endpoints_links": [],
"type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://mc.la-1-3.morphlabs.net:8777",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8777",
"id": "6f707de4c79249bf9b421d0288fab17c", "publicURL": "http://mc.la-1-3.morphlabs.net:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"id": "0b957378d43f44b6a46e744c151bb6d5", "publicURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "volume", "name": "nova_volume"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8773/services/Admin", "region":
"RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud",
"id": "1818d07e119f405f83ae194df42b4fca", "publicURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:35357/v2.0", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:5000/v2.0", "id": "5546a130cbb54ba4a403f62ed5ebd1f4",
"publicURL": "http://mc.la-1-3.morphlabs.net:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "8a0962b47db14d7882abe7fb607e40a8", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"aa85ee926c174ed2a09912aa730e1fb5"]}}}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:26:42 GMT
- request:
method: get
uri: http://mc.la-1-3.morphlabs.net:9292/v1/images
body:
encoding: US-ASCII
string: ''
headers:
Content-Type:
- application/json
User-Agent:
- Faraday v0.8.8
X-Auth-Token:
- 4f9e8b4dc4e04555ac33bd36e4e97a35
response:
status:
code: 200
message:
headers:
content-type:
- application/json; charset=UTF-8
content-length:
- '208'
x-openstack-request-id:
- req-fd5ee3b2-f0ca-4987-8ec7-439fcda8a7ee
date:
- Tue, 17 Dec 2013 08:26:33 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"images": [{"name": "64Bit Ubuntu 12.04", "container_format": "ovf",
"disk_format": "qcow2", "checksum": "43d3a9e8bcd6c44366ac4634b8a28648", "id":
"3d520022-c1c8-439a-a96d-bfe8a0149846", "size": 252116992}]}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:26:43 GMT
recorded_with: VCR 2.5.0

View File

@ -0,0 +1,64 @@
---
http_interactions:
- request:
method: post
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
body:
encoding: UTF-8
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_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:
- '2697'
date:
- Tue, 17 Dec 2013 08:26:30 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-12-17T08:26:30.873386",
"expires": "2013-12-17T14:26:30Z", "id": "bbd6ac6f423e4d4683b34e1acd92558d",
"tenant": {"description": "for aviator tests", "enabled": true, "id": "a528b6d6af894f9babb4f1b02154ee3e",
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"id": "83a5fdd3477942d08ee03ea09ac0ae90", "publicURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:9292", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:9292", "id": "76042ed1db23403c985c77961a23de0b",
"publicURL": "http://mc.la-1-3.morphlabs.net:9292"}], "endpoints_links": [],
"type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://mc.la-1-3.morphlabs.net:8777",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8777",
"id": "6f707de4c79249bf9b421d0288fab17c", "publicURL": "http://mc.la-1-3.morphlabs.net:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"id": "0b957378d43f44b6a46e744c151bb6d5", "publicURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "volume", "name": "nova_volume"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8773/services/Admin", "region":
"RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud",
"id": "1818d07e119f405f83ae194df42b4fca", "publicURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:35357/v2.0", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:5000/v2.0", "id": "5546a130cbb54ba4a403f62ed5ebd1f4",
"publicURL": "http://mc.la-1-3.morphlabs.net:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "8a0962b47db14d7882abe7fb607e40a8", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"aa85ee926c174ed2a09912aa730e1fb5"]}}}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:26:40 GMT
recorded_with: VCR 2.5.0

View File

@ -0,0 +1,64 @@
---
http_interactions:
- request:
method: post
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
body:
encoding: UTF-8
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_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:
- '2697'
date:
- Tue, 17 Dec 2013 08:26:31 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-12-17T08:26:31.790042",
"expires": "2013-12-17T14:26:31Z", "id": "802436bf36ed49b8af57a58c2d16031b",
"tenant": {"description": "for aviator tests", "enabled": true, "id": "a528b6d6af894f9babb4f1b02154ee3e",
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"id": "83a5fdd3477942d08ee03ea09ac0ae90", "publicURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:9292", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:9292", "id": "76042ed1db23403c985c77961a23de0b",
"publicURL": "http://mc.la-1-3.morphlabs.net:9292"}], "endpoints_links": [],
"type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://mc.la-1-3.morphlabs.net:8777",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8777",
"id": "6f707de4c79249bf9b421d0288fab17c", "publicURL": "http://mc.la-1-3.morphlabs.net:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"id": "0b957378d43f44b6a46e744c151bb6d5", "publicURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "volume", "name": "nova_volume"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8773/services/Admin", "region":
"RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud",
"id": "1818d07e119f405f83ae194df42b4fca", "publicURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:35357/v2.0", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:5000/v2.0", "id": "5546a130cbb54ba4a403f62ed5ebd1f4",
"publicURL": "http://mc.la-1-3.morphlabs.net:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "8a0962b47db14d7882abe7fb607e40a8", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"aa85ee926c174ed2a09912aa730e1fb5"]}}}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:26:41 GMT
recorded_with: VCR 2.5.0

View File

@ -0,0 +1,64 @@
---
http_interactions:
- request:
method: post
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
body:
encoding: UTF-8
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_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:
- '2697'
date:
- Tue, 17 Dec 2013 08:26:34 GMT
connection:
- close
body:
encoding: US-ASCII
string: ! '{"access": {"token": {"issued_at": "2013-12-17T08:26:34.276926",
"expires": "2013-12-17T14:26:34Z", "id": "1d4106dbb95a47188f385546f06aa1cb",
"tenant": {"description": "for aviator tests", "enabled": true, "id": "a528b6d6af894f9babb4f1b02154ee3e",
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e",
"id": "83a5fdd3477942d08ee03ea09ac0ae90", "publicURL": "http://mc.la-1-3.morphlabs.net:8774/v2/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:9292", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:9292", "id": "76042ed1db23403c985c77961a23de0b",
"publicURL": "http://mc.la-1-3.morphlabs.net:9292"}], "endpoints_links": [],
"type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://mc.la-1-3.morphlabs.net:8777",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8777",
"id": "6f707de4c79249bf9b421d0288fab17c", "publicURL": "http://mc.la-1-3.morphlabs.net:8777"}],
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"region": "RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e",
"id": "0b957378d43f44b6a46e744c151bb6d5", "publicURL": "http://mc.la-1-3.morphlabs.net:8776/v1/a528b6d6af894f9babb4f1b02154ee3e"}],
"endpoints_links": [], "type": "volume", "name": "nova_volume"}, {"endpoints":
[{"adminURL": "http://mc.la-1-3.morphlabs.net:8773/services/Admin", "region":
"RegionOne", "internalURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud",
"id": "1818d07e119f405f83ae194df42b4fca", "publicURL": "http://mc.la-1-3.morphlabs.net:8773/services/Cloud"}],
"endpoints_links": [], "type": "ec2", "name": "nova_ec2"}, {"endpoints": [{"adminURL":
"http://mc.la-1-3.morphlabs.net:35357/v2.0", "region": "RegionOne", "internalURL":
"http://mc.la-1-3.morphlabs.net:5000/v2.0", "id": "5546a130cbb54ba4a403f62ed5ebd1f4",
"publicURL": "http://mc.la-1-3.morphlabs.net:5000/v2.0"}], "endpoints_links":
[], "type": "identity", "name": "keystone"}], "user": {"username": "<OPENSTACK_MEMBER_USERNAME>",
"roles_links": [], "id": "8a0962b47db14d7882abe7fb607e40a8", "roles": [{"name":
"_member_"}, {"name": "Member"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"aa85ee926c174ed2a09912aa730e1fb5"]}}}'
http_version:
recorded_at: Tue, 17 Dec 2013 08:26:44 GMT
recorded_with: VCR 2.5.0