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.
- data/.gitignore +3 -0
- data/.travis.yml +10 -4
- data/LICENSE +1 -1
- data/README.markdown +1 -1
- data/lib/solusvm.rb +2 -2
- data/lib/solusvm/base.rb +10 -32
- data/lib/solusvm/cli/base_cli.rb +30 -5
- data/lib/solusvm/cli/client_cli.rb +9 -9
- data/lib/solusvm/cli/general_cli.rb +5 -5
- data/lib/solusvm/cli/node_cli.rb +8 -8
- data/lib/solusvm/cli/reseller_cli.rb +7 -7
- data/lib/solusvm/cli/server_cli.rb +31 -31
- data/lib/solusvm/solusvm_errors.rb +22 -0
- data/lib/solusvm/version.rb +1 -1
- data/solusvm.gemspec +2 -0
- data/test/cli/test_base_cli.rb +32 -0
- data/test/cli/test_client_cli.rb +38 -21
- data/test/cli/test_general_cli.rb +13 -4
- data/test/cli/test_node_cli.rb +28 -14
- data/test/cli/test_reseller_cli.rb +69 -58
- data/test/cli/test_server_cli.rb +128 -39
- data/test/solusvm/test_base.rb +103 -0
- data/test/{test_cli.rb → solusvm/test_cli.rb} +1 -1
- data/test/solusvm/test_client.rb +109 -0
- data/test/solusvm/test_general.rb +69 -0
- data/test/{test_hash.rb → solusvm/test_hash.rb} +1 -1
- data/test/solusvm/test_node.rb +120 -0
- data/test/solusvm/test_reseller.rb +93 -0
- data/test/solusvm/test_server.rb +253 -0
- data/test/{helper.rb → test_helper.rb} +19 -4
- data/test/test_solusvm.rb +1 -1
- data/test/vcr_cassettes/base/invalid_key.yml +19 -0
- data/test/vcr_cassettes/base/invalid_status.yml +19 -0
- data/test/vcr_cassettes/base/nonexistent_node.yml +19 -0
- data/test/vcr_cassettes/base/parse_response.yml +28 -0
- data/test/vcr_cassettes/base/statusmsg.yml +28 -0
- data/test/vcr_cassettes/base/successful.yml +45 -0
- data/test/vcr_cassettes/base/unauthorized_ip.yml +19 -0
- data/test/vcr_cassettes/client/authenticate.yml +37 -0
- data/test/vcr_cassettes/client/change_password.yml +39 -0
- data/test/vcr_cassettes/client/create.yml +42 -0
- data/test/vcr_cassettes/client/delete.yml +37 -0
- data/test/vcr_cassettes/client/exists.yml +20 -0
- data/test/vcr_cassettes/client/list.yml +66 -0
- data/test/vcr_cassettes/general/isos.yml +38 -0
- data/test/vcr_cassettes/general/plans.yml +38 -0
- data/test/vcr_cassettes/general/templates.yml +38 -0
- data/test/vcr_cassettes/node/available_ips.yml +41 -0
- data/test/vcr_cassettes/node/ids.yml +21 -0
- data/test/vcr_cassettes/node/list.yml +38 -0
- data/test/vcr_cassettes/node/statistics.yml +32 -0
- data/test/vcr_cassettes/node/virtualservers.yml +67 -0
- data/test/vcr_cassettes/node/xenresources.yml +22 -0
- data/test/vcr_cassettes/reseller/change_resources.yml +27 -0
- data/test/vcr_cassettes/reseller/create.yml +27 -0
- data/test/vcr_cassettes/reseller/delete.yml +15 -0
- data/test/vcr_cassettes/reseller/info.yml +27 -0
- data/test/vcr_cassettes/reseller/list.yml +27 -0
- data/test/vcr_cassettes/server/.yml +1017 -0
- data/test/vcr_cassettes/server/boot.yml +15 -0
- data/test/vcr_cassettes/server/change_bootorder.yml +15 -0
- data/test/vcr_cassettes/server/change_consolepass.yml +16 -0
- data/test/vcr_cassettes/server/change_hostname.yml +15 -0
- data/test/vcr_cassettes/server/change_owner.yml +15 -0
- data/test/vcr_cassettes/server/change_plan.yml +15 -0
- data/test/vcr_cassettes/server/change_rootpassword.yml +15 -0
- data/test/vcr_cassettes/server/change_vncpass.yml +15 -0
- data/test/vcr_cassettes/server/console.yml +15 -0
- data/test/vcr_cassettes/server/create.yml +27 -0
- data/test/vcr_cassettes/server/exists.yml +15 -0
- data/test/vcr_cassettes/server/info.yml +27 -0
- data/test/vcr_cassettes/server/info_all.yml +15 -0
- data/test/vcr_cassettes/server/mountiso.yml +15 -0
- data/test/vcr_cassettes/server/network_disable.yml +15 -0
- data/test/vcr_cassettes/server/network_enable.yml +15 -0
- data/test/vcr_cassettes/server/pae_disable.yml +15 -0
- data/test/vcr_cassettes/server/pae_enable.yml +15 -0
- data/test/vcr_cassettes/server/reboot.yml +15 -0
- data/test/vcr_cassettes/server/rebuild.yml +15 -0
- data/test/vcr_cassettes/server/resume.yml +15 -0
- data/test/vcr_cassettes/server/shutdown.yml +15 -0
- data/test/vcr_cassettes/server/status.yml +15 -0
- data/test/vcr_cassettes/server/suspend.yml +15 -0
- data/test/vcr_cassettes/server/terminate.yml +27 -0
- data/test/vcr_cassettes/server/tun_disable.yml +15 -0
- data/test/vcr_cassettes/server/tun_enable.yml +15 -0
- data/test/vcr_cassettes/server/unmountiso.yml +15 -0
- data/test/vcr_cassettes/server/vnc.yml +15 -0
- metadata +220 -156
- data/.rbenv-version +0 -1
- data/.rvmrc +0 -47
- data/test/fixtures/base_bad_key.txt +0 -1
- data/test/fixtures/base_node_does_not_exist.txt +0 -1
- data/test/fixtures/base_unauthorized_ip.txt +0 -1
- data/test/fixtures/client_authenticate_error.txt +0 -2
- data/test/fixtures/client_authenticate_success.txt +0 -2
- data/test/fixtures/client_change_password_error.txt +0 -2
- data/test/fixtures/client_change_password_success.txt +0 -4
- data/test/fixtures/client_create_error.txt +0 -2
- data/test/fixtures/client_create_success.txt +0 -7
- data/test/fixtures/client_delete_success.txt +0 -2
- data/test/fixtures/client_exists_success.txt +0 -2
- data/test/fixtures/client_list_success.txt +0 -14
- data/test/fixtures/client_list_success_empty.txt +0 -2
- data/test/fixtures/error.txt +0 -2
- data/test/fixtures/general_isos_success.txt +0 -3
- data/test/fixtures/general_plans_success.txt +0 -3
- data/test/fixtures/general_templates_success.txt +0 -3
- data/test/fixtures/node_list_all_ips_available.txt +0 -4
- data/test/fixtures/node_list_all_ips_not_available.txt +0 -4
- data/test/fixtures/node_statistics_success.txt +0 -14
- data/test/fixtures/node_virtualservers_success.txt +0 -15
- data/test/fixtures/node_virtualservers_success_empty.txt +0 -2
- data/test/fixtures/node_xenresources_success.txt +0 -4
- data/test/fixtures/nodes_ids_success.txt +0 -3
- data/test/fixtures/nodes_list_success.txt +0 -3
- data/test/fixtures/reseller_change_resources_success.txt +0 -16
- data/test/fixtures/reseller_create_success.txt +0 -23
- data/test/fixtures/reseller_delete_success.txt +0 -2
- data/test/fixtures/reseller_info_success.txt +0 -23
- data/test/fixtures/reseller_list_success.txt +0 -3
- data/test/fixtures/server_boot_success.txt +0 -2
- data/test/fixtures/server_bootorder_success.txt +0 -2
- data/test/fixtures/server_change_consolepass_success.txt +0 -3
- data/test/fixtures/server_change_owner_success.txt +0 -2
- data/test/fixtures/server_change_success.txt +0 -2
- data/test/fixtures/server_change_vncpass_success.txt +0 -3
- data/test/fixtures/server_console_success.txt +0 -7
- data/test/fixtures/server_create_success.txt +0 -10
- data/test/fixtures/server_exists_success.txt +0 -2
- data/test/fixtures/server_hostname_success.txt +0 -3
- data/test/fixtures/server_info_success.txt +0 -10
- data/test/fixtures/server_infoall_success.txt +0 -13
- data/test/fixtures/server_mountiso_success.txt +0 -2
- data/test/fixtures/server_network_disable_success.txt +0 -2
- data/test/fixtures/server_network_enable_success.txt +0 -2
- data/test/fixtures/server_pae_success.txt +0 -2
- data/test/fixtures/server_reboot_success.txt +0 -2
- data/test/fixtures/server_rebuild_success.txt +0 -2
- data/test/fixtures/server_resume_success.txt +0 -2
- data/test/fixtures/server_rootpassword_success.txt +0 -3
- data/test/fixtures/server_shutdown_success.txt +0 -2
- data/test/fixtures/server_status_success.txt +0 -2
- data/test/fixtures/server_suspend_success.txt +0 -2
- data/test/fixtures/server_terminate_success.txt +0 -2
- data/test/fixtures/server_tun_disable_success.txt +0 -2
- data/test/fixtures/server_tun_enable_success.txt +0 -2
- data/test/fixtures/server_unmountiso_success.txt +0 -2
- data/test/fixtures/server_vnc_success.txt +0 -6
- data/test/test_base.rb +0 -115
- data/test/test_client.rb +0 -98
- data/test/test_general.rb +0 -70
- data/test/test_node.rb +0 -112
- data/test/test_reseller.rb +0 -80
- data/test/test_server.rb +0 -227
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=listiso&type=xen&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<iso>iso1,iso2,iso3</iso>
|
19
|
+
http_version: "1.1"
|
20
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
21
|
+
- request:
|
22
|
+
method: get
|
23
|
+
uri: http://www.example.com/api?action=listiso&type=openvz&id=api_id&key=api_key
|
24
|
+
body:
|
25
|
+
encoding: UTF-8
|
26
|
+
string: ""
|
27
|
+
headers: {}
|
28
|
+
response:
|
29
|
+
status:
|
30
|
+
code: 200
|
31
|
+
message: OK
|
32
|
+
body:
|
33
|
+
encoding: UTF-8
|
34
|
+
string: <status>error</status>
|
35
|
+
<statusmsg>error message</statusmsg>
|
36
|
+
http_version: "1.1"
|
37
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=listplans&type=xen&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<plans>plan1,plan2,plan3,plan4</plans>
|
19
|
+
http_version: "1.1"
|
20
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
21
|
+
- request:
|
22
|
+
method: get
|
23
|
+
uri: http://www.example.com/api?action=listplans&type=openvz&id=api_id&key=api_key
|
24
|
+
body:
|
25
|
+
encoding: UTF-8
|
26
|
+
string: ""
|
27
|
+
headers: {}
|
28
|
+
response:
|
29
|
+
status:
|
30
|
+
code: 200
|
31
|
+
message: OK
|
32
|
+
body:
|
33
|
+
encoding: UTF-8
|
34
|
+
string: <status>error</status>
|
35
|
+
<statusmsg>error message</statusmsg>
|
36
|
+
http_version: "1.1"
|
37
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=listtemplates&type=xen&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<templates>template1,template2,template3</templates>
|
19
|
+
http_version: "1.1"
|
20
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
21
|
+
- request:
|
22
|
+
method: get
|
23
|
+
uri: http://www.example.com/api?action=listtemplates&type=openvz&id=api_id&key=api_key
|
24
|
+
body:
|
25
|
+
encoding: UTF-8
|
26
|
+
string: ""
|
27
|
+
headers: {}
|
28
|
+
response:
|
29
|
+
status:
|
30
|
+
code: 200
|
31
|
+
message: OK
|
32
|
+
body:
|
33
|
+
encoding: UTF-8
|
34
|
+
string: <status>error</status>
|
35
|
+
<statusmsg>error message</statusmsg>
|
36
|
+
http_version: "1.1"
|
37
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=node-iplist&nodeid=1&id=api_id1&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg>Available ip addresses</statusmsg>
|
18
|
+
<ipcount>3</ipcount>
|
19
|
+
<ips>123.123.123.123,124.124.124.124,125.125.125.125</ips>
|
20
|
+
http_version: "1.1"
|
21
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
22
|
+
- request:
|
23
|
+
method: get
|
24
|
+
uri: http://www.example.com/api?action=node-iplist&nodeid=1&id=api_id2&key=api_key
|
25
|
+
body:
|
26
|
+
encoding: UTF-8
|
27
|
+
string: ""
|
28
|
+
headers: {}
|
29
|
+
response:
|
30
|
+
status:
|
31
|
+
code: 200
|
32
|
+
message: OK
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: <status>success</status>
|
36
|
+
<statusmsg>No available ip addresses</statusmsg>
|
37
|
+
<ipcount>3</ipcount>
|
38
|
+
<ips></ips>
|
39
|
+
http_version: "1.1"
|
40
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
41
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=node-idlist&type=xen&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<nodes>nodeid1,nodeid2,nodeid3,nodeid4</nodes>
|
19
|
+
http_version: "1.1"
|
20
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
21
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=listnodes&type=xen&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<nodes>node1,node2,node3,node4</nodes>
|
19
|
+
http_version: "1.1"
|
20
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
21
|
+
- request:
|
22
|
+
method: get
|
23
|
+
uri: http://www.example.com/api?action=listnodes&type=openvz&id=api_id&key=api_key
|
24
|
+
body:
|
25
|
+
encoding: UTF-8
|
26
|
+
string: ""
|
27
|
+
headers: {}
|
28
|
+
response:
|
29
|
+
status:
|
30
|
+
code: 200
|
31
|
+
message: OK
|
32
|
+
body:
|
33
|
+
encoding: UTF-8
|
34
|
+
string: <status>error</status>
|
35
|
+
<statusmsg>error message</statusmsg>
|
36
|
+
http_version: "1.1"
|
37
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=node-statistics&nodeid=1&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<id>1</id>
|
19
|
+
<name>name</name>
|
20
|
+
<ip>127.0.0.1</ip>
|
21
|
+
<hostname>hostname.com</hostname>
|
22
|
+
<country>country</country>
|
23
|
+
<city>city</city>
|
24
|
+
<sshport>22</sshport>
|
25
|
+
<arch>x86_64</arch>
|
26
|
+
<freememory>10</freememory>
|
27
|
+
<freedisk>1000</freedisk>
|
28
|
+
<virtualservers>2</virtualservers>
|
29
|
+
<freeips>0</freeips>
|
30
|
+
http_version: "1.1"
|
31
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
32
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=node-virtualservers&nodeid=1&id=api_id1&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <virtualservers>
|
17
|
+
<virtualserver>
|
18
|
+
<vserverid>theid</vserverid>
|
19
|
+
<ctid-xid>thexid</ctid-xid>
|
20
|
+
<clientid>theclientid</clientid>
|
21
|
+
<ipaddress>theip</ipaddress>
|
22
|
+
<hostname>thehostname</hostname>
|
23
|
+
<template>thetemplate</template>
|
24
|
+
<hdd>thediskspace</hdd>
|
25
|
+
<memory>thememory</memory>
|
26
|
+
<swap-burst>theswap</swap-burst>
|
27
|
+
<type>thetype</type>
|
28
|
+
<mac>themac</mac>
|
29
|
+
</virtualserver>
|
30
|
+
</virtualservers>
|
31
|
+
http_version: "1.1"
|
32
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
33
|
+
- request:
|
34
|
+
method: get
|
35
|
+
uri: http://www.example.com/api?action=node-virtualservers&nodeid=1&id=api_id2&key=api_key
|
36
|
+
body:
|
37
|
+
encoding: UTF-8
|
38
|
+
string: ""
|
39
|
+
headers: {}
|
40
|
+
response:
|
41
|
+
status:
|
42
|
+
code: 200
|
43
|
+
message: OK
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: <virtualservers>
|
47
|
+
</virtualservers>
|
48
|
+
http_version: "1.1"
|
49
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
50
|
+
- request:
|
51
|
+
method: get
|
52
|
+
uri: http://www.example.com/api?action=node-virtualservers&nodeid=1&id=api_id3&key=api_key
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: ""
|
56
|
+
headers: {}
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: <status>error</status>
|
64
|
+
<statusmsg>error message</statusmsg>
|
65
|
+
http_version: "1.1"
|
66
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
67
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?action=node-xenresources&nodeid=1&id=api_id&key=api_key
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
body:
|
15
|
+
encoding: UTF-8
|
16
|
+
string: <status>success</status>
|
17
|
+
<statusmsg></statusmsg>
|
18
|
+
<freememory>thefreememory</freememory>
|
19
|
+
<freehdd>thefreehdd</freehdd>
|
20
|
+
http_version: "1.1"
|
21
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
22
|
+
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?maxvps=10&action=reseller-modifyresources&username=vps123&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 modified reseller resources</statusmsg><maxvps>10</maxvps><maxdisk>21474836480</maxdisk><maxmem>10737418240</maxmem><maxusers>20</maxusers><maxipv4>4</maxipv4><maxipv6>6</maxipv6><maxburst>10738466816</maxburst><maxbw>107374182400</maxbw><nodegroupids>14,11,9</nodegroupids><mediagroupids>14,11,9</mediagroupids><xenpv>1</xenpv><xenhvm>1</xenhvm><kvm>1</kvm><openvz>1</openvz> '
|
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=reseller-modifyresources&username=vps13&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,27 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.example.com/api?username=reseller123&password=123456&email=reseller3%40email.com&firstname=Phill&lastname=Smith&action=reseller-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>Successfully added reseller</statusmsg><username>reseller123</username><password>123456</password><email>reseller3@email.com</email><firstname>Phill</firstname><lastname>Smith</lastname><company>FastServers</company><usernameprefix>vpsuser</usernameprefix><maxvps>10</maxvps><maxdisk>21474836480</maxdisk><maxmem>10737418240</maxmem><maxusers>20</maxusers><maxipv4>4</maxipv4><maxipv6>6</maxipv6><maxburst>10738466816</maxburst><maxbw>107374182400</maxbw><nodegroupids>14,11,9</nodegroupids><mediagroupids>14,11,9</mediagroupids><xenpv>1</xenpv><xenhvm>1</xenhvm><kvm>1</kvm><openvz>1</openvz> '
|
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=reseller-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=reseller-delete&username=vps123&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>Reseller deleted</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=reseller-info&username=vps123&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 added reseller</statusmsg><username>reseller123</username><password>123456</password><email>reseller3@email.com</email><firstname>Phill</firstname><lastname>Smith</lastname><company>FastServers</company><usernameprefix>vpsuser</usernameprefix><maxvps>10</maxvps><maxdisk>21474836480</maxdisk><maxmem>10737418240</maxmem><maxusers>20</maxusers><maxipv4>4</maxipv4><maxipv6>6</maxipv6><maxburst>10738466816</maxburst><maxbw>107374182400</maxbw><nodegroupids>14,11,9</nodegroupids><mediagroupids>14,11,9</mediagroupids><xenpv>1</xenpv><xenhvm>1</xenhvm><kvm>1</kvm><openvz>1</openvz> '
|
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=reseller-info&username=vps13&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
|