aviator 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aviator/openstack/compute/requests/v2/public/start_server.rb +28 -0
- data/lib/aviator/openstack/compute/requests/v2/public/stop_server.rb +28 -0
- data/lib/aviator/version.rb +1 -1
- data/test/aviator/openstack/compute/requests/v2/public/start_server_test.rb +127 -0
- data/test/aviator/openstack/compute/requests/v2/public/stop_server_test.rb +125 -0
- data/test/cassettes/openstack/compute/requests/v2/public/start_server/leads_to_a_valid_response_when_invalid_server_id_is_provided.yml +99 -0
- data/test/cassettes/openstack/compute/requests/v2/public/start_server/leads_to_a_valid_response_when_valid_params_are_provided.yml +132 -0
- data/test/cassettes/openstack/compute/requests/v2/public/start_server/returns_the_correct_value_for_body_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/start_server/returns_the_correct_value_for_headers_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/start_server/returns_the_correct_value_for_http_method_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/start_server/returns_the_correct_value_for_url_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/stop_server/leads_to_a_valid_response_when_invalid_server_id_is_provided.yml +99 -0
- data/test/cassettes/openstack/compute/requests/v2/public/stop_server/leads_to_a_valid_response_when_valid_params_are_provided.yml +132 -0
- data/test/cassettes/openstack/compute/requests/v2/public/stop_server/returns_the_correct_value_for_body_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/stop_server/returns_the_correct_value_for_headers_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/stop_server/returns_the_correct_value_for_http_method_.yml +65 -0
- data/test/cassettes/openstack/compute/requests/v2/public/stop_server/returns_the_correct_value_for_url_.yml +65 -0
- metadata +32 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4add1dd8d4a03f788ba34a3620c7a0bbd14edf45
|
4
|
+
data.tar.gz: a9c19cc6493120f6f82c524ab6f03184e2f4efe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18bd57b05470eeae1adbb4e91bdb8e84d0d5974ca744286fcf86ef9a4303aa2fb91cdcd796a7fd8d41a78c4398ac885339490fc2d5fe86d5965a7c1f04a989aa
|
7
|
+
data.tar.gz: 27c5c9c8f4e1be7d86260f5aee1aec028dac77eff86df268081886093857da3b810fc79de3ad9b27a26e9faf3fadccb3055801cb526f437160c28dfb5af3ff33
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Aviator
|
2
|
+
|
3
|
+
define_request :start_server, :inherit => [:openstack, :common, :v2, :public, :base] do
|
4
|
+
|
5
|
+
meta :service, :compute
|
6
|
+
|
7
|
+
link 'documentation',
|
8
|
+
'http://developer.openstack.org/api-ref-compute-v2-ext.html#os-server-start-stop'
|
9
|
+
|
10
|
+
param :id, :required => true
|
11
|
+
|
12
|
+
def body
|
13
|
+
{ 'os-start' => nil }
|
14
|
+
end
|
15
|
+
|
16
|
+
def headers
|
17
|
+
super
|
18
|
+
end
|
19
|
+
|
20
|
+
def http_method
|
21
|
+
:post
|
22
|
+
end
|
23
|
+
|
24
|
+
def url
|
25
|
+
"#{ base_url }/servers/#{ params[:id] }/action"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Aviator
|
2
|
+
|
3
|
+
define_request :stop_server, :inherit => [:openstack, :common, :v2, :public, :base] do
|
4
|
+
|
5
|
+
meta :service, :compute
|
6
|
+
|
7
|
+
link 'documentation',
|
8
|
+
'http://developer.openstack.org/api-ref-compute-v2-ext.html#os-server-start-stop'
|
9
|
+
|
10
|
+
param :id, :required => true
|
11
|
+
|
12
|
+
def body
|
13
|
+
{ 'os-stop' => nil }
|
14
|
+
end
|
15
|
+
|
16
|
+
def headers
|
17
|
+
super
|
18
|
+
end
|
19
|
+
|
20
|
+
def http_method
|
21
|
+
:post
|
22
|
+
end
|
23
|
+
|
24
|
+
def url
|
25
|
+
"#{ base_url }/servers/#{ params[:id] }/action"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/aviator/version.rb
CHANGED
@@ -0,0 +1,127 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class Aviator::Test
|
4
|
+
|
5
|
+
describe 'aviator/openstack/compute/requests/v2/public/start_server' do
|
6
|
+
|
7
|
+
def create_request(session_data = get_session_data, &block)
|
8
|
+
block ||= lambda do |params|
|
9
|
+
params[:id] = 0
|
10
|
+
end
|
11
|
+
|
12
|
+
klass.new(session_data, &block)
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def get_session_data
|
17
|
+
session.send :auth_response
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
def helper
|
22
|
+
Aviator::Test::RequestHelper
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
def klass
|
27
|
+
@klass ||= helper.load_request('openstack', 'compute', 'v2', 'public', 'start_server.rb')
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
def session
|
32
|
+
unless @session
|
33
|
+
@session = Aviator::Session.new(
|
34
|
+
:config_file => Environment.path,
|
35
|
+
:environment => 'openstack_member'
|
36
|
+
)
|
37
|
+
@session.authenticate
|
38
|
+
end
|
39
|
+
|
40
|
+
@session
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
validate_attr :anonymous? do
|
45
|
+
klass.anonymous?.must_equal false
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
validate_attr :api_version do
|
50
|
+
klass.api_version.must_equal :v2
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
validate_attr :body do
|
55
|
+
request = create_request
|
56
|
+
|
57
|
+
klass.body?.must_equal true
|
58
|
+
request.body?.must_equal true
|
59
|
+
request.body.wont_be_nil
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
validate_attr :endpoint_type do
|
64
|
+
klass.endpoint_type.must_equal :public
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
validate_attr :headers do
|
69
|
+
headers = { 'X-Auth-Token' => get_session_data[:body][:access][:token][:id] }
|
70
|
+
|
71
|
+
request = create_request
|
72
|
+
|
73
|
+
request.headers.must_equal headers
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
validate_attr :http_method do
|
78
|
+
create_request.http_method.must_equal :post
|
79
|
+
end
|
80
|
+
|
81
|
+
validate_attr :required_params do
|
82
|
+
klass.required_params.must_equal [:id]
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
validate_attr :url do
|
87
|
+
service_spec = get_session_data[:body][:access][:serviceCatalog].find{|s| s[:type] == 'compute' }
|
88
|
+
server_id = '105b09f0b6500d36168480ad84'
|
89
|
+
url = "#{ service_spec[:endpoints][0][:publicURL] }/servers/#{ server_id }/action"
|
90
|
+
|
91
|
+
request = create_request do |params|
|
92
|
+
params[:id] = server_id
|
93
|
+
end
|
94
|
+
|
95
|
+
request.url.must_equal url
|
96
|
+
end
|
97
|
+
|
98
|
+
|
99
|
+
validate_response 'valid params are provided' do
|
100
|
+
server = session.compute_service.request(:list_servers).body[:servers].first
|
101
|
+
server_id = server[:id]
|
102
|
+
|
103
|
+
response = session.compute_service.request :start_server do |params|
|
104
|
+
params[:id] = server_id
|
105
|
+
end
|
106
|
+
|
107
|
+
response.status.must_equal 202
|
108
|
+
response.headers.wont_be_nil
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
validate_response 'invalid server id is provided' do
|
113
|
+
server_id = 'abogusserveridthatdoesnotexist'
|
114
|
+
|
115
|
+
response = session.compute_service.request :start_server do |params|
|
116
|
+
params[:id] = server_id
|
117
|
+
end
|
118
|
+
|
119
|
+
response.status.must_equal 404
|
120
|
+
response.body.wont_be_nil
|
121
|
+
response.headers.wont_be_nil
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
@@ -0,0 +1,125 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class Aviator::Test
|
4
|
+
|
5
|
+
describe 'aviator/openstack/compute/requests/v2/public/stop_server' do
|
6
|
+
|
7
|
+
def create_request(session_data = get_session_data, &block)
|
8
|
+
block ||= lambda { |params| params[:id] = 0 }
|
9
|
+
klass.new(session_data, &block)
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
def get_session_data
|
14
|
+
session.send :auth_response
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
def helper
|
19
|
+
Aviator::Test::RequestHelper
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def klass
|
24
|
+
@klass ||= helper.load_request('openstack', 'compute', 'v2', 'public', 'stop_server.rb')
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
def session
|
29
|
+
unless @session
|
30
|
+
@session = Aviator::Session.new(
|
31
|
+
:config_file => Environment.path,
|
32
|
+
:environment => 'openstack_member'
|
33
|
+
)
|
34
|
+
@session.authenticate
|
35
|
+
end
|
36
|
+
|
37
|
+
@session
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
validate_attr :anonymous? do
|
42
|
+
klass.anonymous?.must_equal false
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
validate_attr :api_version do
|
47
|
+
klass.api_version.must_equal :v2
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
validate_attr :body do
|
52
|
+
request = create_request
|
53
|
+
|
54
|
+
klass.body?.must_equal true
|
55
|
+
request.body?.must_equal true
|
56
|
+
request.body.wont_be_nil
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
validate_attr :endpoint_type do
|
61
|
+
klass.endpoint_type.must_equal :public
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
validate_attr :headers do
|
66
|
+
headers = { 'X-Auth-Token' => get_session_data[:body][:access][:token][:id] }
|
67
|
+
|
68
|
+
request = create_request
|
69
|
+
|
70
|
+
request.headers.must_equal headers
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
validate_attr :http_method do
|
75
|
+
create_request.http_method.must_equal :post
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
validate_attr :required_params do
|
80
|
+
klass.required_params.must_equal [:id]
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
validate_attr :url do
|
85
|
+
service_spec = get_session_data[:body][:access][:serviceCatalog].find{ |s| s[:type] == 'compute' }
|
86
|
+
server_id = 'sampleId'
|
87
|
+
url = "#{ service_spec[:endpoints][0][:publicURL] }/servers/#{ server_id }/action"
|
88
|
+
|
89
|
+
request = create_request do |params|
|
90
|
+
params[:id] = server_id
|
91
|
+
end
|
92
|
+
|
93
|
+
request.url.must_equal url
|
94
|
+
end
|
95
|
+
|
96
|
+
|
97
|
+
validate_response 'valid params are provided' do
|
98
|
+
service = session.compute_service
|
99
|
+
server = service.request(:list_servers).body[:servers].first
|
100
|
+
|
101
|
+
response = service.request :stop_server do |params|
|
102
|
+
params[:id] = server[:id]
|
103
|
+
end
|
104
|
+
|
105
|
+
response.status.must_equal 202
|
106
|
+
response.headers.wont_be_nil
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
validate_response 'invalid server id is provided' do
|
111
|
+
server_id = 'abogusserveridthatdoesnotexist'
|
112
|
+
|
113
|
+
response = session.compute_service.request :stop_server do |params|
|
114
|
+
params[:id] = server_id
|
115
|
+
end
|
116
|
+
|
117
|
+
response.status.must_equal 404
|
118
|
+
response.body.wont_be_nil
|
119
|
+
response.headers.wont_be_nil
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_TENANTNAME>"}}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- Faraday v0.8.8
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
vary:
|
20
|
+
- X-Auth-Token
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
content-length:
|
24
|
+
- '2677'
|
25
|
+
date:
|
26
|
+
- Wed, 25 Sep 2013 01:50:14 GMT
|
27
|
+
connection:
|
28
|
+
- close
|
29
|
+
body:
|
30
|
+
encoding: US-ASCII
|
31
|
+
string: ! '{"access": {"token": {"issued_at": "2013-09-25T01:50:14.325097",
|
32
|
+
"expires": "2013-09-26T01:50:14Z", "id": "bfeaf3a212f44ca89e374068184fa8ba",
|
33
|
+
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
34
|
+
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
35
|
+
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
36
|
+
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
37
|
+
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
38
|
+
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
39
|
+
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
40
|
+
"id": "3cc6591515c24569bc5342bc82159a77", "publicURL": "http://127.0.0.1:3333"}],
|
41
|
+
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
42
|
+
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
43
|
+
"id": "6842e55991f14f66b1ccf7c924d83ca6", "publicURL": "http://127.0.0.1:9292"}],
|
44
|
+
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
45
|
+
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
46
|
+
"id": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
47
|
+
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
48
|
+
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
49
|
+
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
50
|
+
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
51
|
+
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
52
|
+
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
53
|
+
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "3c91fce7434e4a798e8093841d09c6cc",
|
54
|
+
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
55
|
+
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
56
|
+
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
57
|
+
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
58
|
+
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
59
|
+
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
60
|
+
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
61
|
+
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
62
|
+
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 25 Sep 2013 01:50:14 GMT
|
65
|
+
- request:
|
66
|
+
method: post
|
67
|
+
uri: http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers/abogusserveridthatdoesnotexist/action
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: ! '{"os-start":null}'
|
71
|
+
headers:
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
User-Agent:
|
75
|
+
- Faraday v0.8.8
|
76
|
+
X-Auth-Token:
|
77
|
+
- bfeaf3a212f44ca89e374068184fa8ba
|
78
|
+
response:
|
79
|
+
status:
|
80
|
+
code: 404
|
81
|
+
message:
|
82
|
+
headers:
|
83
|
+
content-length:
|
84
|
+
- '73'
|
85
|
+
content-type:
|
86
|
+
- application/json; charset=UTF-8
|
87
|
+
x-compute-request-id:
|
88
|
+
- req-034637de-a553-4aad-a63f-b8d369accc0f
|
89
|
+
date:
|
90
|
+
- Wed, 25 Sep 2013 01:50:14 GMT
|
91
|
+
connection:
|
92
|
+
- close
|
93
|
+
body:
|
94
|
+
encoding: US-ASCII
|
95
|
+
string: ! '{"itemNotFound": {"message": "Instance could not be found", "code":
|
96
|
+
404}}'
|
97
|
+
http_version:
|
98
|
+
recorded_at: Wed, 25 Sep 2013 01:50:14 GMT
|
99
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,132 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: <OPENSTACK_ADMIN_HOST_URI>:5000/v2.0/tokens
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"auth":{"passwordCredentials":{"username":"<OPENSTACK_MEMBER_USERNAME>","password":"<OPENSTACK_MEMBER_PASSWORD>"},"tenantName":"<OPENSTACK_MEMBER_TENANTNAME>"}}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- Faraday v0.8.8
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
vary:
|
20
|
+
- X-Auth-Token
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
content-length:
|
24
|
+
- '2677'
|
25
|
+
date:
|
26
|
+
- Wed, 25 Sep 2013 01:50:15 GMT
|
27
|
+
connection:
|
28
|
+
- close
|
29
|
+
body:
|
30
|
+
encoding: US-ASCII
|
31
|
+
string: ! '{"access": {"token": {"issued_at": "2013-09-25T01:50:15.565151",
|
32
|
+
"expires": "2013-09-26T01:50:15Z", "id": "0f2de4a206b1470189161fc918909fc8",
|
33
|
+
"tenant": {"description": "", "enabled": true, "id": "87b582d56d3f4ed19a25c919bb59a6f0",
|
34
|
+
"name": "<OPENSTACK_MEMBER_TENANTNAME>"}}, "serviceCatalog": [{"endpoints":
|
35
|
+
[{"adminURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
36
|
+
"region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0",
|
37
|
+
"id": "1ee1c2c29f8640ab9c3f8654209873f6", "publicURL": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
38
|
+
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL":
|
39
|
+
"http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333",
|
40
|
+
"id": "3cc6591515c24569bc5342bc82159a77", "publicURL": "http://127.0.0.1:3333"}],
|
41
|
+
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL":
|
42
|
+
"http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292",
|
43
|
+
"id": "6842e55991f14f66b1ccf7c924d83ca6", "publicURL": "http://127.0.0.1:9292"}],
|
44
|
+
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL":
|
45
|
+
"http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777",
|
46
|
+
"id": "1edf8d85bb7047beb66c7630b04b01e6", "publicURL": "http://127.0.0.1:8777"}],
|
47
|
+
"endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints":
|
48
|
+
[{"adminURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
49
|
+
"region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0",
|
50
|
+
"id": "301c46cc88384348a5415d478162d51e", "publicURL": "http://127.0.0.1:8776/v1/87b582d56d3f4ed19a25c919bb59a6f0"}],
|
51
|
+
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
|
52
|
+
[{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne",
|
53
|
+
"internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "3c91fce7434e4a798e8093841d09c6cc",
|
54
|
+
"publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links":
|
55
|
+
[], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0",
|
56
|
+
"region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id":
|
57
|
+
"836cef616b644e2da8b0f39dd1aa78e1", "publicURL": "http://127.0.0.1:5000/v2.0"}],
|
58
|
+
"endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username":
|
59
|
+
"<OPENSTACK_MEMBER_USERNAME>", "roles_links": [], "id": "cbdd1e36bf1d4bceab9896f47c0e5a9b",
|
60
|
+
"roles": [{"name": "_member_"}, {"name": "project_manager"}], "name": "<OPENSTACK_MEMBER_USERNAME>"},
|
61
|
+
"metadata": {"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
|
62
|
+
"0877846b7e534fc3ae0e9b0bb226343d"]}}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 25 Sep 2013 01:50:15 GMT
|
65
|
+
- request:
|
66
|
+
method: get
|
67
|
+
uri: http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers
|
68
|
+
body:
|
69
|
+
encoding: US-ASCII
|
70
|
+
string: ''
|
71
|
+
headers:
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
User-Agent:
|
75
|
+
- Faraday v0.8.8
|
76
|
+
X-Auth-Token:
|
77
|
+
- 0f2de4a206b1470189161fc918909fc8
|
78
|
+
response:
|
79
|
+
status:
|
80
|
+
code: 200
|
81
|
+
message:
|
82
|
+
headers:
|
83
|
+
x-compute-request-id:
|
84
|
+
- req-cd8c8338-a6bd-4dcc-8eec-3f445ccf4a32
|
85
|
+
content-type:
|
86
|
+
- application/json
|
87
|
+
content-length:
|
88
|
+
- '360'
|
89
|
+
date:
|
90
|
+
- Wed, 25 Sep 2013 01:50:15 GMT
|
91
|
+
connection:
|
92
|
+
- close
|
93
|
+
body:
|
94
|
+
encoding: US-ASCII
|
95
|
+
string: ! '{"servers": [{"id": "9e43634d-71bf-4e04-97b3-783ce9e6d4bc", "links":
|
96
|
+
[{"href": "http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers/9e43634d-71bf-4e04-97b3-783ce9e6d4bc",
|
97
|
+
"rel": "self"}, {"href": "http://127.0.0.1:8774/87b582d56d3f4ed19a25c919bb59a6f0/servers/9e43634d-71bf-4e04-97b3-783ce9e6d4bc",
|
98
|
+
"rel": "bookmark"}], "name": "test-instance"}]}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Wed, 25 Sep 2013 01:50:15 GMT
|
101
|
+
- request:
|
102
|
+
method: post
|
103
|
+
uri: http://127.0.0.1:8774/v2/87b582d56d3f4ed19a25c919bb59a6f0/servers/9e43634d-71bf-4e04-97b3-783ce9e6d4bc/action
|
104
|
+
body:
|
105
|
+
encoding: UTF-8
|
106
|
+
string: ! '{"os-start":null}'
|
107
|
+
headers:
|
108
|
+
Content-Type:
|
109
|
+
- application/json
|
110
|
+
User-Agent:
|
111
|
+
- Faraday v0.8.8
|
112
|
+
X-Auth-Token:
|
113
|
+
- 0f2de4a206b1470189161fc918909fc8
|
114
|
+
response:
|
115
|
+
status:
|
116
|
+
code: 202
|
117
|
+
message:
|
118
|
+
headers:
|
119
|
+
content-type:
|
120
|
+
- text/html; charset=UTF-8
|
121
|
+
content-length:
|
122
|
+
- '0'
|
123
|
+
date:
|
124
|
+
- Wed, 25 Sep 2013 01:50:15 GMT
|
125
|
+
connection:
|
126
|
+
- close
|
127
|
+
body:
|
128
|
+
encoding: US-ASCII
|
129
|
+
string: ''
|
130
|
+
http_version:
|
131
|
+
recorded_at: Wed, 25 Sep 2013 01:50:15 GMT
|
132
|
+
recorded_with: VCR 2.5.0
|