stacker_bee 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.travis.yml +9 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +112 -0
  9. data/Rakefile +6 -0
  10. data/bin/stacker_bee +97 -0
  11. data/config.default.yml +3 -0
  12. data/config/4.2.json +67126 -0
  13. data/lib/stacker_bee.rb +16 -0
  14. data/lib/stacker_bee/api.rb +44 -0
  15. data/lib/stacker_bee/body_parser.rb +23 -0
  16. data/lib/stacker_bee/client.rb +105 -0
  17. data/lib/stacker_bee/configuration.rb +6 -0
  18. data/lib/stacker_bee/connection.rb +31 -0
  19. data/lib/stacker_bee/middleware/logger.rb +48 -0
  20. data/lib/stacker_bee/middleware/signed_query.rb +29 -0
  21. data/lib/stacker_bee/rash.rb +95 -0
  22. data/lib/stacker_bee/request.rb +41 -0
  23. data/lib/stacker_bee/request_error.rb +39 -0
  24. data/lib/stacker_bee/response.rb +29 -0
  25. data/lib/stacker_bee/utilities.rb +18 -0
  26. data/lib/stacker_bee/version.rb +3 -0
  27. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/.yml +33 -0
  28. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_nil_request_parameter/properly_executes_the_request.yml +33 -0
  29. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/a_request_parameter_with_an_Array/.yml +35 -0
  30. 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 +33 -0
  31. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/containing_an_error/.yml +37 -0
  32. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/containing_an_error/should_log_response_as_error.yml +37 -0
  33. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first/.yml +33 -0
  34. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first_item/.yml +33 -0
  35. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first_item/_account_type_/.yml +33 -0
  36. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/first_item/_accounttype_/.yml +33 -0
  37. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/should_log_request.yml +33 -0
  38. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/should_not_log_response_as_error.yml +33 -0
  39. data/spec/cassettes/A_response_to_a_request_sent_to_the_CloudStack_API/space_character_in_a_request_parameter/properly_signs_the_request.yml +32 -0
  40. data/spec/fixtures/4.2.json +67126 -0
  41. data/spec/fixtures/simple.json +871 -0
  42. data/spec/integration/request_spec.rb +116 -0
  43. data/spec/spec_helper.rb +58 -0
  44. data/spec/units/stacker_bee/api_spec.rb +24 -0
  45. data/spec/units/stacker_bee/client_spec.rb +181 -0
  46. data/spec/units/stacker_bee/configuration_spec.rb +7 -0
  47. data/spec/units/stacker_bee/connection_spec.rb +45 -0
  48. data/spec/units/stacker_bee/middleware/logger_spec.rb +55 -0
  49. data/spec/units/stacker_bee/rash_spec.rb +87 -0
  50. data/spec/units/stacker_bee/request_error_spec.rb +44 -0
  51. data/spec/units/stacker_bee/request_spec.rb +49 -0
  52. data/spec/units/stacker_bee/response_spec.rb +79 -0
  53. data/spec/units/stacker_bee/utilities_spec.rb +25 -0
  54. data/spec/units/stacker_bee_spec.rb +6 -0
  55. data/stacker_bee.gemspec +30 -0
  56. metadata +225 -0
