stacker_bee 2.1.1.pre305 → 2.1.1.pre324

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +43 -8
  3. data/config.default.yml +1 -1
  4. data/lib/stacker_bee/client.rb +5 -2
  5. data/lib/stacker_bee/configuration.rb +22 -2
  6. data/lib/stacker_bee/middleware/adapter.rb +5 -1
  7. data/lib/stacker_bee/middleware/cloud_stack_api.rb +1 -2
  8. data/lib/stacker_bee/middleware/console_access.rb +1 -2
  9. data/lib/stacker_bee/request_error.rb +1 -1
  10. data/spec/cassettes/A_request_sent_to_CloudStack_for_console_access/returns_html_for_console_access.yml +1 -1
  11. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/.yml +4 -34
  12. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_nil_request_parameter/properly_executes_the_request.yml +4 -34
  13. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_request_parameter_with_a_map/can_create_an_object.yml +18 -198
  14. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_request_parameter_with_an_Array/.yml +6 -37
  15. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_request_parameter_with_and_empty_string/properly_executes_the_request.yml +4 -34
  16. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_request_that_triggers_an_error/properly_signs_the_request.yml +2 -34
  17. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first_item/.yml +4 -34
  18. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first_item/_account_type_/.yml +4 -34
  19. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first_item/_accounttype_/.yml +4 -34
  20. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/middleware/a_middleware_that_doesn_t_match_the_content_type/uses_the_middleware.yml +3 -33
  21. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/middleware/a_middleware_that_matches_the_content_type/uses_the_middleware.yml +3 -33
  22. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/space_character_in_a_request_parameter/properly_signs_the_request.yml +2 -31
  23. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/with_a_nonexistant_path/raises_a_client_error.yml +47 -0
  24. data/spec/integration/console_spec.rb +4 -3
  25. data/spec/integration/request_spec.rb +26 -9
  26. data/spec/units/stacker_bee/configuration_spec.rb +30 -0
  27. data/spec/units/stacker_bee/middleware/adapter_spec.rb +9 -1
  28. data/spec/units/stacker_bee/middleware/cloud_stack_api_spec.rb +6 -13
  29. data/spec/units/stacker_bee/middleware/console_access_spec.rb +6 -3
  30. metadata +4 -12
  31. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/containing_an_error/.yml +0 -37
  32. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/containing_an_error/should_log_response_as_error.yml +0 -37
  33. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first/.yml +0 -33
  34. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/should_log_request.yml +0 -33
  35. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/should_not_log_response_as_error.yml +0 -33
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDRmMDE1Yzg2ZTE2YzVhYzUwNWFkNzM0YWJkMGI4YTZmYWE5NzI1Nw==
4
+ Njk5OTk4ZGQ2Nzc4ODljOWYyMDc0OTgzZDFhZTNhNmI3MDkxNzRlNA==
5
5
  data.tar.gz: !binary |-
6
- NjgwOTUxZWQ0YjIzNTY2Yzg1ODkyYjc3NmUyMzAzODEzNjc4OThhYQ==
6
+ Y2U1ZjVhYWNlN2M0N2QzN2YwZjc3NjZhYTIxOTMyYzM1YTc2ODY0ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjBiMGQ2ODhlODhmOTFlMzc1OTQ1MDBlODg4NDMzOGZlY2RmNDZkMDA1MGQy
10
- OTJmMGQxZThlZjEyYzhiYTdmNThmYjFlOWZiMTA3ZjBhNTQ2MTQ5MTkyOTRi
11
- YWNhYTVjNDBjOTk0MjA0ZGRiNGY0ZjU0NjEwNGYzYTZmZWMxY2M=
9
+ MGM4NzZiOGU2ZTZjODJiZDFiOGZlN2MzN2RhZTZhNmIzNzJjY2RiNTY5ODg3
10
+ YTg5MDMxM2JjNjRmZWY4OThkNjZkZTg0ZGQ2OWFmZGFjZGQxMTcyNTIzNmRk
11
+ MjE1MDg2NTQ2MDc3ODU3YWVmMjI2MzE0YjliZjBkMjI2OWQwNTc=
12
12
  data.tar.gz: !binary |-
