solusvm 1.4.0 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/LICENSE +1 -1
  4. data/README.markdown +159 -116
  5. data/Rakefile +3 -33
  6. data/bin/solusvm +3 -4
  7. data/lib/solusvm.rb +1 -3
  8. data/lib/solusvm/base.rb +101 -46
  9. data/lib/solusvm/cli.rb +8 -8
  10. data/lib/solusvm/cli/base_cli.rb +3 -3
  11. data/lib/solusvm/cli/client_cli.rb +3 -5
  12. data/lib/solusvm/cli/general_cli.rb +3 -5
  13. data/lib/solusvm/cli/node_cli.rb +3 -5
  14. data/lib/solusvm/cli/reseller_cli.rb +3 -5
  15. data/lib/solusvm/cli/server_cli.rb +4 -6
  16. data/lib/solusvm/client.rb +45 -27
  17. data/lib/solusvm/errors.rb +3 -0
  18. data/lib/solusvm/general.rb +11 -12
  19. data/lib/solusvm/hash.rb +1 -11
  20. data/lib/solusvm/node.rb +33 -21
  21. data/lib/solusvm/reseller.rb +53 -49
  22. data/lib/solusvm/server.rb +188 -52
  23. data/lib/solusvm/version.rb +2 -2
  24. data/test/cli/test_base_cli.rb +14 -4
  25. data/test/cli/test_client_cli.rb +13 -13
  26. data/test/cli/test_general_cli.rb +7 -7
  27. data/test/cli/test_node_cli.rb +13 -13
  28. data/test/cli/test_reseller_cli.rb +11 -11
  29. data/test/cli/test_server_cli.rb +61 -61
  30. data/test/sham_rack_stubs/base/parse-response.json +4 -0
  31. data/test/sham_rack_stubs/client/authenticate.json +4 -0
  32. data/test/sham_rack_stubs/client/change-password.json +6 -0
  33. data/test/sham_rack_stubs/client/create.json +9 -0
  34. data/test/sham_rack_stubs/client/delete.json +4 -0
  35. data/test/sham_rack_stubs/client/exists.json +4 -0
  36. data/test/sham_rack_stubs/client/list-empty.json +5 -0
  37. data/test/sham_rack_stubs/client/list.json +30 -0
  38. data/test/sham_rack_stubs/general/isos-empty.json +5 -0
  39. data/test/sham_rack_stubs/general/isos.json +5 -0
  40. data/test/sham_rack_stubs/general/plans-empty.json +5 -0
  41. data/test/sham_rack_stubs/general/plans.json +5 -0
  42. data/test/sham_rack_stubs/general/templates-empty.json +7 -0
  43. data/test/sham_rack_stubs/general/templates.json +7 -0
  44. data/test/sham_rack_stubs/generic/error.json +4 -0
  45. data/test/sham_rack_stubs/node/available-ips-empty.json +6 -0
  46. data/test/sham_rack_stubs/node/available-ips.json +6 -0
  47. data/test/sham_rack_stubs/node/ids.json +5 -0
  48. data/test/sham_rack_stubs/node/list-empty.json +5 -0
  49. data/test/sham_rack_stubs/node/list-groups.json +5 -0
  50. data/test/sham_rack_stubs/node/list.json +5 -0
  51. data/test/sham_rack_stubs/node/statistics.json +21 -0
  52. data/test/sham_rack_stubs/node/virtualservers-empty.json +5 -0
  53. data/test/sham_rack_stubs/node/virtualservers.json +19 -0
  54. data/test/sham_rack_stubs/node/xenresources.json +6 -0
  55. data/test/sham_rack_stubs/reseller/change-resources.json +18 -0
  56. data/test/sham_rack_stubs/reseller/create.json +25 -0
  57. data/test/sham_rack_stubs/reseller/delete.json +4 -0
  58. data/test/sham_rack_stubs/reseller/info.json +24 -0
  59. data/test/sham_rack_stubs/reseller/list-empty.json +5 -0
  60. data/test/sham_rack_stubs/reseller/list.json +5 -0
  61. data/test/sham_rack_stubs/server/add-ip.json +5 -0
  62. data/test/sham_rack_stubs/server/boot.json +4 -0
  63. data/test/sham_rack_stubs/server/change-bootorder.json +4 -0
  64. data/test/sham_rack_stubs/server/change-hostname.json +5 -0
  65. data/test/sham_rack_stubs/server/change-owner.json +4 -0
  66. data/test/sham_rack_stubs/server/change-plan.json +4 -0
  67. data/test/sham_rack_stubs/server/change-rootpassword.json +5 -0
  68. data/test/sham_rack_stubs/server/change-vncpass.json +5 -0
  69. data/test/sham_rack_stubs/server/console.json +13 -0
  70. data/test/sham_rack_stubs/server/create.json +13 -0
  71. data/test/sham_rack_stubs/server/del-ip.json +4 -0
  72. data/test/sham_rack_stubs/server/exists.json +4 -0
  73. data/test/sham_rack_stubs/server/info-all.json +16 -0
  74. data/test/sham_rack_stubs/server/info.json +15 -0
  75. data/test/sham_rack_stubs/server/mountiso.json +4 -0
  76. data/test/sham_rack_stubs/server/network-disable.json +4 -0
  77. data/test/sham_rack_stubs/server/network-enable.json +4 -0
  78. data/test/sham_rack_stubs/server/pae-disable.json +4 -0
  79. data/test/sham_rack_stubs/server/pae-enable.json +4 -0
  80. data/test/sham_rack_stubs/server/reboot.json +4 -0
  81. data/test/sham_rack_stubs/server/rebuild.json +4 -0
  82. data/test/sham_rack_stubs/server/resume.json +4 -0
  83. data/test/sham_rack_stubs/server/shutdown.json +4 -0
  84. data/test/sham_rack_stubs/server/status.json +4 -0
  85. data/test/sham_rack_stubs/server/suspend.json +4 -0
  86. data/test/sham_rack_stubs/server/terminate.json +4 -0
  87. data/test/sham_rack_stubs/server/tun-disable.json +4 -0
  88. data/test/sham_rack_stubs/server/tun-enable.json +4 -0
  89. data/test/sham_rack_stubs/server/unmountiso.json +4 -0
  90. data/test/sham_rack_stubs/server/vnc.json +8 -0
  91. data/test/solusvm/test_base.rb +34 -56
  92. data/test/solusvm/test_cli.rb +3 -3
  93. data/test/solusvm/test_client.rb +56 -66
  94. data/test/solusvm/test_general.rb +34 -19
  95. data/test/solusvm/test_hash.rb +0 -9
  96. data/test/solusvm/test_node.rb +66 -72
  97. data/test/solusvm/test_reseller.rb +47 -58
  98. data/test/solusvm/test_server.rb +149 -164
  99. data/test/test_helper.rb +43 -31
  100. metadata +173 -189
  101. data/.document +0 -5
  102. data/.gitignore +0 -25
  103. data/.travis.yml +0 -12
  104. data/solusvm.gemspec +0 -33
  105. data/test/vcr_cassettes/base/invalid_key.yml +0 -19
  106. data/test/vcr_cassettes/base/invalid_status.yml +0 -19
  107. data/test/vcr_cassettes/base/nonexistent_node.yml +0 -19
  108. data/test/vcr_cassettes/base/parse_response.yml +0 -28
  109. data/test/vcr_cassettes/base/statusmsg.yml +0 -28
  110. data/test/vcr_cassettes/base/successful.yml +0 -68
  111. data/test/vcr_cassettes/base/successful_instance_config.yml +0 -28
  112. data/test/vcr_cassettes/base/unauthorized_ip.yml +0 -19
  113. data/test/vcr_cassettes/client/authenticate.yml +0 -37
  114. data/test/vcr_cassettes/client/change_password.yml +0 -39
  115. data/test/vcr_cassettes/client/create.yml +0 -42
  116. data/test/vcr_cassettes/client/delete.yml +0 -37
  117. data/test/vcr_cassettes/client/exists.yml +0 -20
  118. data/test/vcr_cassettes/client/list.yml +0 -66
  119. data/test/vcr_cassettes/general/isos.yml +0 -38
  120. data/test/vcr_cassettes/general/plans.yml +0 -38
  121. data/test/vcr_cassettes/general/templates.yml +0 -38
  122. data/test/vcr_cassettes/node/available_ips.yml +0 -41
  123. data/test/vcr_cassettes/node/ids.yml +0 -21
  124. data/test/vcr_cassettes/node/list.yml +0 -38
  125. data/test/vcr_cassettes/node/list_groups.yml +0 -20
  126. data/test/vcr_cassettes/node/statistics.yml +0 -32
  127. data/test/vcr_cassettes/node/virtualservers.yml +0 -67
  128. data/test/vcr_cassettes/node/xenresources.yml +0 -22
  129. data/test/vcr_cassettes/reseller/change_resources.yml +0 -27
  130. data/test/vcr_cassettes/reseller/create.yml +0 -27
  131. data/test/vcr_cassettes/reseller/delete.yml +0 -15
  132. data/test/vcr_cassettes/reseller/info.yml +0 -27
  133. data/test/vcr_cassettes/reseller/list.yml +0 -27
  134. data/test/vcr_cassettes/server/.yml +0 -1017
  135. data/test/vcr_cassettes/server/add_ip.yml +0 -15
  136. data/test/vcr_cassettes/server/boot.yml +0 -15
  137. data/test/vcr_cassettes/server/change_bootorder.yml +0 -15
  138. data/test/vcr_cassettes/server/change_consolepass.yml +0 -16
  139. data/test/vcr_cassettes/server/change_hostname.yml +0 -15
  140. data/test/vcr_cassettes/server/change_owner.yml +0 -15
  141. data/test/vcr_cassettes/server/change_plan.yml +0 -15
  142. data/test/vcr_cassettes/server/change_rootpassword.yml +0 -15
  143. data/test/vcr_cassettes/server/change_vncpass.yml +0 -15
  144. data/test/vcr_cassettes/server/console.yml +0 -28
  145. data/test/vcr_cassettes/server/create.yml +0 -27
  146. data/test/vcr_cassettes/server/del_ip.yml +0 -15
  147. data/test/vcr_cassettes/server/exists.yml +0 -15
  148. data/test/vcr_cassettes/server/info.yml +0 -27
  149. data/test/vcr_cassettes/server/info_all.yml +0 -15
  150. data/test/vcr_cassettes/server/mountiso.yml +0 -15
  151. data/test/vcr_cassettes/server/network_disable.yml +0 -15
  152. data/test/vcr_cassettes/server/network_enable.yml +0 -15
  153. data/test/vcr_cassettes/server/pae_disable.yml +0 -15
  154. data/test/vcr_cassettes/server/pae_enable.yml +0 -15
  155. data/test/vcr_cassettes/server/reboot.yml +0 -15
  156. data/test/vcr_cassettes/server/rebuild.yml +0 -15
  157. data/test/vcr_cassettes/server/resume.yml +0 -15
  158. data/test/vcr_cassettes/server/shutdown.yml +0 -15
  159. data/test/vcr_cassettes/server/status.yml +0 -15
  160. data/test/vcr_cassettes/server/suspend.yml +0 -15
  161. data/test/vcr_cassettes/server/terminate.yml +0 -27
  162. data/test/vcr_cassettes/server/tun_disable.yml +0 -15
  163. data/test/vcr_cassettes/server/tun_enable.yml +0 -15
  164. data/test/vcr_cassettes/server/unmountiso.yml +0 -15
  165. data/test/vcr_cassettes/server/vnc.yml +0 -15
