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.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/LICENSE +1 -1
- data/README.markdown +159 -116
- data/Rakefile +3 -33
- data/bin/solusvm +3 -4
- data/lib/solusvm.rb +1 -3
- data/lib/solusvm/base.rb +101 -46
- data/lib/solusvm/cli.rb +8 -8
- data/lib/solusvm/cli/base_cli.rb +3 -3
- data/lib/solusvm/cli/client_cli.rb +3 -5
- data/lib/solusvm/cli/general_cli.rb +3 -5
- data/lib/solusvm/cli/node_cli.rb +3 -5
- data/lib/solusvm/cli/reseller_cli.rb +3 -5
- data/lib/solusvm/cli/server_cli.rb +4 -6
- data/lib/solusvm/client.rb +45 -27
- data/lib/solusvm/errors.rb +3 -0
- data/lib/solusvm/general.rb +11 -12
- data/lib/solusvm/hash.rb +1 -11
- data/lib/solusvm/node.rb +33 -21
- data/lib/solusvm/reseller.rb +53 -49
- data/lib/solusvm/server.rb +188 -52
- data/lib/solusvm/version.rb +2 -2
- data/test/cli/test_base_cli.rb +14 -4
- data/test/cli/test_client_cli.rb +13 -13
- data/test/cli/test_general_cli.rb +7 -7
- data/test/cli/test_node_cli.rb +13 -13
- data/test/cli/test_reseller_cli.rb +11 -11
- data/test/cli/test_server_cli.rb +61 -61
- data/test/sham_rack_stubs/base/parse-response.json +4 -0
- data/test/sham_rack_stubs/client/authenticate.json +4 -0
- data/test/sham_rack_stubs/client/change-password.json +6 -0
- data/test/sham_rack_stubs/client/create.json +9 -0
- data/test/sham_rack_stubs/client/delete.json +4 -0
- data/test/sham_rack_stubs/client/exists.json +4 -0
- data/test/sham_rack_stubs/client/list-empty.json +5 -0
- data/test/sham_rack_stubs/client/list.json +30 -0
- data/test/sham_rack_stubs/general/isos-empty.json +5 -0
- data/test/sham_rack_stubs/general/isos.json +5 -0
- data/test/sham_rack_stubs/general/plans-empty.json +5 -0
- data/test/sham_rack_stubs/general/plans.json +5 -0
- data/test/sham_rack_stubs/general/templates-empty.json +7 -0
- data/test/sham_rack_stubs/general/templates.json +7 -0
- data/test/sham_rack_stubs/generic/error.json +4 -0
- data/test/sham_rack_stubs/node/available-ips-empty.json +6 -0
- data/test/sham_rack_stubs/node/available-ips.json +6 -0
- data/test/sham_rack_stubs/node/ids.json +5 -0
- data/test/sham_rack_stubs/node/list-empty.json +5 -0
- data/test/sham_rack_stubs/node/list-groups.json +5 -0
- data/test/sham_rack_stubs/node/list.json +5 -0
- data/test/sham_rack_stubs/node/statistics.json +21 -0
- data/test/sham_rack_stubs/node/virtualservers-empty.json +5 -0
- data/test/sham_rack_stubs/node/virtualservers.json +19 -0
- data/test/sham_rack_stubs/node/xenresources.json +6 -0
- data/test/sham_rack_stubs/reseller/change-resources.json +18 -0
- data/test/sham_rack_stubs/reseller/create.json +25 -0
- data/test/sham_rack_stubs/reseller/delete.json +4 -0
- data/test/sham_rack_stubs/reseller/info.json +24 -0
- data/test/sham_rack_stubs/reseller/list-empty.json +5 -0
- data/test/sham_rack_stubs/reseller/list.json +5 -0
- data/test/sham_rack_stubs/server/add-ip.json +5 -0
- data/test/sham_rack_stubs/server/boot.json +4 -0
- data/test/sham_rack_stubs/server/change-bootorder.json +4 -0
- data/test/sham_rack_stubs/server/change-hostname.json +5 -0
- data/test/sham_rack_stubs/server/change-owner.json +4 -0
- data/test/sham_rack_stubs/server/change-plan.json +4 -0
- data/test/sham_rack_stubs/server/change-rootpassword.json +5 -0
- data/test/sham_rack_stubs/server/change-vncpass.json +5 -0
- data/test/sham_rack_stubs/server/console.json +13 -0
- data/test/sham_rack_stubs/server/create.json +13 -0
- data/test/sham_rack_stubs/server/del-ip.json +4 -0
- data/test/sham_rack_stubs/server/exists.json +4 -0
- data/test/sham_rack_stubs/server/info-all.json +16 -0
- data/test/sham_rack_stubs/server/info.json +15 -0
- data/test/sham_rack_stubs/server/mountiso.json +4 -0
- data/test/sham_rack_stubs/server/network-disable.json +4 -0
- data/test/sham_rack_stubs/server/network-enable.json +4 -0
- data/test/sham_rack_stubs/server/pae-disable.json +4 -0
- data/test/sham_rack_stubs/server/pae-enable.json +4 -0
- data/test/sham_rack_stubs/server/reboot.json +4 -0
- data/test/sham_rack_stubs/server/rebuild.json +4 -0
- data/test/sham_rack_stubs/server/resume.json +4 -0
- data/test/sham_rack_stubs/server/shutdown.json +4 -0
- data/test/sham_rack_stubs/server/status.json +4 -0
- data/test/sham_rack_stubs/server/suspend.json +4 -0
- data/test/sham_rack_stubs/server/terminate.json +4 -0
- data/test/sham_rack_stubs/server/tun-disable.json +4 -0
- data/test/sham_rack_stubs/server/tun-enable.json +4 -0
- data/test/sham_rack_stubs/server/unmountiso.json +4 -0
- data/test/sham_rack_stubs/server/vnc.json +8 -0
- data/test/solusvm/test_base.rb +34 -56
- data/test/solusvm/test_cli.rb +3 -3
- data/test/solusvm/test_client.rb +56 -66
- data/test/solusvm/test_general.rb +34 -19
- data/test/solusvm/test_hash.rb +0 -9
- data/test/solusvm/test_node.rb +66 -72
- data/test/solusvm/test_reseller.rb +47 -58
- data/test/solusvm/test_server.rb +149 -164
- data/test/test_helper.rb +43 -31
- metadata +173 -189
- data/.document +0 -5
- data/.gitignore +0 -25
- data/.travis.yml +0 -12
- data/solusvm.gemspec +0 -33
- data/test/vcr_cassettes/base/invalid_key.yml +0 -19
- data/test/vcr_cassettes/base/invalid_status.yml +0 -19
- data/test/vcr_cassettes/base/nonexistent_node.yml +0 -19
- data/test/vcr_cassettes/base/parse_response.yml +0 -28
- data/test/vcr_cassettes/base/statusmsg.yml +0 -28
- data/test/vcr_cassettes/base/successful.yml +0 -68
- data/test/vcr_cassettes/base/successful_instance_config.yml +0 -28
- data/test/vcr_cassettes/base/unauthorized_ip.yml +0 -19
- data/test/vcr_cassettes/client/authenticate.yml +0 -37
- data/test/vcr_cassettes/client/change_password.yml +0 -39
- data/test/vcr_cassettes/client/create.yml +0 -42
- data/test/vcr_cassettes/client/delete.yml +0 -37
- data/test/vcr_cassettes/client/exists.yml +0 -20
- data/test/vcr_cassettes/client/list.yml +0 -66
- data/test/vcr_cassettes/general/isos.yml +0 -38
- data/test/vcr_cassettes/general/plans.yml +0 -38
- data/test/vcr_cassettes/general/templates.yml +0 -38
- data/test/vcr_cassettes/node/available_ips.yml +0 -41
- data/test/vcr_cassettes/node/ids.yml +0 -21
- data/test/vcr_cassettes/node/list.yml +0 -38
- data/test/vcr_cassettes/node/list_groups.yml +0 -20
- data/test/vcr_cassettes/node/statistics.yml +0 -32
- data/test/vcr_cassettes/node/virtualservers.yml +0 -67
- data/test/vcr_cassettes/node/xenresources.yml +0 -22
- data/test/vcr_cassettes/reseller/change_resources.yml +0 -27
- data/test/vcr_cassettes/reseller/create.yml +0 -27
- data/test/vcr_cassettes/reseller/delete.yml +0 -15
- data/test/vcr_cassettes/reseller/info.yml +0 -27
- data/test/vcr_cassettes/reseller/list.yml +0 -27
- data/test/vcr_cassettes/server/.yml +0 -1017
- data/test/vcr_cassettes/server/add_ip.yml +0 -15
- data/test/vcr_cassettes/server/boot.yml +0 -15
- data/test/vcr_cassettes/server/change_bootorder.yml +0 -15
- data/test/vcr_cassettes/server/change_consolepass.yml +0 -16
- data/test/vcr_cassettes/server/change_hostname.yml +0 -15
- data/test/vcr_cassettes/server/change_owner.yml +0 -15
- data/test/vcr_cassettes/server/change_plan.yml +0 -15
- data/test/vcr_cassettes/server/change_rootpassword.yml +0 -15
- data/test/vcr_cassettes/server/change_vncpass.yml +0 -15
- data/test/vcr_cassettes/server/console.yml +0 -28
- data/test/vcr_cassettes/server/create.yml +0 -27
- data/test/vcr_cassettes/server/del_ip.yml +0 -15
- data/test/vcr_cassettes/server/exists.yml +0 -15
- data/test/vcr_cassettes/server/info.yml +0 -27
- data/test/vcr_cassettes/server/info_all.yml +0 -15
- data/test/vcr_cassettes/server/mountiso.yml +0 -15
- data/test/vcr_cassettes/server/network_disable.yml +0 -15
- data/test/vcr_cassettes/server/network_enable.yml +0 -15
- data/test/vcr_cassettes/server/pae_disable.yml +0 -15
- data/test/vcr_cassettes/server/pae_enable.yml +0 -15
- data/test/vcr_cassettes/server/reboot.yml +0 -15
- data/test/vcr_cassettes/server/rebuild.yml +0 -15
- data/test/vcr_cassettes/server/resume.yml +0 -15
- data/test/vcr_cassettes/server/shutdown.yml +0 -15
- data/test/vcr_cassettes/server/status.yml +0 -15
- data/test/vcr_cassettes/server/suspend.yml +0 -15
- data/test/vcr_cassettes/server/terminate.yml +0 -27
- data/test/vcr_cassettes/server/tun_disable.yml +0 -15
- data/test/vcr_cassettes/server/tun_enable.yml +0 -15
- data/test/vcr_cassettes/server/unmountiso.yml +0 -15
- data/test/vcr_cassettes/server/vnc.yml +0 -15
data/.document
DELETED
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/solusvm.gemspec
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "solusvm/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = %q{solusvm}
|
7
|
-
s.version = Solusvm::VERSION
|
8
|
-
|
9
|
-
s.authors = ["Justin Mazzi"]
|
10
|
-
s.email = ["jmazzi@gmail.com"]
|
11
|
-
s.homepage = "http://www.site5.com"
|
12
|
-
s.summary = "Wrapper for the SolusVM Admin::API"
|
13
|
-
s.description = "Solusvm allows for easy interaction with the SolusVM Admin::API."
|
14
|
-
s.license = 'MIT'
|
15
|
-
|
16
|
-
s.rubyforge_project = "solusvm"
|
17
|
-
s.files = `git ls-files`.split("\n")
|
18
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
-
s.require_paths = ["lib"]
|
21
|
-
|
22
|
-
s.add_runtime_dependency 'xml-simple', '~> 1.1.1'
|
23
|
-
s.add_runtime_dependency 'thor', '>= 0.16.0'
|
24
|
-
s.add_runtime_dependency 'faraday', '~> 0.8.0rc2'
|
25
|
-
s.add_runtime_dependency 'jruby-openssl' if RUBY_PLATFORM == 'java'
|
26
|
-
|
27
|
-
s.add_development_dependency 'redgreen', '~> 1.2.2'
|
28
|
-
s.add_development_dependency 'fakeweb', '~> 1.3.0'
|
29
|
-
s.add_development_dependency 'vcr', '~> 2.2.4'
|
30
|
-
s.add_development_dependency 'mocha', '~> 0.12.3'
|
31
|
-
s.add_development_dependency 'rdoc', '~> 3.12'
|
32
|
-
s.add_development_dependency 'rake', '~> 0.9.2.2'
|
33
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=badkey&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: Invalid id or key
|
17
|
-
http_version: "1.1"
|
18
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
19
|
-
recorded_with: VCR 2.0.0
|
@@ -1,19 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=httperror&id=api_id&key=api_key
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: ""
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 404
|
13
|
-
message: OK
|
14
|
-
body:
|
15
|
-
encoding: UTF-8
|
16
|
-
string: Not Found
|
17
|
-
http_version: "1.1"
|
18
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
19
|
-
recorded_with: VCR 2.0.0
|
@@ -1,19 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=nodeexist&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: Node not found
|
17
|
-
http_version: "1.1"
|
18
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
19
|
-
recorded_with: VCR 2.0.0
|
@@ -1,28 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=test&vserverid=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>Virtual server created</statusmsg>
|
18
|
-
<mainipaddress>123.123.123.123</mainipaddress>
|
19
|
-
<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>
|
20
|
-
<rootpassword>123456</rootpassword>
|
21
|
-
<vserverid>100</vserverid>
|
22
|
-
<consoleuser>console-123</consoleuser>
|
23
|
-
<consolepassword>123456</consolepassword>
|
24
|
-
<hostname>server.hostname.com</hostname>
|
25
|
-
<virtid>vm101|101</virtid>
|
26
|
-
http_version: "1.1"
|
27
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
28
|
-
recorded_with: VCR 2.0.0
|
@@ -1,28 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=testsuccess&vserverid=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>Virtual server created</statusmsg>
|
18
|
-
<mainipaddress>123.123.123.123</mainipaddress>
|
19
|
-
<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>
|
20
|
-
<rootpassword>123456</rootpassword>
|
21
|
-
<vserverid>100</vserverid>
|
22
|
-
<consoleuser>console-123</consoleuser>
|
23
|
-
<consolepassword>123456</consolepassword>
|
24
|
-
<hostname>server.hostname.com</hostname>
|
25
|
-
<virtid>vm101|101</virtid>
|
26
|
-
http_version: "1.1"
|
27
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
28
|
-
recorded_with: VCR 2.0.0
|
@@ -1,68 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=testsuccess&vserverid=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>Virtual server created</statusmsg>
|
18
|
-
<mainipaddress>123.123.123.123</mainipaddress>
|
19
|
-
<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>
|
20
|
-
<rootpassword>123456</rootpassword>
|
21
|
-
<vserverid>100</vserverid>
|
22
|
-
<consoleuser>console-123</consoleuser>
|
23
|
-
<consolepassword>123456</consolepassword>
|
24
|
-
<hostname>server.hostname.com</hostname>
|
25
|
-
<virtid>vm101|101</virtid>
|
26
|
-
http_version: "1.1"
|
27
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
28
|
-
- request:
|
29
|
-
method: get
|
30
|
-
uri: http://www.example.com/api?action=testfail&vserverid=1&id=api_id&key=api_key
|
31
|
-
body:
|
32
|
-
encoding: UTF-8
|
33
|
-
string: ""
|
34
|
-
headers: {}
|
35
|
-
response:
|
36
|
-
status:
|
37
|
-
code: 200
|
38
|
-
message: OK
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: <status>error</status>
|
42
|
-
<statusmsg>error message</statusmsg>
|
43
|
-
http_version: "1.1"
|
44
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
45
|
-
- request:
|
46
|
-
method: get
|
47
|
-
uri: http://www.example.com/api?action=testnostatus&vserverid=1&id=api_id&key=api_key
|
48
|
-
body:
|
49
|
-
encoding: UTF-8
|
50
|
-
string: ""
|
51
|
-
headers: {}
|
52
|
-
response:
|
53
|
-
status:
|
54
|
-
code: 200
|
55
|
-
message: OK
|
56
|
-
body:
|
57
|
-
encoding: UTF-8
|
58
|
-
string: <mainipaddress>123.123.123.123</mainipaddress>
|
59
|
-
<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>
|
60
|
-
<rootpassword>123456</rootpassword>
|
61
|
-
<vserverid>100</vserverid>
|
62
|
-
<consoleuser>console-123</consoleuser>
|
63
|
-
<consolepassword>123456</consolepassword>
|
64
|
-
<hostname>server.hostname.com</hostname>
|
65
|
-
<virtid>vm101|101</virtid>
|
66
|
-
http_version: "1.1"
|
67
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
68
|
-
recorded_with: VCR 2.0.0
|
@@ -1,28 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.test.com/api?action=testconfig&vserverid=1&id=instance_id&key=instance_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>Virtual server created</statusmsg>
|
18
|
-
<mainipaddress>123.123.123.123</mainipaddress>
|
19
|
-
<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>
|
20
|
-
<rootpassword>123456</rootpassword>
|
21
|
-
<vserverid>100</vserverid>
|
22
|
-
<consoleuser>console-123</consoleuser>
|
23
|
-
<consolepassword>123456</consolepassword>
|
24
|
-
<hostname>server.hostname.com</hostname>
|
25
|
-
<virtid>vm101|101</virtid>
|
26
|
-
http_version: "1.1"
|
27
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
28
|
-
recorded_with: VCR 2.0.0
|
@@ -1,19 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=unauthorized&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: Invalid ipaddress
|
17
|
-
http_version: "1.1"
|
18
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
19
|
-
recorded_with: VCR 2.0.0
|
@@ -1,37 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=client-authenticate&username=u&password=p&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>validated</statusmsg>
|
18
|
-
http_version: "1.1"
|
19
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
20
|
-
- request:
|
21
|
-
method: get
|
22
|
-
uri: http://www.example.com/api?action=client-authenticate&username=u&password=notp&id=api_id&key=api_key
|
23
|
-
body:
|
24
|
-
encoding: UTF-8
|
25
|
-
string: ""
|
26
|
-
headers: {}
|
27
|
-
response:
|
28
|
-
status:
|
29
|
-
code: 200
|
30
|
-
message: OK
|
31
|
-
body:
|
32
|
-
encoding: UTF-8
|
33
|
-
string: <status>error</status>
|
34
|
-
<statusmsg>invalid username or password</statusmsg>
|
35
|
-
http_version: "1.1"
|
36
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
37
|
-
recorded_with: VCR 2.0.0
|
@@ -1,39 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=client-updatepassword&username=vps123&password=123456&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>Successfully updated client password</statusmsg>
|
18
|
-
<username>vps123</username>
|
19
|
-
<password>123456</password>
|
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=client-updatepassword&username=vps13&password=thecake&id=api_id&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>error</status>
|
36
|
-
<statusmsg>error message</statusmsg>
|
37
|
-
http_version: "1.1"
|
38
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
39
|
-
recorded_with: VCR 2.0.0
|
@@ -1,42 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?username=vps123&password=123456&email=email%40address.com&firstname=phill&lastname=smith&action=client-create&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>Successfully added client</statusmsg>
|
18
|
-
<username>vps123</username>
|
19
|
-
<password>123456</password>
|
20
|
-
<email>email@address.com</email>
|
21
|
-
<firstname>phill</firstname>
|
22
|
-
<lastname>smith</lastname>
|
23
|
-
http_version: "1.1"
|
24
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
25
|
-
- request:
|
26
|
-
method: get
|
27
|
-
uri: http://www.example.com/api?action=client-create&id=api_id&key=api_key
|
28
|
-
body:
|
29
|
-
encoding: UTF-8
|
30
|
-
string: ""
|
31
|
-
headers: {}
|
32
|
-
response:
|
33
|
-
status:
|
34
|
-
code: 200
|
35
|
-
message: OK
|
36
|
-
body:
|
37
|
-
encoding: UTF-8
|
38
|
-
string: <status>error</status>
|
39
|
-
<statusmsg>Empty username field</statusmsg>
|
40
|
-
http_version: "1.1"
|
41
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
42
|
-
recorded_with: VCR 2.0.0
|
@@ -1,37 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://www.example.com/api?action=client-delete&username=vps123&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>Client deleted</statusmsg>
|
18
|
-
http_version: "1.1"
|
19
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
20
|
-
- request:
|
21
|
-
method: get
|
22
|
-
uri: http://www.example.com/api?action=client-delete&username=novps&id=api_id&key=api_key
|
23
|
-
body:
|
24
|
-
encoding: UTF-8
|
25
|
-
string: ""
|
26
|
-
headers: {}
|
27
|
-
response:
|
28
|
-
status:
|
29
|
-
code: 200
|
30
|
-
message: OK
|
31
|
-
body:
|
32
|
-
encoding: UTF-8
|
33
|
-
string: <status>error</status>
|
34
|
-
<statusmsg>error message</statusmsg>
|
35
|
-
http_version: "1.1"
|
36
|
-
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
37
|
-
recorded_with: VCR 2.0.0
|