13
- ZDFlYzk0MDhmOWZjZGQyODQ1YjgwMTNkNjU4MzczYzhiMTk3N2UxNTA3Y2Zj
14
- YjAwYmU0ZDZkNWUwNjQxZDExZTU4YjU1NTQxZTQxYjAxNGEzZDA2MGJhOWUx
15
- ZmNlMjY5MDRiNDVjYzRkZGMxOWJhYzQwOGViYTU0YTc3ODVhMzk=
13
+ ODhkNGRlMTBiODliZTZkYTA1ZjkyYTVhMjgzNzYyMTBhOGVlZTkzNDI4Mzll
14
+ NzBkNTU0ZGM2MTAzODg5MGZkZGIwZjJiYWE1OGZlMmRiMjYwYzVhZDEwZDUx
15
+ ZDFiYjA3YThiODY3N2RlOTQyYmEwZGVmZTQ2YWU5MTIxMWMzYzc=
data/README.md CHANGED
@@ -29,7 +29,7 @@ And execute:
29
29
 
30
30
  ```ruby
31
31
  cloud_stack = StackerBee::Client.new(
32
- url: 'http://localhost:8080/client/api',
32
+ url: 'http://localhost:8080',
33
33
  api_key: 'MY_API_KEY',
34
34
  secret_key: 'MY_SECRET_KEY'
35
35
  )
@@ -85,7 +85,7 @@ Usage:
85
85
 
86
86
  Example:
87
87
 
88
- $ stacker_bee -u http://localhost:8080/client/api -a MY_API_KEY -s MY_SECRET_KEY
88
+ $ stacker_bee -u http://localhost:8080 -a MY_API_KEY -s MY_SECRET_KEY
89
89
  StackerBee CloudStack REPL
90
90
  >> list_virtual_machines state: 'Running'
91
91
  => [{"id"=>"48b91ab4-dc23-4e24-bc6f-695d58c91087",
@@ -100,7 +100,7 @@ Configuring a client:
100
100
 
101
101
  ```ruby
102
102
  cloud_stack = StackerBee::Client.new(
103
- url: 'http://localhost:8080/client/api',
103
+ url: 'http://localhost:8080',
104
104
  api_key: 'API_KEY',
105
105
  secret_key: 'SECRET_KEY'
106
106
  )