@@ -1,15 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://www.example.com/api?action=vserver-suspend&vserverid=1&id=api_id&key=api_key
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- body: <status>success</status><statusmsg>Virtual server suspended</statusmsg>
13
- http_version: '1.1'
14
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
- recorded_with: VCR 2.0.0
@@ -1,27 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://www.example.com/api?action=vserver-terminate&vserverid=1&deleteclient=true&id=api_id&key=api_key
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- body: <status>success</status><statusmsg>Virtual server terminated</statusmsg>
13
- http_version: '1.1'
14
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
- - request:
16
- method: get
17
- uri: http://www.example.com/api?action=vserver-terminate&vserverid=1&deleteclient=false&id=api_id&key=api_key
18
- body: ''
19
- headers: {}
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- body: <status>success</status><statusmsg>Virtual server terminated</statusmsg>
25
- http_version: '1.1'
26
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
27
- recorded_with: VCR 2.0.0
@@ -1,15 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://www.example.com/api?action=vserver-tun-disable&vserverid=1&id=api_id&key=api_key
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- body: <status>success</status><statusmsg>Disabled</statusmsg>
13
- http_version: '1.1'
14
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
- recorded_with: VCR 2.0.0
@@ -1,15 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://www.example.com/api?action=vserver-tun-enable&vserverid=1&id=api_id&key=api_key
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- body: <status>success</status><statusmsg>Enabled</statusmsg>
13
- http_version: '1.1'
14
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
- recorded_with: VCR 2.0.0
@@ -1,15 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://www.example.com/api?action=vserver-unmountiso&vserverid=1&id=api_id&key=api_key
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- body: <status>success</status><statusmsg>ISO unmounted</statusmsg>
13
- http_version: '1.1'
14
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
- recorded_with: VCR 2.0.0
@@ -1,15 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://www.example.com/api?action=vserver-vnc&vserverid=1&id=api_id&key=api_key
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- body: <status>success</status><statusmsg></statusmsg> <type>thetype</type><vncip>thevncip</vncip><vncport>thevncport</vncport><vncpassword>thevncpassword</vncpassword>
13
- http_version: '1.1'
14
- recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
- recorded_with: VCR 2.0.0