lumberg 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +98 -0
- data/LICENSE +20 -0
- data/README.md +178 -0
- data/Rakefile +49 -0
- data/lib/cacert.pem +3910 -0
- data/lib/lumberg.rb +23 -0
- data/lib/lumberg/exceptions.rb +6 -0
- data/lib/lumberg/version.rb +3 -0
- data/lib/lumberg/whm.rb +70 -0
- data/lib/lumberg/whm/account.rb +329 -0
- data/lib/lumberg/whm/args.rb +113 -0
- data/lib/lumberg/whm/base.rb +28 -0
- data/lib/lumberg/whm/dns.rb +205 -0
- data/lib/lumberg/whm/reseller.rb +268 -0
- data/lib/lumberg/whm/server.rb +290 -0
- data/lib/net_http_hacked.rb +42 -0
- data/lumberg.gemspec +28 -0
- data/spec/lumberg_spec.rb +9 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/vcr_cassettes/whm/account/accountsummary.yml +43 -0
- data/spec/vcr_cassettes/whm/account/changepackage.yml +64 -0
- data/spec/vcr_cassettes/whm/account/createacct.yml +43 -0
- data/spec/vcr_cassettes/whm/account/domainuserdata.yml +43 -0
- data/spec/vcr_cassettes/whm/account/editquota.yml +85 -0
- data/spec/vcr_cassettes/whm/account/limitbw.yml +85 -0
- data/spec/vcr_cassettes/whm/account/listaccts.yml +147 -0
- data/spec/vcr_cassettes/whm/account/listsuspended.yml +43 -0
- data/spec/vcr_cassettes/whm/account/modifyacct.yml +63 -0
- data/spec/vcr_cassettes/whm/account/myprivs.yml +43 -0
- data/spec/vcr_cassettes/whm/account/passwd.yml +43 -0
- data/spec/vcr_cassettes/whm/account/removeacct.yml +85 -0
- data/spec/vcr_cassettes/whm/account/restoreaccount.yml +198 -0
- data/spec/vcr_cassettes/whm/account/setsiteip.yml +190 -0
- data/spec/vcr_cassettes/whm/account/suspend.yml +64 -0
- data/spec/vcr_cassettes/whm/account/unsuspend.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/adddns.yml +64 -0
- data/spec/vcr_cassettes/whm/dns/addzonerecord.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/dumpzone.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/editzonerecord.yml +64 -0
- data/spec/vcr_cassettes/whm/dns/getzonerecord.yml +64 -0
- data/spec/vcr_cassettes/whm/dns/killdns.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/listmxs.yml +22 -0
- data/spec/vcr_cassettes/whm/dns/listzones.yml +22 -0
- data/spec/vcr_cassettes/whm/dns/lookupnsip.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/removezonerecord.yml +64 -0
- data/spec/vcr_cassettes/whm/dns/resetzone.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/resolvedomainname.yml +43 -0
- data/spec/vcr_cassettes/whm/dns/savemxs.yml +22 -0
- data/spec/vcr_cassettes/whm/reseller/acctcounts.yml +43 -0
- data/spec/vcr_cassettes/whm/reseller/listacls.yml +22 -0
- data/spec/vcr_cassettes/whm/reseller/listresellers.yml +22 -0
- data/spec/vcr_cassettes/whm/reseller/resellerstats.yml +43 -0
- data/spec/vcr_cassettes/whm/reseller/saveacllist.yml +85 -0
- data/spec/vcr_cassettes/whm/reseller/setacls.yml +43 -0
- data/spec/vcr_cassettes/whm/reseller/setresellerips.yml +42 -0
- data/spec/vcr_cassettes/whm/reseller/setresellerlimits.yml +43 -0
- data/spec/vcr_cassettes/whm/reseller/setresellermainip.yml +64 -0
- data/spec/vcr_cassettes/whm/reseller/setresellernameservers.yml +64 -0
- data/spec/vcr_cassettes/whm/reseller/setresellerpackagelimit.yml +64 -0
- data/spec/vcr_cassettes/whm/reseller/setupreseller.yml +43 -0
- data/spec/vcr_cassettes/whm/reseller/suspendreseller.yml +64 -0
- data/spec/vcr_cassettes/whm/reseller/terminatereseller.yml +64 -0
- data/spec/vcr_cassettes/whm/reseller/unsetupreseller.yml +43 -0
- data/spec/vcr_cassettes/whm/reseller/unsuspendreseller.yml +43 -0
- data/spec/vcr_cassettes/whm/server/applist.yml +22 -0
- data/spec/vcr_cassettes/whm/server/gethostname.yml +22 -0
- data/spec/vcr_cassettes/whm/server/getlanglist.yml +22 -0
- data/spec/vcr_cassettes/whm/server/loadavg.yml +28 -0
- data/spec/vcr_cassettes/whm/server/my_function.yml +64 -0
- data/spec/vcr_cassettes/whm/server/response_type.yml +85 -0
- data/spec/vcr_cassettes/whm/server/systemloadavg.yml +43 -0
- data/spec/vcr_cassettes/whm/server/version.yml +22 -0
- data/spec/whm/account_spec.rb +577 -0
- data/spec/whm/args_spec.rb +179 -0
- data/spec/whm/base_spec.rb +28 -0
- data/spec/whm/dns_spec.rb +352 -0
- data/spec/whm/reseller_spec.rb +359 -0
- data/spec/whm/server_spec.rb +288 -0
- data/spec/whm/whm_spec.rb +41 -0
- metadata +265 -0
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/editzonerecord?Line=1&domain=example.com&ttl=86400
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Bind reloading on myhost using rndc zone: [example.com]\"}]}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/editzonerecord?Line=1&domain=notexists.com&ttl=86400
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Failed to serialize record: unknown error\"}]}"
|
43
|
+
http_version: "1.1"
|
44
|
+
- !ruby/struct:VCR::HTTPInteraction
|
45
|
+
request: !ruby/struct:VCR::Request
|
46
|
+
method: :get
|
47
|
+
uri: https://myhost.com:2087/json-api/editzonerecord?Line=200&domain=example.com&ttl=86400
|
48
|
+
body:
|
49
|
+
headers:
|
50
|
+
authorization:
|
51
|
+
- WHM root:iscool
|
52
|
+
response: !ruby/struct:VCR::Response
|
53
|
+
status: !ruby/struct:VCR::ResponseStatus
|
54
|
+
code: 200
|
55
|
+
message: OK
|
56
|
+
headers:
|
57
|
+
server:
|
58
|
+
- cpsrvd/11.28.64
|
59
|
+
transfer-encoding:
|
60
|
+
- chunked
|
61
|
+
content-type:
|
62
|
+
- text/plain
|
63
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Failed to serialize record: unknown error\"}]}"
|
64
|
+
http_version: "1.1"
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/getzonerecord?Line=1&domain=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"result\":[{\"status\":1,\"record\":{\"Line\":1,\"raw\":\"; cPanel 11.25.0-STABLE_44718\",\"ttl\":\"86400\",\"type\":\":RAW\",\"name\":\"\"},\"statusmsg\":\"Record obtained.\"}]}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/getzonerecord?Line=1&domain=notexists.com
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Zone does not exist.\"}]}"
|
43
|
+
http_version: "1.1"
|
44
|
+
- !ruby/struct:VCR::HTTPInteraction
|
45
|
+
request: !ruby/struct:VCR::Request
|
46
|
+
method: :get
|
47
|
+
uri: https://myhost.com:2087/json-api/getzonerecord?Line=20&domain=example.com
|
48
|
+
body:
|
49
|
+
headers:
|
50
|
+
authorization:
|
51
|
+
- WHM root:iscool
|
52
|
+
response: !ruby/struct:VCR::Response
|
53
|
+
status: !ruby/struct:VCR::ResponseStatus
|
54
|
+
code: 200
|
55
|
+
message: OK
|
56
|
+
headers:
|
57
|
+
server:
|
58
|
+
- cpsrvd/11.28.64
|
59
|
+
transfer-encoding:
|
60
|
+
- chunked
|
61
|
+
content-type:
|
62
|
+
- text/plain
|
63
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"No record available on selected line.\"}]}"
|
64
|
+
http_version: "1.1"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/killdns?domain=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Zones Removed\",\"rawout\":\"example2.com => deleted from myhost. \"}]}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/killdns?domain=notexists.com
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Unable to remove zone that does not exist.\"}]}"
|
43
|
+
http_version: "1.1"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/listmxs?api.version=1&domain=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"data\":{\"record\":[{\"Line\":\"20\",\"ttl\":\"14400\",\"class\":\"IN\",\"exchange\":\"example.com\",\"preference\":\"0\",\"type\":\"MX\",\"name\":\"example.com.\"}]},\"metadata\":{\"result\":1,\"reason\":\"Records obtained.\",\"version\":1,\"command\":\"listmxs\"}}"
|
22
|
+
http_version: "1.1"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/listzones
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"zone\":[{\"zonefile\":\"thisisathrowawayagain22.com.db\",\"domain\":\"thisisathrowawayagain22.com\"},{\"zonefile\":\"thisisathrowawayagain23.com.db\",\"domain\":\"thisisathrowawayagain23.com\"}]}"
|
22
|
+
http_version: "1.1"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/lookupnsip?nameserver=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"ip\":\"192.1.2.3\"}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/lookupnsip?nameserver=notexists.com
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"ip\":null}"
|
43
|
+
http_version: "1.1"
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/removezonerecord?Line=1&zone=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Bind reloading on myhost using rndc zone: [example.com]\"}]}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/removezonerecord?Line=200&zone=example.com
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Unable to find a record on specified line: 200\"}]}"
|
43
|
+
http_version: "1.1"
|
44
|
+
- !ruby/struct:VCR::HTTPInteraction
|
45
|
+
request: !ruby/struct:VCR::Request
|
46
|
+
method: :get
|
47
|
+
uri: https://myhost.com:2087/json-api/removezonerecord?Line=1&zone=notexists.com
|
48
|
+
body:
|
49
|
+
headers:
|
50
|
+
authorization:
|
51
|
+
- WHM root:iscool
|
52
|
+
response: !ruby/struct:VCR::Response
|
53
|
+
status: !ruby/struct:VCR::ResponseStatus
|
54
|
+
code: 200
|
55
|
+
message: OK
|
56
|
+
headers:
|
57
|
+
server:
|
58
|
+
- cpsrvd/11.28.64
|
59
|
+
transfer-encoding:
|
60
|
+
- chunked
|
61
|
+
content-type:
|
62
|
+
- text/plain
|
63
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Unable to find a record on specified line: 1\"}]}"
|
64
|
+
http_version: "1.1"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/resetzone?domain=example.com&zone=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Bind reloading on myhost using rndc zone: [example.com]\"}]}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/resetzone?domain=notexists.com&zone=notexists.com
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Unable to determine the IP address for notexists.com\"}]}"
|
43
|
+
http_version: "1.1"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/resolvedomainname?api.version=1&domain=example.com
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"data\":{\"ip\":\"192.1.2.3\"},\"metadata\":{\"result\":1,\"reason\":\"OK\",\"version\":1,\"command\":\"resolvedomainname\"}}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/resolvedomainname?api.version=1&domain=notexists.com
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"metadata\":{\"result\":0,\"reason\":\"Unable to resolve domain name.\",\"version\":1,\"command\":\"resolvedomainname\"}}"
|
43
|
+
http_version: "1.1"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/savemxs?api.version=1&domain=example.com&exchange=example.com&name=mail.example.com&preference=10
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"metadata\":{\"result\":1,\"reason\":\"Bind reloading on myhost using rndc zone: [example.com]\",\"version\":1,\"command\":\"savemxs\"}}"
|
22
|
+
http_version: "1.1"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://myhost.com:2087/json-api/acctcounts?user=bob
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
authorization:
|
9
|
+
- WHM root:iscool
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
server:
|
16
|
+
- cpsrvd/11.28.64
|
17
|
+
transfer-encoding:
|
18
|
+
- chunked
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
body: "{\"reseller\":{\"suspended\":0,\"account\":\"bob\",\"active\":\"0\",\"limit\":\"\"},\"result\":[{\"status\":1,\"statusmsg\":\"Obtained reseller account counts.\"}]}"
|
22
|
+
http_version: "1.1"
|
23
|
+
- !ruby/struct:VCR::HTTPInteraction
|
24
|
+
request: !ruby/struct:VCR::Request
|
25
|
+
method: :get
|
26
|
+
uri: https://myhost.com:2087/json-api/acctcounts?user=notexists
|
27
|
+
body:
|
28
|
+
headers:
|
29
|
+
authorization:
|
30
|
+
- WHM root:iscool
|
31
|
+
response: !ruby/struct:VCR::Response
|
32
|
+
status: !ruby/struct:VCR::ResponseStatus
|
33
|
+
code: 200
|
34
|
+
message: OK
|
35
|
+
headers:
|
36
|
+
server:
|
37
|
+
- cpsrvd/11.28.64
|
38
|
+
transfer-encoding:
|
39
|
+
- chunked
|
40
|
+
content-type:
|
41
|
+
- text/plain
|
42
|
+
body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Specified user is not a reseller.\"}]}"
|
43
|
+
http_version: "1.1"
|