@@ -109,7 +109,7 @@ cloud_stack = StackerBee::Client.new(
109
109
  All configuration parameters set on the `StackerBee::Client` class are used as defaults for `StackerBee::Client` instances.
110
110
 
111
111
  ```ruby
112
- StackerBee::Client.url = 'http://localhost:8080/client/api'
112
+ StackerBee::Client.url = 'http://localhost:8080'
113
113
 
114
114
  user_client = StackerBee::Client.new(
115
115
  api_key: 'USER_API_KEY',
@@ -127,17 +127,52 @@ root_client = StackerBee::Client.new(
127
127
  The URL of your CloudStack instance's URL.
128
128
 
129
129
  ```ruby
130
- StackerBee::Client.url = 'http://localhost:8080/client/api'
130
+ StackerBee::Client.url = 'http://localhost:8080'
131
131
  ```
132
132
 
133
133
  Or:
134
134
 
135
135
  ```ruby
136
136
  my_client = StackerBee::Client.new(
137
- url: 'http://localhost:8080/client/api'
137
+ url: 'http://localhost:8080'
138
138
  )
139
139
  ```
140
140
 
141
+ ### API path
142
+
143
+ The path of your CloudStack instance's API URL.
144
+ Defaults to `'/client/api/'`.
145
+
146
+ ```ruby
147
+ StackerBee::Client.api_path = '/other-path/client/api'
148
+ ```
149
+
150
+ Or:
151
+
152
+ ```ruby
153
+ my_client = StackerBee::Client.new(
154
+ api_path: '/other-path/client/api'
155
+ )
156
+ ```
157
+
158
+ ### Console path
159
+
160
+ The path of your CloudStack instance's URL for console access.
161
+ Defaults to `'/client/console/'`.
162
+
163
+ ```ruby
164
+ StackerBee::Client.console_path = '/other-path/client/console'
165
+ ```
166
+
167
+ Or:
168
+
169
+ ```ruby
170
+ my_client = StackerBee::Client.new(
171
+ console_path: '/other-path/client/console'
172
+ )
173
+ ```
174
+
175
+
141
176
  ### Keys
142
177
 
143
178
  Your CloudStack credentials, i.e. API key and secret key.
@@ -219,7 +254,7 @@ StackerBee supports using SSL. To do so, use an HTTPS URL. In some deployments,
219
254
 
220
255
  ```ruby
221
256
  StackerBee::Client.configuration = {
222
- url: 'https://my-cloudstack-server/client/api',
257
+ url: 'https://my-cloudstack-server',
223
258
  ssl_verify: false # ignore certificate validation errors
224
259
  }
225
260
  ```
@@ -230,7 +265,7 @@ The `StackerBee::Client` class can be configured with multiple options at once.
230
265
 
231
266
  ```ruby
232
267
  StackerBee::Client.configuration = {
233
- url: 'http://localhost:8080/client/api',
268
+ url: 'http://localhost:8080',
234
269
  api_key: 'API_KEY',
235
270
  secret_key: 'MY_SECRET_KEY'
236
271
  }
data/config.default.yml CHANGED
@@ -1,3 +1,3 @@
1
- url: 'http://127.0.0.1:1234/client/api/'
1
+ url: 'http://127.0.0.1:1234'
2
2
  api_key: 'MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY-KEY-MY'
3
3
  secret_key: 'TOP-SECRET-TOP-SECRET-TOP-SECRET-TOP-SECRET-TOP-SECRET-TOP-SECRET-TOP-SECRET-TOP-SECRE'
@@ -34,11 +34,14 @@ module StackerBee
34
34
  # rubocop:disable Metrics/AbcSize
35
35
  def middlewares
36
36
  # request
37
- builder.use Middleware::ConsoleAccess
37
+ builder.use Middleware::ConsoleAccess,
38
+ console_path: configuration.console_path
38
39
 
39
40
  builder.use Middleware::EndpointNormalizer, api: self.class.api
40
41
  builder.use Middleware::RemoveEmptyStrings
41
- builder.use Middleware::CloudStackAPI, api_key: configuration.api_key
42
+ builder.use Middleware::CloudStackAPI,
43
+ api_path: configuration.api_path,
44
+ api_key: configuration.api_key
42
45
 
43
46
  configuration.middlewares.call builder
44
47
 
@@ -6,6 +6,8 @@ module StackerBee
6
6
  ATTRIBUTES = [
7
7
  :ssl_verify,
8
8
  :url,
9
+ :api_path,
10
+ :console_path,
9
11
  :secret_key,
10
12
  :api_key,
11
13
  :middlewares,
@@ -37,6 +39,14 @@ module StackerBee
37
39
  attribute :url
38
40
  end
39
41
 
42
+ def api_path
43
+ attribute :api_path, '/client/api'
44
+ end
45
+
46
+ def console_path
47
+ attribute :console_path, '/client/console'
48
+ end
49
+
40
50
  def secret_key
41
51
  attribute :secret_key
42
52
  end
@@ -67,8 +77,18 @@ module StackerBee
67
77
 
68
78
  private
69
79
 
70
- def attribute(key, value = nil)
71
- @attributes.fetch(key, value)
80
+ def attribute(key, default_value = nil)
81
+ value = @attributes.fetch(key, default_value)
82
+
83
+ if blank?(value)
84
+ default_value
85
+ else
86
+ value
87
+ end
88
+ end
89
+
90
+ def blank?(value)
91
+ value.nil? || value == ''
72
92
  end
73
93
  end
74
94
  end
@@ -18,7 +18,11 @@ module StackerBee
18
18
 
19
19
  def perform_request(env)
20
20
  params = env.request.params.to_a.sort
21
- env.raw_response = connection.get(env.request.path, params)
21
+ env.raw_response = connection.get(path(env), params)
22
+ end
23
+
24
+ def path(env)
25
+ env.request.path.to_s.gsub(/\/$/, '')
22
26
  end
23
27
 
24
28
  def endpoint_name_for(*)
@@ -2,7 +2,6 @@ module StackerBee
2
2
  module Middleware
3
3
  class CloudStackAPI < Base
4
4
  RESPONSE_TYPE = 'json'
5
- DEFAULT_PATH = '/client/api/'
6
5
 
7
6
  def before(env)
8
7
  env.request.params.merge!(
@@ -10,7 +9,7 @@ module StackerBee
10
9
  command: env.request.endpoint_name,
11
10
  response: RESPONSE_TYPE
12
11
  )
13
- env.request.path ||= DEFAULT_PATH
12
+ env.request.path ||= api_path
14
13
  end
15
14
  end
16
15
  end
@@ -4,13 +4,12 @@ module StackerBee
4
4
  include Utilities
5
5
 
6
6
  ENDPOINT = 'consoleAccess'
7
- PATH = '/client/console'
8
7
  PARAMS = { cmd: 'access' }
9
8
 
10
9
  def before(env)
11
10
  return unless matches_endpoint?(env.request.endpoint_name)
12
11
  super
13
- env.request.path = PATH
12
+ env.request.path = console_path
14
13
  env.request.endpoint_name = ENDPOINT
15
14
  end
16
15
 
@@ -5,7 +5,7 @@ module StackerBee
5
5
  def initialize(env)
6
6
  self.env = env
7
7
  self.status = env.response.status
8
- super env.response.error
8
+ super env.response.error || env.request.path
9
9
  end
10
10
 
11
11
  def self.for(env)
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: <CLOUD_STACK_HOST>/client/console?apiKey=<CLOUD_STACK_API_KEY>&cmd=access&command=consoleAccess&response=json&signature=DsI/kxaNO7AgzDCgE1j/3rtq3xU&vm=36f9c08b-f17a-4d0e-ac9b-d45ce2d34fcd
5
+ uri: <CLOUD_STACK_HOST>/client/console?apiKey=<CLOUD_STACK_API_KEY>&cmd=access&command=consoleAccess&response=json&signature=0xjsh2gd3qbGVi9egkb6VHocx%2BI=&vm=36f9c08b-f17a-4d0e-ac9b-d45ce2d34fcd
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,37 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: <CLOUD_STACK_URL>?apiKey=<CLOUD_STACK_API_KEY>&command=listAccounts&response=json&signature=oftBcJm8kFc%2Buxul8pAL2%2Bh0bdU=
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.8
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Content-Type:
22
- - text/javascript; charset=UTF-8
23
- Content-Length:
24
- - '1727'
25
- Server:
26
- - Jetty(6.1.26)
27
- body:
28
- encoding: UTF-8
29
- string: '{ "listaccountsresponse" : { "count":1 ,"account" : [ {"id":"fdc009b8-2034-11e3-a44b-d6558ad1fb9f","name":"admin","accounttype":1,"domainid":"fdbfec94-2034-11e3-a44b-d6558ad1fb9f","domain":"ROOT","vmlimit":"Unlimited","vmtotal":0,"vmavailable":"Unlimited","iplimit":"Unlimited","iptotal":0,"ipavailable":"Unlimited","volumelimit":"Unlimited","volumetotal":0,"volumeavailable":"Unlimited","snapshotlimit":"Unlimited","snapshottotal":0,"snapshotavailable":"Unlimited","templatelimit":"Unlimited","templatetotal":0,"templateavailable":"Unlimited","projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"Unlimited","networktotal":0,"networkavailable":"Unlimited","vpclimit":"Unlimited","vpctotal":0,"vpcavailable":"Unlimited","cpulimit":"Unlimited","cputotal":0,"cpuavailable":"Unlimited","memorylimit":"Unlimited","memorytotal":0,"memoryavailable":"Unlimited","primarystoragelimit":"Unlimited","primarystoragetotal":0,"primarystorageavailable":"Unlimited","secondarystoragelimit":"Unlimited","secondarystoragetotal":0,"secondarystorageavailable":"Unlimited","state":"enabled","user":[{"id":"fdc03456-2034-11e3-a44b-d6558ad1fb9f","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2013-09-17T23:36:11-0400","state":"enabled","account":"admin","accounttype":1,"domainid":"fdbfec94-2034-11e3-a44b-d6558ad1fb9f","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"fdc009b8-2034-11e3-a44b-d6558ad1fb9f","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
30
- ] } }'
31
- http_version:
32
- recorded_at: Thu, 24 Oct 2013 18:42:15 GMT
33
- - request:
34
- method: get
35
- uri: <CLOUD_STACK_URL>/?apiKey=<CLOUD_STACK_API_KEY>&command=listAccounts&response=json&signature=oftBcJm8kFc%2Buxul8pAL2%2Bh0bdU=
5
+ uri: <CLOUD_STACK_HOST>/client/api?apiKey=<CLOUD_STACK_API_KEY>&command=listAccounts&response=json&signature=oftBcJm8kFc%2Buxul8pAL2%2Bh0bdU=
36
6
  body:
