solusvm 1.0.0.beta3 → 1.1.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/.gitignore +3 -0
  2. data/.travis.yml +10 -4
  3. data/LICENSE +1 -1
  4. data/README.markdown +1 -1
  5. data/lib/solusvm.rb +2 -2
  6. data/lib/solusvm/base.rb +10 -32
  7. data/lib/solusvm/cli/base_cli.rb +30 -5
  8. data/lib/solusvm/cli/client_cli.rb +9 -9
  9. data/lib/solusvm/cli/general_cli.rb +5 -5
  10. data/lib/solusvm/cli/node_cli.rb +8 -8
  11. data/lib/solusvm/cli/reseller_cli.rb +7 -7
  12. data/lib/solusvm/cli/server_cli.rb +31 -31
  13. data/lib/solusvm/solusvm_errors.rb +22 -0
  14. data/lib/solusvm/version.rb +1 -1
  15. data/solusvm.gemspec +2 -0
  16. data/test/cli/test_base_cli.rb +32 -0
  17. data/test/cli/test_client_cli.rb +38 -21
  18. data/test/cli/test_general_cli.rb +13 -4
  19. data/test/cli/test_node_cli.rb +28 -14
  20. data/test/cli/test_reseller_cli.rb +69 -58
  21. data/test/cli/test_server_cli.rb +128 -39
  22. data/test/solusvm/test_base.rb +103 -0
  23. data/test/{test_cli.rb → solusvm/test_cli.rb} +1 -1
  24. data/test/solusvm/test_client.rb +109 -0
  25. data/test/solusvm/test_general.rb +69 -0
  26. data/test/{test_hash.rb → solusvm/test_hash.rb} +1 -1
  27. data/test/solusvm/test_node.rb +120 -0
  28. data/test/solusvm/test_reseller.rb +93 -0
  29. data/test/solusvm/test_server.rb +253 -0
  30. data/test/{helper.rb → test_helper.rb} +19 -4
  31. data/test/test_solusvm.rb +1 -1
  32. data/test/vcr_cassettes/base/invalid_key.yml +19 -0
  33. data/test/vcr_cassettes/base/invalid_status.yml +19 -0
  34. data/test/vcr_cassettes/base/nonexistent_node.yml +19 -0
  35. data/test/vcr_cassettes/base/parse_response.yml +28 -0
  36. data/test/vcr_cassettes/base/statusmsg.yml +28 -0
  37. data/test/vcr_cassettes/base/successful.yml +45 -0
  38. data/test/vcr_cassettes/base/unauthorized_ip.yml +19 -0
  39. data/test/vcr_cassettes/client/authenticate.yml +37 -0
  40. data/test/vcr_cassettes/client/change_password.yml +39 -0
  41. data/test/vcr_cassettes/client/create.yml +42 -0
  42. data/test/vcr_cassettes/client/delete.yml +37 -0
  43. data/test/vcr_cassettes/client/exists.yml +20 -0
  44. data/test/vcr_cassettes/client/list.yml +66 -0
  45. data/test/vcr_cassettes/general/isos.yml +38 -0
  46. data/test/vcr_cassettes/general/plans.yml +38 -0
  47. data/test/vcr_cassettes/general/templates.yml +38 -0
  48. data/test/vcr_cassettes/node/available_ips.yml +41 -0
  49. data/test/vcr_cassettes/node/ids.yml +21 -0
  50. data/test/vcr_cassettes/node/list.yml +38 -0
  51. data/test/vcr_cassettes/node/statistics.yml +32 -0
  52. data/test/vcr_cassettes/node/virtualservers.yml +67 -0
  53. data/test/vcr_cassettes/node/xenresources.yml +22 -0
  54. data/test/vcr_cassettes/reseller/change_resources.yml +27 -0
  55. data/test/vcr_cassettes/reseller/create.yml +27 -0
  56. data/test/vcr_cassettes/reseller/delete.yml +15 -0
  57. data/test/vcr_cassettes/reseller/info.yml +27 -0
  58. data/test/vcr_cassettes/reseller/list.yml +27 -0
  59. data/test/vcr_cassettes/server/.yml +1017 -0
  60. data/test/vcr_cassettes/server/boot.yml +15 -0
  61. data/test/vcr_cassettes/server/change_bootorder.yml +15 -0
  62. data/test/vcr_cassettes/server/change_consolepass.yml +16 -0
  63. data/test/vcr_cassettes/server/change_hostname.yml +15 -0
  64. data/test/vcr_cassettes/server/change_owner.yml +15 -0
  65. data/test/vcr_cassettes/server/change_plan.yml +15 -0
  66. data/test/vcr_cassettes/server/change_rootpassword.yml +15 -0
  67. data/test/vcr_cassettes/server/change_vncpass.yml +15 -0
  68. data/test/vcr_cassettes/server/console.yml +15 -0
  69. data/test/vcr_cassettes/server/create.yml +27 -0
  70. data/test/vcr_cassettes/server/exists.yml +15 -0
  71. data/test/vcr_cassettes/server/info.yml +27 -0
  72. data/test/vcr_cassettes/server/info_all.yml +15 -0
  73. data/test/vcr_cassettes/server/mountiso.yml +15 -0
  74. data/test/vcr_cassettes/server/network_disable.yml +15 -0
  75. data/test/vcr_cassettes/server/network_enable.yml +15 -0
  76. data/test/vcr_cassettes/server/pae_disable.yml +15 -0
  77. data/test/vcr_cassettes/server/pae_enable.yml +15 -0
  78. data/test/vcr_cassettes/server/reboot.yml +15 -0
  79. data/test/vcr_cassettes/server/rebuild.yml +15 -0
  80. data/test/vcr_cassettes/server/resume.yml +15 -0
  81. data/test/vcr_cassettes/server/shutdown.yml +15 -0
  82. data/test/vcr_cassettes/server/status.yml +15 -0
  83. data/test/vcr_cassettes/server/suspend.yml +15 -0
  84. data/test/vcr_cassettes/server/terminate.yml +27 -0
  85. data/test/vcr_cassettes/server/tun_disable.yml +15 -0
  86. data/test/vcr_cassettes/server/tun_enable.yml +15 -0
  87. data/test/vcr_cassettes/server/unmountiso.yml +15 -0
  88. data/test/vcr_cassettes/server/vnc.yml +15 -0
  89. metadata +220 -156
  90. data/.rbenv-version +0 -1
  91. data/.rvmrc +0 -47
  92. data/test/fixtures/base_bad_key.txt +0 -1
  93. data/test/fixtures/base_node_does_not_exist.txt +0 -1
  94. data/test/fixtures/base_unauthorized_ip.txt +0 -1
  95. data/test/fixtures/client_authenticate_error.txt +0 -2
  96. data/test/fixtures/client_authenticate_success.txt +0 -2
  97. data/test/fixtures/client_change_password_error.txt +0 -2
  98. data/test/fixtures/client_change_password_success.txt +0 -4
  99. data/test/fixtures/client_create_error.txt +0 -2
  100. data/test/fixtures/client_create_success.txt +0 -7
  101. data/test/fixtures/client_delete_success.txt +0 -2
  102. data/test/fixtures/client_exists_success.txt +0 -2
  103. data/test/fixtures/client_list_success.txt +0 -14
  104. data/test/fixtures/client_list_success_empty.txt +0 -2
  105. data/test/fixtures/error.txt +0 -2
  106. data/test/fixtures/general_isos_success.txt +0 -3
  107. data/test/fixtures/general_plans_success.txt +0 -3
  108. data/test/fixtures/general_templates_success.txt +0 -3
  109. data/test/fixtures/node_list_all_ips_available.txt +0 -4
  110. data/test/fixtures/node_list_all_ips_not_available.txt +0 -4
  111. data/test/fixtures/node_statistics_success.txt +0 -14
  112. data/test/fixtures/node_virtualservers_success.txt +0 -15
  113. data/test/fixtures/node_virtualservers_success_empty.txt +0 -2
  114. data/test/fixtures/node_xenresources_success.txt +0 -4
  115. data/test/fixtures/nodes_ids_success.txt +0 -3
  116. data/test/fixtures/nodes_list_success.txt +0 -3
  117. data/test/fixtures/reseller_change_resources_success.txt +0 -16
  118. data/test/fixtures/reseller_create_success.txt +0 -23
  119. data/test/fixtures/reseller_delete_success.txt +0 -2
  120. data/test/fixtures/reseller_info_success.txt +0 -23
  121. data/test/fixtures/reseller_list_success.txt +0 -3
  122. data/test/fixtures/server_boot_success.txt +0 -2
  123. data/test/fixtures/server_bootorder_success.txt +0 -2
  124. data/test/fixtures/server_change_consolepass_success.txt +0 -3
  125. data/test/fixtures/server_change_owner_success.txt +0 -2
  126. data/test/fixtures/server_change_success.txt +0 -2
  127. data/test/fixtures/server_change_vncpass_success.txt +0 -3
  128. data/test/fixtures/server_console_success.txt +0 -7
  129. data/test/fixtures/server_create_success.txt +0 -10
  130. data/test/fixtures/server_exists_success.txt +0 -2
  131. data/test/fixtures/server_hostname_success.txt +0 -3
  132. data/test/fixtures/server_info_success.txt +0 -10
  133. data/test/fixtures/server_infoall_success.txt +0 -13
  134. data/test/fixtures/server_mountiso_success.txt +0 -2
  135. data/test/fixtures/server_network_disable_success.txt +0 -2
  136. data/test/fixtures/server_network_enable_success.txt +0 -2
  137. data/test/fixtures/server_pae_success.txt +0 -2
  138. data/test/fixtures/server_reboot_success.txt +0 -2
  139. data/test/fixtures/server_rebuild_success.txt +0 -2
  140. data/test/fixtures/server_resume_success.txt +0 -2
  141. data/test/fixtures/server_rootpassword_success.txt +0 -3
  142. data/test/fixtures/server_shutdown_success.txt +0 -2
  143. data/test/fixtures/server_status_success.txt +0 -2
  144. data/test/fixtures/server_suspend_success.txt +0 -2
  145. data/test/fixtures/server_terminate_success.txt +0 -2
  146. data/test/fixtures/server_tun_disable_success.txt +0 -2
  147. data/test/fixtures/server_tun_enable_success.txt +0 -2
  148. data/test/fixtures/server_unmountiso_success.txt +0 -2
  149. data/test/fixtures/server_vnc_success.txt +0 -6
  150. data/test/test_base.rb +0 -115
  151. data/test/test_client.rb +0 -98
  152. data/test/test_general.rb +0 -70
  153. data/test/test_node.rb +0 -112
  154. data/test/test_reseller.rb +0 -80
  155. data/test/test_server.rb +0 -227
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-boot&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 booted</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-bootorder&vserverid=1&bootorder=c&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>Boot order changed</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,16 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-consolepass&vserverid=1&consolepassword=thepassword&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 console password changed</statusmsg>
13
+ <consolepassword></consolepassword> '
14
+ http_version: '1.1'
15
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
16
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-hostname&vserverid=1&hostname=thehostname&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 hostname changed</statusmsg><hostname>hostname</hostname>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-changeowner&vserverid=1&clientid=2&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>Successfully changed owner</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-change&vserverid=1&plan=newplan&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 updated</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-rootpassword&vserverid=1&rootpassword=thepassword&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 root password changed</statusmsg><rootpassword>rootpassword</rootpassword>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-vncpass&vserverid=1&vncpassword=thepassword&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 vnc password changed</statusmsg><vncpassword></vncpassword>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-console&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><consoleip>theconsoleip</consoleip><consoleport>theconsoleport</consoleport><consolepassword>theconsolepassword</consolepassword><consoleusername>theconsoleusername</consoleusername>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,27 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?type=xen&username=bob&ips=1&node=node1&plan=plan1&template=mytpl&password=123456&hostname=server.hostname.com&action=vserver-create&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 created</statusmsg><mainipaddress>123.123.123.123</mainipaddress><extraipaddress>122.122.122.122,111.111.111.111</extraipaddress><rootpassword>123456</rootpassword><vserverid>100</vserverid><consoleuser>console-123</consoleuser><consolepassword>123456</consolepassword><hostname>server.hostname.com</hostname><virtid>vm101|101</virtid>
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?type=xen&username&ips=1&node&plan&template&password=&hostname=&action=vserver-create&id=api_id&key=api_key
18
+ body: ''
19
+ headers: {}
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ body: <status>error</status><statusmsg>error message</statusmsg>
25
+ http_version: "1.1"
26
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
27
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-checkexists&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 exists</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,27 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-info&vserverid=1&reboot=true&id=api_id&key=api_key
6
+ body: ''
7
+ headers: {}
8
+ response:
9
+ status:
10
+ code: 200
11
+ message: OK
12
+ body: <vserverid>1</vserverid><ctid-xid>1</ctid-xid><clientid>1</clientid><ipaddress>123.123.123.123</ipaddress><hostname>host.example.com</hostname><template>vps1</template><hdd>123456</hdd><memory>123456</memory><swap-burst>swp</swap-burst><type>xenhvm</type>
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-info&vserverid=1&reboot=false&id=api_id&key=api_key
18
+ body: ''
19
+ headers: {}
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ body: <vserverid>1</vserverid><ctid-xid>1</ctid-xid><clientid>1</clientid><ipaddress>123.123.123.123</ipaddress><hostname>host.example.com</hostname><template>vps1</template><hdd>123456</hdd><memory>123456</memory><swap-burst>swp</swap-burst><type>xenhvm</type>
25
+ http_version: '1.1'
26
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
27
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-infoall&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><node>tydeus</node><state>online</state><mainipaddress>123.123.123.123</mainipaddress><ipaddresses>123.123.123.123</ipaddresses><type>openvz</type><bandwidth>16106127360000,5370261749139,10735865610861,33</bandwidth>.<memory>1073741824,187097088,886644736,17</memory>.<hdd>236223201280,103640707072,132582494208,44</hdd>.<trafficgraph>/graphs/9/214/214-8f7daef90bc75037489af4217af674a67df545ba05c8a6bcd5341d5894f2f905bf23976f52c0104415c1694135d51f204ddfd7b11bbe87c195a5de4a-86400.png</trafficgraph>.<loadgraph>/graphs/9/214/214-load-8f7daef90bc75037489af4217af674a67df545ba05c8a6bcd5341d5894f2f905bf23976f52c0104415c1694135d51f204ddfd7b11bbe87c195a5de4a-86400.png</loadgraph>.<memorygraph>/graphs/9/214/214-mem-8f7daef90bc75037489af4217af674a67df545ba05c8a6bcd5341d5894f2f905bf23976f52c0104415c1694135d51f204ddfd7b11bbe87c195a5de4a-86400.png</memorygraph>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-mountiso&vserverid=1&iso=theiso&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 mounted</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-network-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>Virtual server network 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
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-network-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>Virtual server network 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
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-pae&vserverid=1&pae=off&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|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
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-pae&vserverid=1&pae=on&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|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
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-reboot&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 rebooted</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-rebuild&vserverid=1&template=mytpl&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 is being rebuilt</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-unsuspend&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 unsuspended</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-shutdown&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 shutdown</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.example.com/api?action=vserver-status&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>online</statusmsg>
13
+ http_version: '1.1'
14
+ recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
15
+ recorded_with: VCR 2.0.0
@@ -0,0 +1,15 @@
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
@@ -0,0 +1,27 @@
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