@@ -0,0 +1,39 @@
1
+ require "stacker_bee/body_parser"
2
+
3
+ module StackerBee
4
+ class RequestError < Exception
5
+ include BodyParser
6
+
7
+ def initialize(raw_body)
8
+ self.body = raw_body
9
+ end
10
+
11
+ def self.for(raw_response)
12
+ klass = case raw_response.status
13
+ when 401 then AuthenticationError
14
+ when 400..499 then ClientError
15
+ when 500..599 then ServerError
16
+ else
17
+ self
18
+ end
19
+ klass.new(raw_response)
20
+ end
21
+
22
+ def status
23
+ body["errorcode"]
24
+ end
25
+
26
+ def to_s
27
+ body["errortext"]
28
+ end
29
+ end
30
+
31
+ class ServerError < RequestError
32
+ end
33
+
34
+ class ClientError < RequestError
35
+ end
36
+
37
+ class AuthenticationError < ClientError
38
+ end
39
+ end
@@ -0,0 +1,29 @@
1
+ require "stacker_bee/body_parser"
2
+ require "stacker_bee/request_error"
3
+ require 'delegate'
4
+
5
+ module StackerBee
6
+ class Response < SimpleDelegator
7
+ include BodyParser
8
+
9
+ def initialize(raw_response)
10
+ fail RequestError.for(raw_response) unless raw_response.success?
11
+ self.body = raw_response
12
+ super body
13
+ end
14
+
15
+ protected
16
+
17
+ def parse(json)
18
+ parsed = super(json)
19
+ return parsed unless parsed.respond_to? :keys
20
+ if parsed.size == 2 && parsed.key?("count")
21
+ parsed.reject { |key, val| key == "count" }.values.first
22
+ elsif parsed.size == 1 && parsed.values.first.respond_to?(:keys)
23
+ parsed.values.first
24
+ else
25
+ parsed
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,18 @@
1
+ module StackerBee
2
+ module Utilities
3
+ def uncase(string)
4
+ string.to_s.downcase.gsub(/\W|_/, '')
5
+ end
6
+
7
+ def snake_case(string)
8
+ string.to_s.gsub(/(.)([A-Z])/, '\1_\2').gsub(/(\W|_)+/, '_').downcase
9
+ end
10
+
11
+ def camel_case(string, lower = false)
12
+ string.to_s.split(/\W|_/).each_with_object('') do |word, memo|
13
+ memo << (memo.empty? && lower ? word[0].downcase : word[0].upcase)
14
+ memo << word[1..-1]
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,3 @@
1
+ module StackerBee
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,35 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: <CLOUD_STACK_URL>?apiKey=<CLOUD_STACK_API_KEY>&command=listHosts&details=events,stats&page=1&pagesize=1&response=json&signature=YO7r8REbwAoQVCRYRQEbs6s9tmQ=
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
+ - '986'
25
+ Server:
26
+ - Jetty(6.1.26)
27
+ body:
28
+ encoding: UTF-8
29
+ string: '{ "listhostsresponse" : { "count":13 ,"host" : [ {"id":"15d73753-1d1e-49f8-ab5a-c3715c383541","name":"SimulatedAgent.d424bb6c-85b2-484a-9d91-578582f8acc8","state":"Up","disconnected":"2013-10-27T15:59:54-0400","type":"Routing","ipaddress":"172.16.15.0","zoneid":"2add4990-f5d4-4dbf-96ce-9d17e02a00ee","zonename":"Sandbox-simulator","podid":"84b42e1a-276b-4671-9f7b-92775927295d","podname":"POD0","version":"4.2.0","hypervisor":"Simulator","cpunumber":4,"cpuspeed":8000,"cpuused":"0%","networkkbsread":32768,"networkkbswrite":16384,"memoryused":0,"capabilities":"hvm","lastpinged":"1970-01-16T10:08:12-0500","managementserverid":235662889581471,"clusterid":"198f6715-e63b-48a4-a609-1845bcdcce99","clustername":"C0","clustertype":"CloudManaged","islocalstorageactive":false,"created":"2013-09-18T03:40:55-0400","events":"AgentConnected;
30
+ ShutdownRequested; AgentDisconnected; Remove; HostDown; PingTimeout; Ping;
31
+ ManagementServerDown; StartAgentRebalance","resourcestate":"Enabled"} ] }
32
+ }'
33
+ http_version:
34
+ recorded_at: Mon, 28 Oct 2013 18:20:00 GMT
35
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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":"ce45d9a0-41f5-11e3-aaa7-d6558ad1fb9f","name":"admin","accounttype":1,"domainid":"ce4585b8-41f5-11e3-aaa7-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":"ce46057e-41f5-11e3-aaa7-d6558ad1fb9f","username":"admin","firstname":"Admin","lastname":"User","email":"admin@mailprovider.com","created":"2013-10-30T22:29:33-0400","state":"enabled","account":"admin","accounttype":1,"domainid":"ce4585b8-41f5-11e3-aaa7-d6558ad1fb9f","domain":"ROOT","apikey":"<CLOUD_STACK_API_KEY>","secretkey":"<CLOUD_STACK_SECRET_KEY>","accountid":"ce45d9a0-41f5-11e3-aaa7-d6558ad1fb9f","iscallerchilddomain":false,"isdefault":true}],"isdefault":true}
30
+ ] } }'
31
+ http_version:
32
+ recorded_at: Thu, 31 Oct 2013 17:50:08 GMT
33
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,37 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: <CLOUD_STACK_URL>?apiKey=<CLOUD_STACK_API_KEY>&command=deployVirtualMachine&response=json&signature=3hI1nOEaCluyLOqvfIkEkvGM1HY=
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: 431
19
+ message: '431'
20
+ headers:
21
+ X-Description:
22
+ - Unable to execute API command deployvirtualmachine due to missing parameter
23
+ zoneid
24
+ Content-Type:
25
+ - text/javascript; charset=UTF-8
26
+ Content-Length:
27
+ - '184'
28
+ Server:
29
+ - Jetty(6.1.26)
30
+ body:
31
+ encoding: UTF-8
32
+ string: '{ "deployvirtualmachineresponse" : {"uuidList":[],"errorcode":431,"cserrorcode":9999,"errortext":"Unable
33
+ to execute API command deployvirtualmachine due to missing parameter zoneid"}
34
+ }'
35
+ http_version:
36
+ recorded_at: Thu, 24 Oct 2013 18:42:16 GMT
37
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,37 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: <CLOUD_STACK_URL>?apiKey=<CLOUD_STACK_API_KEY>&command=deployVirtualMachine&response=json&signature=3hI1nOEaCluyLOqvfIkEkvGM1HY=
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: 431
19
+ message: '431'
20
+ headers:
21
+ X-Description:
22
+ - Unable to execute API command deployvirtualmachine due to missing parameter
23
+ zoneid
24
+ Content-Type:
25
+ - text/javascript; charset=UTF-8
26
+ Content-Length:
27
+ - '184'
28
+ Server:
29
+ - Jetty(6.1.26)
30
+ body:
31
+ encoding: UTF-8
32
+ string: '{ "deployvirtualmachineresponse" : {"uuidList":[],"errorcode":431,"cserrorcode":9999,"errortext":"Unable
33
+ to execute API command deployvirtualmachine due to missing parameter zoneid"}
34
+ }'
35
+ http_version:
36
+ recorded_at: Thu, 24 Oct 2013 18:42:16 GMT
37
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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:16 GMT
33
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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: Tue, 29 Oct 2013 20:20:10 GMT
33
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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: Tue, 29 Oct 2013 20:20:11 GMT
33
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,33 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
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: Tue, 29 Oct 2013 20:20:11 GMT
33
+ recorded_with: VCR 2.6.0