37
7
  encoding: US-ASCII
38
8
  string: ''
@@ -51,13 +21,13 @@ http_interactions:
51
21
  Content-Type:
52
22
  - text/javascript; charset=UTF-8
53
23
  Content-Length:
54
- - '1728'
24
+ - '1727'
55
25
  Server:
56
26
  - Jetty(6.1.26)
57
27
  body:
58
28
  encoding: UTF-8
59
- string: '{ "listaccountsresponse" : { "count":1 ,"account" : [ {"id":"b32dc958-b904-11e3-b3f0-080027079e3d","name":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","vmlimit":"Unlimited","vmtotal":0,"vmavailable":"Unlimited","iplimit":"Unlimited","iptotal":0,"ipavailable":"Unlimited","volumelimit":"Unlimited","volumetotal":0,"volumeavailable":"Unlimited","snapshotlimit":"Unlimited","snapshottotal":0,"snapshotavailable":"Unlimited","templatelimit":"Unlimited","templatetotal":0,"templateavailable":"Unlimited","projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"Unlimited","networktotal":11,"networkavailable":"Unlimited","vpclimit":"Unlimited","vpctotal":0,"vpcavailable":"Unlimited","cpulimit":"Unlimited","cputotal":0,"cpuavailable":"Unlimited","memorylimit":"Unlimited","memorytotal":0,"memoryavailable":"Unlimited","primarystoragelimit":"Unlimited","primarystoragetotal":0,"primarystorageavailable":"Unlimited","secondarystoragelimit":"Unlimited","secondarystoragetotal":0,"secondarystorageavailable":"Unlimited","state":"enabled","user":[{"id":"b32e02b0-b904-11e3-b3f0-080027079e3d","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2014-03-31T18:45:58+0000","state":"enabled","account":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"b32dc958-b904-11e3-b3f0-080027079e3d","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
29
+ string: '{ "listaccountsresponse" : { "count":1 ,"account" : [ {"id":"b32dc958-b904-11e3-b3f0-080027079e3d","name":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","vmlimit":"Unlimited","vmtotal":0,"vmavailable":"Unlimited","iplimit":"Unlimited","iptotal":0,"ipavailable":"Unlimited","volumelimit":"Unlimited","volumetotal":0,"volumeavailable":"Unlimited","snapshotlimit":"Unlimited","snapshottotal":0,"snapshotavailable":"Unlimited","templatelimit":"Unlimited","templatetotal":0,"templateavailable":"Unlimited","projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"Unlimited","networktotal":2,"networkavailable":"Unlimited","vpclimit":"Unlimited","vpctotal":0,"vpcavailable":"Unlimited","cpulimit":"Unlimited","cputotal":0,"cpuavailable":"Unlimited","memorylimit":"Unlimited","memorytotal":0,"memoryavailable":"Unlimited","primarystoragelimit":"Unlimited","primarystoragetotal":0,"primarystorageavailable":"Unlimited","secondarystoragelimit":"Unlimited","secondarystoragetotal":0,"secondarystorageavailable":"Unlimited","state":"enabled","user":[{"id":"b32e02b0-b904-11e3-b3f0-080027079e3d","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2014-03-31T18:45:58+0000","state":"enabled","account":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"b32dc958-b904-11e3-b3f0-080027079e3d","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
60
30
  ] } }'
61
31
  http_version:
62
- recorded_at: Thu, 09 Oct 2014 18:16:02 GMT
32
+ recorded_at: Mon, 24 Nov 2014 18:07:24 GMT
63
33
  recorded_with: VCR 2.9.3
@@ -2,37 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: <CLOUD_STACK_URL>?apiKey=<CLOUD_STACK_API_KEY>&command=listAccounts&response=json&signature=oftBcJm8kFc%2Buxul8pAL2%2Bh0bdU=
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.8
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Content-Type:
22
- - text/javascript; charset=UTF-8
23
- Content-Length:
24
- - '1778'
25
- Server:
26
- - Jetty(6.1.26)
27
- body:
28
- encoding: UTF-8
29
- string: '{ "listaccountsresponse" : { "count":1 ,"account" : [ {"id":"fdc009b8-2034-11e3-a44b-d6558ad1fb9f","name":"admin","accounttype":1,"domainid":"fdbfec94-2034-11e3-a44b-d6558ad1fb9f","domain":"ROOT","receivedbytes":100,"sentbytes":100,"vmlimit":"Unlimited","vmtotal":1,"vmavailable":"Unlimited","iplimit":"Unlimited","iptotal":1,"ipavailable":"Unlimited","volumelimit":"Unlimited","volumetotal":1,"volumeavailable":"Unlimited","snapshotlimit":"Unlimited","snapshottotal":0,"snapshotavailable":"Unlimited","templatelimit":"Unlimited","templatetotal":0,"templateavailable":"Unlimited","vmrunning":1,"projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"Unlimited","networktotal":1,"networkavailable":"Unlimited","vpclimit":"Unlimited","vpctotal":0,"vpcavailable":"Unlimited","cpulimit":"Unlimited","cputotal":1,"cpuavailable":"Unlimited","memorylimit":"Unlimited","memorytotal":32,"memoryavailable":"Unlimited","primarystoragelimit":"Unlimited","primarystoragetotal":2,"primarystorageavailable":"Unlimited","secondarystoragelimit":"Unlimited","secondarystoragetotal":0,"secondarystorageavailable":"Unlimited","state":"enabled","user":[{"id":"fdc03456-2034-11e3-a44b-d6558ad1fb9f","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2013-09-17T23:36:11-0400","state":"enabled","account":"admin","accounttype":1,"domainid":"fdbfec94-2034-11e3-a44b-d6558ad1fb9f","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"fdc009b8-2034-11e3-a44b-d6558ad1fb9f","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
30
- ] } }'
31
- http_version:
32
- recorded_at: Mon, 28 Oct 2013 17:22:52 GMT
33
- - request:
34
- method: get
35
- uri: <CLOUD_STACK_URL>/?apiKey=<CLOUD_STACK_API_KEY>&command=listAccounts&response=json&signature=oftBcJm8kFc%2Buxul8pAL2%2Bh0bdU=
5
+ uri: <CLOUD_STACK_HOST>/client/api?apiKey=<CLOUD_STACK_API_KEY>&command=listAccounts&response=json&signature=oftBcJm8kFc%2Buxul8pAL2%2Bh0bdU=
36
6
  body:
37
7
  encoding: US-ASCII
38
8
  string: ''
@@ -51,13 +21,13 @@ http_interactions:
51
21
  Content-Type:
52
22
  - text/javascript; charset=UTF-8
53
23
  Content-Length:
54
- - '1728'
24
+ - '1727'
55
25
  Server:
56
26
  - Jetty(6.1.26)
57
27
  body:
58
28
  encoding: UTF-8
59
- string: '{ "listaccountsresponse" : { "count":1 ,"account" : [ {"id":"b32dc958-b904-11e3-b3f0-080027079e3d","name":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","vmlimit":"Unlimited","vmtotal":0,"vmavailable":"Unlimited","iplimit":"Unlimited","iptotal":0,"ipavailable":"Unlimited","volumelimit":"Unlimited","volumetotal":0,"volumeavailable":"Unlimited","snapshotlimit":"Unlimited","snapshottotal":0,"snapshotavailable":"Unlimited","templatelimit":"Unlimited","templatetotal":0,"templateavailable":"Unlimited","projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"Unlimited","networktotal":12,"networkavailable":"Unlimited","vpclimit":"Unlimited","vpctotal":0,"vpcavailable":"Unlimited","cpulimit":"Unlimited","cputotal":0,"cpuavailable":"Unlimited","memorylimit":"Unlimited","memorytotal":0,"memoryavailable":"Unlimited","primarystoragelimit":"Unlimited","primarystoragetotal":0,"primarystorageavailable":"Unlimited","secondarystoragelimit":"Unlimited","secondarystoragetotal":0,"secondarystorageavailable":"Unlimited","state":"enabled","user":[{"id":"b32e02b0-b904-11e3-b3f0-080027079e3d","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2014-03-31T18:45:58+0000","state":"enabled","account":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"b32dc958-b904-11e3-b3f0-080027079e3d","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
29
+ string: '{ "listaccountsresponse" : { "count":1 ,"account" : [ {"id":"b32dc958-b904-11e3-b3f0-080027079e3d","name":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","vmlimit":"Unlimited","vmtotal":0,"vmavailable":"Unlimited","iplimit":"Unlimited","iptotal":0,"ipavailable":"Unlimited","volumelimit":"Unlimited","volumetotal":0,"volumeavailable":"Unlimited","snapshotlimit":"Unlimited","snapshottotal":0,"snapshotavailable":"Unlimited","templatelimit":"Unlimited","templatetotal":0,"templateavailable":"Unlimited","projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"Unlimited","networktotal":3,"networkavailable":"Unlimited","vpclimit":"Unlimited","vpctotal":0,"vpcavailable":"Unlimited","cpulimit":"Unlimited","cputotal":0,"cpuavailable":"Unlimited","memorylimit":"Unlimited","memorytotal":0,"memoryavailable":"Unlimited","primarystoragelimit":"Unlimited","primarystoragetotal":0,"primarystorageavailable":"Unlimited","secondarystoragelimit":"Unlimited","secondarystoragetotal":0,"secondarystorageavailable":"Unlimited","state":"enabled","user":[{"id":"b32e02b0-b904-11e3-b3f0-080027079e3d","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2014-03-31T18:45:58+0000","state":"enabled","account":"admin","accounttype":1,"domainid":"b32db4c2-b904-11e3-b3f0-080027079e3d","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"b32dc958-b904-11e3-b3f0-080027079e3d","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
60
30
  ] } }'
61
31
  http_version:
62
- recorded_at: Thu, 09 Oct 2014 18:16:03 GMT
32
+ recorded_at: Mon, 24 Nov 2014 18:07:26 GMT
63
33
  recorded_with: VCR 2.9.3