lumberg 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/.gitignore +9 -0
  2. data/.rspec +2 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +98 -0
  6. data/LICENSE +20 -0
  7. data/README.md +178 -0
  8. data/Rakefile +49 -0
  9. data/lib/cacert.pem +3910 -0
  10. data/lib/lumberg.rb +23 -0
  11. data/lib/lumberg/exceptions.rb +6 -0
  12. data/lib/lumberg/version.rb +3 -0
  13. data/lib/lumberg/whm.rb +70 -0
  14. data/lib/lumberg/whm/account.rb +329 -0
  15. data/lib/lumberg/whm/args.rb +113 -0
  16. data/lib/lumberg/whm/base.rb +28 -0
  17. data/lib/lumberg/whm/dns.rb +205 -0
  18. data/lib/lumberg/whm/reseller.rb +268 -0
  19. data/lib/lumberg/whm/server.rb +290 -0
  20. data/lib/net_http_hacked.rb +42 -0
  21. data/lumberg.gemspec +28 -0
  22. data/spec/lumberg_spec.rb +9 -0
  23. data/spec/spec_helper.rb +33 -0
  24. data/spec/vcr_cassettes/whm/account/accountsummary.yml +43 -0
  25. data/spec/vcr_cassettes/whm/account/changepackage.yml +64 -0
  26. data/spec/vcr_cassettes/whm/account/createacct.yml +43 -0
  27. data/spec/vcr_cassettes/whm/account/domainuserdata.yml +43 -0
  28. data/spec/vcr_cassettes/whm/account/editquota.yml +85 -0
  29. data/spec/vcr_cassettes/whm/account/limitbw.yml +85 -0
  30. data/spec/vcr_cassettes/whm/account/listaccts.yml +147 -0
  31. data/spec/vcr_cassettes/whm/account/listsuspended.yml +43 -0
  32. data/spec/vcr_cassettes/whm/account/modifyacct.yml +63 -0
  33. data/spec/vcr_cassettes/whm/account/myprivs.yml +43 -0
  34. data/spec/vcr_cassettes/whm/account/passwd.yml +43 -0
  35. data/spec/vcr_cassettes/whm/account/removeacct.yml +85 -0
  36. data/spec/vcr_cassettes/whm/account/restoreaccount.yml +198 -0
  37. data/spec/vcr_cassettes/whm/account/setsiteip.yml +190 -0
  38. data/spec/vcr_cassettes/whm/account/suspend.yml +64 -0
  39. data/spec/vcr_cassettes/whm/account/unsuspend.yml +43 -0
  40. data/spec/vcr_cassettes/whm/dns/adddns.yml +64 -0
  41. data/spec/vcr_cassettes/whm/dns/addzonerecord.yml +43 -0
  42. data/spec/vcr_cassettes/whm/dns/dumpzone.yml +43 -0
  43. data/spec/vcr_cassettes/whm/dns/editzonerecord.yml +64 -0
  44. data/spec/vcr_cassettes/whm/dns/getzonerecord.yml +64 -0
  45. data/spec/vcr_cassettes/whm/dns/killdns.yml +43 -0
  46. data/spec/vcr_cassettes/whm/dns/listmxs.yml +22 -0
  47. data/spec/vcr_cassettes/whm/dns/listzones.yml +22 -0
  48. data/spec/vcr_cassettes/whm/dns/lookupnsip.yml +43 -0
  49. data/spec/vcr_cassettes/whm/dns/removezonerecord.yml +64 -0
  50. data/spec/vcr_cassettes/whm/dns/resetzone.yml +43 -0
  51. data/spec/vcr_cassettes/whm/dns/resolvedomainname.yml +43 -0
  52. data/spec/vcr_cassettes/whm/dns/savemxs.yml +22 -0
  53. data/spec/vcr_cassettes/whm/reseller/acctcounts.yml +43 -0
  54. data/spec/vcr_cassettes/whm/reseller/listacls.yml +22 -0
  55. data/spec/vcr_cassettes/whm/reseller/listresellers.yml +22 -0
  56. data/spec/vcr_cassettes/whm/reseller/resellerstats.yml +43 -0
  57. data/spec/vcr_cassettes/whm/reseller/saveacllist.yml +85 -0
  58. data/spec/vcr_cassettes/whm/reseller/setacls.yml +43 -0
  59. data/spec/vcr_cassettes/whm/reseller/setresellerips.yml +42 -0
  60. data/spec/vcr_cassettes/whm/reseller/setresellerlimits.yml +43 -0
  61. data/spec/vcr_cassettes/whm/reseller/setresellermainip.yml +64 -0
  62. data/spec/vcr_cassettes/whm/reseller/setresellernameservers.yml +64 -0
  63. data/spec/vcr_cassettes/whm/reseller/setresellerpackagelimit.yml +64 -0
  64. data/spec/vcr_cassettes/whm/reseller/setupreseller.yml +43 -0
  65. data/spec/vcr_cassettes/whm/reseller/suspendreseller.yml +64 -0
  66. data/spec/vcr_cassettes/whm/reseller/terminatereseller.yml +64 -0
  67. data/spec/vcr_cassettes/whm/reseller/unsetupreseller.yml +43 -0
  68. data/spec/vcr_cassettes/whm/reseller/unsuspendreseller.yml +43 -0
  69. data/spec/vcr_cassettes/whm/server/applist.yml +22 -0
  70. data/spec/vcr_cassettes/whm/server/gethostname.yml +22 -0
  71. data/spec/vcr_cassettes/whm/server/getlanglist.yml +22 -0
  72. data/spec/vcr_cassettes/whm/server/loadavg.yml +28 -0
  73. data/spec/vcr_cassettes/whm/server/my_function.yml +64 -0
  74. data/spec/vcr_cassettes/whm/server/response_type.yml +85 -0
  75. data/spec/vcr_cassettes/whm/server/systemloadavg.yml +43 -0
  76. data/spec/vcr_cassettes/whm/server/version.yml +22 -0
  77. data/spec/whm/account_spec.rb +577 -0
  78. data/spec/whm/args_spec.rb +179 -0
  79. data/spec/whm/base_spec.rb +28 -0
  80. data/spec/whm/dns_spec.rb +352 -0
  81. data/spec/whm/reseller_spec.rb +359 -0
  82. data/spec/whm/server_spec.rb +288 -0
  83. data/spec/whm/whm_spec.rb +41 -0
  84. metadata +265 -0
@@ -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/listsuspended
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: "{\"status\":1,\"statusmsg\":\"Ok\",\"accts\":[]}"
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/listsuspended?empty=1
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: "{\"status\":1,\"statusmsg\":\"Ok\",\"accts\":[{\"reason\":\"Unknown\",\"unixtime\":\"1298564189\",\"owner\":\"root\",\"user\":\"removeme\",\"time\":\"Thu Feb 24 10:16:29 2011\"}]}"
43
+ http_version: "1.1"
@@ -0,0 +1,63 @@
1
+ - !ruby/struct:VCR::HTTPInteraction
2
+ request: !ruby/struct:VCR::Request
3
+ method: :get
4
+ uri: https://myhost.com:2087/json-api/modifyacct?domain=example.com&user=changeme
5
+ body:
6
+ headers:
7
+ authorization:
8
+ - WHM root:iscool
9
+ response: !ruby/struct:VCR::Response
10
+ status: !ruby/struct:VCR::ResponseStatus
11
+ code: 200
12
+ message: OK
13
+ headers:
14
+ content-type:
15
+ - text/plain
16
+ server:
17
+ - cpsrvd/11.28.64
18
+ transfer-encoding:
19
+ - chunked
20
+ body: "{\"result\":[{\"newcfg\":{\"setshell\":\"unmodified\",\"domain\":\"example.com\",\"user\":\"changeme\",\"cpuser\":{\"MXCHECK-example.com\":\"0\",\"DEADDOMAINS\":[],\"DBOWNER\":\"changeme\",\"IP\":\"192.1.2.3\",\"MAXSUB\":\"unlimited\",\"DOMAIN\":\"example.com\",\"CONTACTEMAIL\":\"user@address.com\",\"MAXSQL\":\"unlimited\",\"MAXFTP\":\"unlimited\",\"LOCALE\":\"en\",\"HASCGI\":\"1\",\"CONTACTEMAIL2\":\"user2@address.com\",\"DEMO\":0,\"USER\":\"changeme\",\"FEATURELIST\":\"default\",\"BWLIMIT\":\"unlimited\",\"DOMAINS\":[],\"MTIME\":\"1298658902\",\"STARTDATE\":\"1298658868\",\"OWNER\":\"root\",\"__CACHE_DATA_VERSION\":\"0.2\",\"MAXPARK\":\"0\",\"RS\":\"x3\",\"PLAN\":\"default\",\"MAXADDON\":\"0\",\"MAXPOP\":\"unlimited\",\"MAXLST\":\"unlimited\"}},\"status\":1,\"statusmsg\":\"Account Modified\",\"warnings\":[],\"messages\":[]}]}"
21
+ http_version: "1.1"
22
+ - !ruby/struct:VCR::HTTPInteraction
23
+ request: !ruby/struct:VCR::Request
24
+ method: :get
25
+ uri: https://myhost.com:2087/json-api/modifyacct?user=notexists
26
+ body:
27
+ headers:
28
+ authorization:
29
+ - WHM root:iscool
30
+ response: !ruby/struct:VCR::Response
31
+ status: !ruby/struct:VCR::ResponseStatus
32
+ code: 200
33
+ message: OK
34
+ headers:
35
+ content-type:
36
+ - text/plain
37
+ server:
38
+ - cpsrvd/11.28.64
39
+ transfer-encoding:
40
+ - chunked
41
+ body: "{\"result\":[{\"newcfg\":null,\"status\":0,\"statusmsg\":\"Unable to fetch the cPanel user file for notexists\",\"warnings\":null,\"messages\":null}]}"
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :get
46
+ uri: https://myhost.com:2087/json-api/modifyacct?user=changeme
47
+ body:
48
+ headers:
49
+ authorization:
50
+ - WHM root:iscool
51
+ response: !ruby/struct:VCR::Response
52
+ status: !ruby/struct:VCR::ResponseStatus
53
+ code: 200
54
+ message: OK
55
+ headers:
56
+ content-type:
57
+ - text/plain
58
+ server:
59
+ - cpsrvd/11.28.64
60
+ transfer-encoding:
61
+ - chunked
62
+ body: "{\"result\":[{\"newcfg\":{\"setshell\":\"unmodified\",\"domain\":\"example.com\",\"user\":\"changeme\",\"cpuser\":{\"MXCHECK-example.com\":\"0\",\"DEADDOMAINS\":[],\"DBOWNER\":\"changeme\",\"MAXSUB\":\"unlimited\",\"IP\":\"192.1.2.3\",\"CONTACTEMAIL\":\"user@address.com\",\"DOMAIN\":\"example.com\",\"MAXSQL\":\"unlimited\",\"MAXFTP\":\"unlimited\",\"LOCALE\":\"en\",\"HASCGI\":\"1\",\"CONTACTEMAIL2\":\"user2@address.com\",\"DEMO\":0,\"USER\":\"changeme\",\"FEATURELIST\":\"default\",\"DOMAINS\":[],\"BWLIMIT\":\"unlimited\",\"MTIME\":\"1298658924\",\"STARTDATE\":\"1298658868\",\"OWNER\":\"root\",\"__CACHE_DATA_VERSION\":\"0.2\",\"MAXPARK\":\"0\",\"RS\":\"x3\",\"PLAN\":\"default\",\"MAXADDON\":\"0\",\"MAXLST\":\"unlimited\",\"MAXPOP\":\"unlimited\"}},\"status\":1,\"statusmsg\":\"Account Modified\",\"warnings\":[],\"messages\":[]}]}"
63
+ 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/accountsummary?user=privs
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: "{\"status\":1,\"statusmsg\":\"Ok\",\"acct\":[{\"startdate\":\"11 Feb 24 11:30\",\"plan\":\"default\",\"suspended\":0,\"theme\":\"x3\",\"shell\":\"/usr/local/cpanel/bin/jailshell\",\"maxpop\":\"unlimited\",\"maxlst\":\"unlimited\",\"maxaddons\":\"*unknown*\",\"suspendtime\":null,\"ip\":\"192.1.2.3\",\"maxsub\":\"unlimited\",\"domain\":\"privs.com\",\"maxsql\":\"unlimited\",\"partition\":\"home\",\"maxftp\":\"unlimited\",\"user\":\"privs\",\"suspendreason\":\"not suspended\",\"unix_startdate\":\"1298568645\",\"diskused\":\"0M\",\"maxparked\":\"*unknown*\",\"email\":\"*unknown*\",\"disklimit\":\"unlimited\",\"owner\":\"root\"}]}"
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/myprivs?username=privs
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: "{\"privs\":{\"kill-dns\":0,\"edit-dns\":0,\"edit-mx\":0,\"add-pkg\":0,\"status\":0,\"suspend-acct\":0,\"add-pkg-shell\":0,\"viewglobalpackages\":0,\"resftp\":0,\"list-accts\":0,\"all\":1,\"passwd\":0,\"quota\":0,\"park-dns\":0,\"rearrange-accts\":0,\"allow-addoncreate\":0,\"demo\":0,\"news\":0,\"edit-account\":0,\"allow-unlimited-disk-pkgs\":0,\"allow-parkedcreate\":0,\"frontpage\":0,\"restart\":0,\"ssl-gencrt\":0,\"allow-unlimited-pkgs\":0,\"add-pkg-ip\":0,\"disallow-shell\":0,\"res-cart\":0,\"ssl-buy\":0,\"kill-acct\":0,\"allow-unlimited-bw-pkgs\":0,\"create-dns\":0,\"mailcheck\":0,\"clustering\":0,\"ssl\":0,\"edit-pkg\":0,\"locale-edit\":0,\"show-bandwidth\":0,\"upgrade-account\":0,\"thirdparty\":0,\"limit-bandwidth\":0,\"create-acct\":0,\"demo-setup\":0,\"stats\":0}}"
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/passwd?pass=superpass&user=changeme
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: "{\"passwd\":[{\"status\":1,\"services\":[{\"app\":\"system\"},{\"app\":\"ftp\"},{\"app\":\"mail\"},{\"app\":\"mySQL\"}],\"statusmsg\":\"Password changed for user changeme\",\"rawout\":\"Changing password for changeme\\nPassword for changeme has been changed\\nUpdating ftp passwords for changeme\\nFtp password files updated.\\nFtp vhost passwords synced\\n\"}]}"
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/passwd?pass=superpass&user=dontchangeme
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: "{\"passwd\":[{\"status\":0,\"services\":null,\"statusmsg\":\"Sorry, the user dontchangeme does not exist.\",\"rawout\":null}]}"
43
+ http_version: "1.1"
@@ -0,0 +1,85 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/removeacct?user=removeme
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\":\"removeme account removed\",\"rawout\":\"Running pre removal script (/scripts/prekillacct)......DoneCollecting Domain Name and IP...User: removeme\\nDomain: removeme.com\\n...DoneKilling all processes owned by user......DoneCleaning passwd,shadow,group......DoneRemoving User from Group..........DoneRemoving Web Logs......DoneRemoving Bandwidth Files......DoneRemoving Crontab......DoneRemoving Virtual Hosts...Removed removeme.com Server at line: 771.\\nRemoved Entry from httpd.conf\\nRemoving user's web content directory symlinks......DoneRemoving MySQL databases and users......DoneRemoving PostgreSQL databases and users......DoneRemoving System User......DoneRemoving Group......DoneRemoving DNS Entries...\\nError: There is a problem communicating with the name server.\\nWe may be doing maintenance to this feature or the DNS server.\\nPlease try again and if this problem continues please report it to the server administrator.\\n\\n...DoneRemoving Email Setup...Removing /etc/valiases/removeme.com\\n...DoneRemoving mailman lists......DoneUpdating Databases......DoneRemoving Counter Data......DoneAdding ip back to the ip address pool...System has 237 free ips.\\n...DoneRemoving user's cPanel Databases & Updating......DoneReloading Services......DoneRemoving mail and service configs...\\n...DoneSending Contacts......DoneUpdating internal databases...Updating ftp passwords for removeme\\nPurging ftp user removeme\\nFtp password files updated.\\nFtp vhost passwords synced\\n...DoneRunning post removal scripts (/scripts/legacypostkillacct, /scripts/postkillacct)......DoneAccount Removal Complete!!!...removeme account removed...Done\"}]}"
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/removeacct?keepdns=1&user=removeme
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\":1,\"statusmsg\":\"removeme account removed\",\"rawout\":\"Running pre removal script (/scripts/prekillacct)......DoneCollecting Domain Name and IP...User: removeme\\nDomain: removeme.com\\n...DoneKilling all processes owned by user......DoneCleaning passwd,shadow,group......DoneRemoving User from Group..........DoneRemoving Web Logs......DoneRemoving Bandwidth Files......DoneRemoving Crontab......DoneRemoving Virtual Hosts...Removed removeme.com Server at line: 771.\\nRemoved Entry from httpd.conf\\nRemoving user's web content directory symlinks......DoneRemoving MySQL databases and users......DoneRemoving PostgreSQL databases and users......DoneRemoving System User......DoneRemoving Group......DoneRemoving Email Setup...Removing /etc/valiases/removeme.com\\n...DoneRemoving mailman lists......DoneUpdating Databases......DoneRemoving Counter Data......DoneAdding ip back to the ip address pool...System has 237 free ips.\\n...DoneRemoving user's cPanel Databases & Updating......DoneReloading Services......DoneRemoving mail and service configs...\\n...DoneSending Contacts......DoneUpdating internal databases...Updating ftp passwords for removeme\\nPurging ftp user removeme\\nFtp password files updated.\\nFtp vhost passwords synced\\n...DoneRunning post removal scripts (/scripts/legacypostkillacct, /scripts/postkillacct)......DoneAccount Removal Complete!!!...removeme account removed...Done\"}]}"
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/removeacct?keepdns=0&user=removeme
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\":1,\"statusmsg\":\"removeme account removed\",\"rawout\":\"Running pre removal script (/scripts/prekillacct)......DoneCollecting Domain Name and IP...User: removeme\\nDomain: removeme.com\\n...DoneKilling all processes owned by user......DoneCleaning passwd,shadow,group......DoneRemoving User from Group..........DoneRemoving Web Logs......DoneRemoving Bandwidth Files......DoneRemoving Crontab......DoneRemoving Virtual Hosts...Removed removeme.com Server at line: 771.\\nRemoved Entry from httpd.conf\\nRemoving user's web content directory symlinks......DoneRemoving MySQL databases and users......DoneRemoving PostgreSQL databases and users......DoneRemoving System User......DoneRemoving Group......DoneRemoving DNS Entries...\\nError: There is a problem communicating with the name server.\\nWe may be doing maintenance to this feature or the DNS server.\\nPlease try again and if this problem continues please report it to the server administrator.\\n\\n...DoneRemoving Email Setup...Removing /etc/valiases/removeme.com\\n...DoneRemoving mailman lists......DoneUpdating Databases......DoneRemoving Counter Data......DoneAdding ip back to the ip address pool...System has 237 free ips.\\n...DoneRemoving user's cPanel Databases & Updating......DoneReloading Services......DoneRemoving mail and service configs...\\n...DoneSending Contacts......DoneUpdating internal databases...Updating ftp passwords for removeme\\nPurging ftp user removeme\\nFtp password files updated.\\nFtp vhost passwords synced\\n...DoneRunning post removal scripts (/scripts/legacypostkillacct, /scripts/postkillacct)......DoneAccount Removal Complete!!!...removeme account removed...Done\"}]}"
64
+ http_version: "1.1"
65
+ - !ruby/struct:VCR::HTTPInteraction
66
+ request: !ruby/struct:VCR::Request
67
+ method: :get
68
+ uri: https://myhost.com:2087/json-api/removeacct?user=notreal
69
+ body:
70
+ headers:
71
+ authorization:
72
+ - WHM root:iscool
73
+ response: !ruby/struct:VCR::Response
74
+ status: !ruby/struct:VCR::ResponseStatus
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ server:
79
+ - cpsrvd/11.28.64
80
+ transfer-encoding:
81
+ - chunked
82
+ content-type:
83
+ - text/plain
84
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"System user notreal does not exist!\",\"rawout\":null}]}"
85
+ http_version: "1.1"
@@ -0,0 +1,198 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=privs
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
+ content-type:
16
+ - text/plain
17
+ server:
18
+ - cpsrvd/11.28.64
19
+ transfer-encoding:
20
+ - chunked
21
+ body: "{\"metadata\":{\"result\":0,\"reason\":\"Unable to find archive at /backup/cpbackup/daily\",\"version\":1,\"command\":\"restoreaccount\"}}"
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/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=privs
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
+ changing-password-for-privs:
41
+ - " "
42
+ password-for-privs-has-been-changed:
43
+ - " "
44
+ content-type:
45
+ - text/plain
46
+ body: "{\"metadata\":{\"result\":1,\"reason\":\"OK\",\"version\":1,\"command\":\"restoreaccount\",\"output\":{\"raw\":\"Extracting tarball...................\\nDone<br />\\nExtracting Domain....Done<br />\\nDone<br />\\n<br /><br />Restoring cpanel user config fileDone<br />\\n<br />Restoring reseller privs (if any)<br />Restoring Locale Setting<br />Restoring SSL keys and CertificatesDone<br />\\n<br />Restoring frontpage (if installed)Done<br />\\n<br />Restoring access logs....\\nDone<br />\\n<br /><br />Restoring domain keys....\\nDone<br />\\n<br /><br />Restoring DB MAP File....\\nDone<br />\\n<br /><br /><span class=\\\"b2\\\">Restoring PostgreSQL databases....</span>\\nPostgreSQL is not installed. Skipping.<br/>\\nRestoring Mailman listsDone<br />\\n<br />Restoring Mailman ArchivesDone<br />\\n<br />Restoring shell<blockquote><pre>Current shell /usr/local/cpanel/bin/jailshell is up to date.\\n</pre></blockquote>Done<br />\\n<br />Restoring password<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring proftpd fileDone<br />\\n<br />Resyncing FTP Passwords<blockquote><pre>Updating ftp passwords for privsFtp password files updated.Ftp vhost passwords synced</pre></blockquote>Done<br />\\n<br />Linking old home directories<br />Parsing Domain Databases...ParkedDomains......AddonDomains...<br />Restoring Domains<br />\\n<br />Restoring Bandwidth DataDone\\n<br />Restoring Counter Data<pre></pre><br />Restoring Homedir....<blockquote><pre></pre></blockquote>Done<br />\\n<br />Doing fileprotect conversion<br />Restoring nobody owned filesDone<br />\\n<br />Restoring userdata....\\nDone<br />\\n<br /><br />Restoring custom virtualhost templates....\\nConverting email to cPanel 5+ (if needed)<blockquote><pre></pre></blockquote>Done<br />\\n<br />Cleaning up filters (if needed)<blockquote><pre>vfilter converter v3.0Updating vfilter files to latest format.Running for privs only (force=0) (has_spam_acl=1)Processing privs......Done</pre></blockquote>Done<br />\\n<br />Fixing mail permissions<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring crontabDone<br />\\nConverting to maildir if needed<blockquote><pre></pre></blockquote>Done<br />\\nRestoring Dns Zones<blockquote><pre>Restoring zone: privs.com.db\\nUnable to determine IP address for privs.com!Could not get zone ip for privs.com.. skipping changes.\\n</pre></blockquote><br />Adding missing subdomain DNS entries (if needed)<pre></pre><br />Updating SPF Records<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring quota<blockquote><pre></pre></blockquote>Done<br />\\n<br /><br />Update mail routing<blockquote><pre>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for privs.com's mail.: This configuration has been manually selected.\\n</pre></blockquote>Done<br />\\n<br />Rebuilding Apache Conf<br />Restore CompleteAccount Restore Complete\\nUnlocking password for user privs.passwd: Success.<br />\"}}}"
47
+ http_version: "1.1"
48
+ - !ruby/struct:VCR::HTTPInteraction
49
+ request: !ruby/struct:VCR::Request
50
+ method: :get
51
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=changeme
52
+ body:
53
+ headers:
54
+ authorization:
55
+ - WHM root:iscool
56
+ response: !ruby/struct:VCR::Response
57
+ status: !ruby/struct:VCR::ResponseStatus
58
+ code: 200
59
+ message: OK
60
+ headers:
61
+ server:
62
+ - cpsrvd/11.28.64
63
+ transfer-encoding:
64
+ - chunked
65
+ changing-password-for-changeme:
66
+ - " "
67
+ password-for-changeme-has-been-changed:
68
+ - " "
69
+ content-type:
70
+ - text/plain
71
+ body: "{\"metadata\":{\"result\":1,\"reason\":\"OK\",\"version\":1,\"command\":\"restoreaccount\",\"output\":{\"raw\":\"Extracting tarball...................\\nDone<br />\\nExtracting Domain....Done<br />\\nDone<br />\\n<br /><br />Restoring cpanel user config fileDone<br />\\n<br />Restoring reseller privs (if any)<br />Restoring Locale Setting<br />Restoring SSL keys and CertificatesDone<br />\\n<br />Restoring frontpage (if installed)Done<br />\\n<br />Restoring access logs....\\nDone<br />\\n<br /><br />Restoring domain keys....\\nDone<br />\\n<br /><br />Restoring DB MAP File....\\nDone<br />\\n<br /><br /><span class=\\\"b2\\\">Restoring PostgreSQL databases....</span>\\nPostgreSQL is not installed. Skipping.<br/>\\nRestoring Mailman listsDone<br />\\n<br />Restoring Mailman ArchivesDone<br />\\n<br />Restoring shell<blockquote><pre>Current shell /usr/local/cpanel/bin/noshell is up to date.\\n</pre></blockquote>Done<br />\\n<br />Restoring password<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring proftpd fileDone<br />\\n<br />Resyncing FTP Passwords<blockquote><pre>Updating ftp passwords for changemeFtp password files updated.Ftp vhost passwords synced</pre></blockquote>Done<br />\\n<br />Linking old home directories<br />Parsing Domain Databases...ParkedDomains......AddonDomains...<br />Restoring Domains<br />\\n<br />Restoring Bandwidth DataDone\\n<br />Restoring Counter Data<pre></pre><br />Restoring Homedir....<blockquote><pre></pre></blockquote>Done<br />\\n<br />Doing fileprotect conversion<br />Restoring nobody owned filesDone<br />\\n<br />Restoring userdata....\\nDone<br />\\n<br /><br />Restoring custom virtualhost templates....\\nConverting email to cPanel 5+ (if needed)<blockquote><pre></pre></blockquote>Done<br />\\n<br />Cleaning up filters (if needed)<blockquote><pre>vfilter converter v3.0Updating vfilter files to latest format.Running for changeme only (force=0) (has_spam_acl=1)Processing changeme......Done</pre></blockquote>Done<br />\\n<br />Fixing mail permissions<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring crontabDone<br />\\nConverting to maildir if needed<blockquote><pre></pre></blockquote>Done<br />\\nRestoring Dns Zones<blockquote><pre>Restoring zone: example.com.db\\nUnable to determine IP address for example.com!Could not get zone ip for example.com.. skipping changes.\\n</pre></blockquote><br />Adding missing subdomain DNS entries (if needed)<pre></pre><br />Updating SPF Records<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring quota<blockquote><pre></pre></blockquote>Done<br />\\n<br /><br />Update mail routing<blockquote><pre>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for example.com's mail.: This configuration has been manually selected.\\n</pre></blockquote>Done<br />\\n<br />Rebuilding Apache Conf<br />Restore CompleteAccount Restore Complete\\nUnlocking password for user changeme.passwd: Success.<br />\"}}}"
72
+ http_version: "1.1"
73
+ - !ruby/struct:VCR::HTTPInteraction
74
+ request: !ruby/struct:VCR::Request
75
+ method: :get
76
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=privsfdsa
77
+ body:
78
+ headers:
79
+ authorization:
80
+ - WHM root:iscool
81
+ response: !ruby/struct:VCR::Response
82
+ status: !ruby/struct:VCR::ResponseStatus
83
+ code: 200
84
+ message: OK
85
+ headers:
86
+ server:
87
+ - cpsrvd/11.28.64
88
+ transfer-encoding:
89
+ - chunked
90
+ content-type:
91
+ - text/plain
92
+ body: "{\"metadata\":{\"result\":0,\"reason\":\"Unable to find archive at /backup/cpbackup/daily\",\"version\":1,\"command\":\"restoreaccount\"}}"
93
+ http_version: "1.1"
94
+ - !ruby/struct:VCR::HTTPInteraction
95
+ request: !ruby/struct:VCR::Request
96
+ method: :get
97
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=notexists
98
+ body:
99
+ headers:
100
+ authorization:
101
+ - WHM root:iscool
102
+ response: !ruby/struct:VCR::Response
103
+ status: !ruby/struct:VCR::ResponseStatus
104
+ code: 200
105
+ message: OK
106
+ headers:
107
+ server:
108
+ - cpsrvd/11.28.64
109
+ transfer-encoding:
110
+ - chunked
111
+ content-type:
112
+ - text/plain
113
+ body: "{\"metadata\":{\"result\":0,\"reason\":\"Unable to find archive at /backup/cpbackup/daily\",\"version\":1,\"command\":\"restoreaccount\"}}"
114
+ http_version: "1.1"
115
+ - !ruby/struct:VCR::HTTPInteraction
116
+ request: !ruby/struct:VCR::Request
117
+ method: :get
118
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=notexists
119
+ body:
120
+ headers:
121
+ authorization:
122
+ - WHM root:iscool
123
+ response: !ruby/struct:VCR::Response
124
+ status: !ruby/struct:VCR::ResponseStatus
125
+ code: 200
126
+ message: OK
127
+ headers:
128
+ server:
129
+ - cpsrvd/11.28.64
130
+ transfer-encoding:
131
+ - chunked
132
+ content-type:
133
+ - text/plain
134
+ body: "{\"metadata\":{\"result\":0,\"reason\":\"Unable to find archive at /backup/cpbackup/daily\",\"version\":1,\"command\":\"restoreaccount\"}}"
135
+ http_version: "1.1"
136
+ - !ruby/struct:VCR::HTTPInteraction
137
+ request: !ruby/struct:VCR::Request
138
+ method: :get
139
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=changeme
140
+ body:
141
+ headers:
142
+ authorization:
143
+ - WHM root:iscool
144
+ response: !ruby/struct:VCR::Response
145
+ status: !ruby/struct:VCR::ResponseStatus
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ server:
150
+ - cpsrvd/11.28.64
151
+ transfer-encoding:
152
+ - chunked
153
+ content-type:
154
+ - text/plain
155
+ body: "{\"metadata\":{\"result\":1,\"reason\":\"OK\",\"version\":1,\"command\":\"restoreaccount\",\"output\":{\"raw\":\"Extracting tarball...................\\nDone<br />\\nExtracting Domain....Done<br />\\nDone<br />\\n<br /><br />Restoring cpanel user config fileDone<br />\\n<br />Restoring reseller privs (if any)<br />Restoring Locale Setting<br />Restoring SSL keys and CertificatesDone<br />\\n<br />Restoring frontpage (if installed)Done<br />\\n<br />Restoring access logs....\\nDone<br />\\n<br /><br />Restoring domain keys....\\nDone<br />\\n<br /><br />Restoring DB MAP File....\\nDone<br />\\n<br /><br /><span class=\\\"b2\\\">Restoring PostgreSQL databases....</span>\\nPostgreSQL is not installed. Skipping.<br/>\\nRestoring Mailman listsDone<br />\\n<br />Restoring Mailman ArchivesDone<br />\\n<br />Restoring shell<blockquote><pre>Current shell /usr/local/cpanel/bin/noshell is up to date.\\n</pre></blockquote>Done<br />\\n<br />Restoring password<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring proftpd fileDone<br />\\n<br />Resyncing FTP Passwords<blockquote><pre>Updating ftp passwords for changemeFtp password files updated.Ftp vhost passwords synced</pre></blockquote>Done<br />\\n<br />Linking old home directories<br />Parsing Domain Databases...ParkedDomains......AddonDomains...<br />Restoring Domains<br />\\n<br />Restoring Bandwidth DataDone\\n<br />Restoring Counter Data<pre></pre><br />Restoring Homedir....<blockquote><pre></pre></blockquote>Done<br />\\n<br />Doing fileprotect conversion<br />Restoring nobody owned filesDone<br />\\n<br />Restoring userdata....\\nDone<br />\\n<br /><br />Restoring custom virtualhost templates....\\nConverting email to cPanel 5+ (if needed)<blockquote><pre></pre></blockquote>Done<br />\\n<br />Cleaning up filters (if needed)<blockquote><pre>vfilter converter v3.0Updating vfilter files to latest format.Running for changeme only (force=0) (has_spam_acl=1)Processing changeme......Done</pre></blockquote>Done<br />\\n<br />Fixing mail permissions<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring crontabDone<br />\\nConverting to maildir if needed<blockquote><pre></pre></blockquote>Done<br />\\nRestoring Dns Zones<blockquote><pre>Restoring zone: example.com.db\\nUnable to determine IP address for example.com!Could not get zone ip for example.com.. skipping changes.\\n</pre></blockquote><br />Adding missing subdomain DNS entries (if needed)<pre></pre><br />Updating SPF Records<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring quota<blockquote><pre></pre></blockquote>Done<br />\\n<br /><br />Update mail routing<blockquote><pre>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for example.com's mail.: This configuration has been manually selected.\\n</pre></blockquote>Done<br />\\n<br />Rebuilding Apache Conf<br />Restore CompleteAccount Restore Complete\\nUnlocking password for user changeme.passwd: Success.<br />\"}}}"
156
+ http_version: "1.1"
157
+ - !ruby/struct:VCR::HTTPInteraction
158
+ request: !ruby/struct:VCR::Request
159
+ method: :get
160
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=notexists
161
+ body:
162
+ headers:
163
+ authorization:
164
+ - WHM root:iscool
165
+ response: !ruby/struct:VCR::Response
166
+ status: !ruby/struct:VCR::ResponseStatus
167
+ code: 200
168
+ message: OK
169
+ headers:
170
+ server:
171
+ - cpsrvd/11.28.64
172
+ transfer-encoding:
173
+ - chunked
174
+ content-type:
175
+ - text/plain
176
+ body: "{\"metadata\":{\"result\":0,\"reason\":\"Unable to find archive at /backup/cpbackup/daily\",\"version\":1,\"command\":\"restoreaccount\"}}"
177
+ http_version: "1.1"
178
+ - !ruby/struct:VCR::HTTPInteraction
179
+ request: !ruby/struct:VCR::Request
180
+ method: :get
181
+ uri: https://myhost.com:2087/json-api/restoreaccount?all=0&api.version=1&ip=0&mail=0&mysql=0&subs=0&type=daily&user=changeme
182
+ body:
183
+ headers:
184
+ authorization:
185
+ - WHM root:iscool
186
+ response: !ruby/struct:VCR::Response
187
+ status: !ruby/struct:VCR::ResponseStatus
188
+ code: 200
189
+ message: OK
190
+ headers:
191
+ server:
192
+ - cpsrvd/11.28.64
193
+ transfer-encoding:
194
+ - chunked
195
+ content-type:
196
+ - text/plain
197
+ body: "{\"metadata\":{\"result\":1,\"reason\":\"OK\",\"version\":1,\"command\":\"restoreaccount\",\"output\":{\"raw\":\"Extracting tarball...................\\nDone<br />\\nExtracting Domain....Done<br />\\nDone<br />\\n<br /><br />Restoring cpanel user config fileDone<br />\\n<br />Restoring reseller privs (if any)<br />Restoring Locale Setting<br />Restoring SSL keys and CertificatesDone<br />\\n<br />Restoring frontpage (if installed)Done<br />\\n<br />Restoring access logs....\\nDone<br />\\n<br /><br />Restoring domain keys....\\nDone<br />\\n<br /><br />Restoring DB MAP File....\\nDone<br />\\n<br /><br /><span class=\\\"b2\\\">Restoring PostgreSQL databases....</span>\\nPostgreSQL is not installed. Skipping.<br/>\\nRestoring Mailman listsDone<br />\\n<br />Restoring Mailman ArchivesDone<br />\\n<br />Restoring shell<blockquote><pre>Current shell /usr/local/cpanel/bin/noshell is up to date.\\n</pre></blockquote>Done<br />\\n<br />Restoring password<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring proftpd fileDone<br />\\n<br />Resyncing FTP Passwords<blockquote><pre>Updating ftp passwords for changemeFtp password files updated.Ftp vhost passwords synced</pre></blockquote>Done<br />\\n<br />Linking old home directories<br />Parsing Domain Databases...ParkedDomains......AddonDomains...<br />Restoring Domains<br />\\n<br />Restoring Bandwidth DataDone\\n<br />Restoring Counter Data<pre></pre><br />Restoring Homedir....<blockquote><pre></pre></blockquote>Done<br />\\n<br />Doing fileprotect conversion<br />Restoring nobody owned filesDone<br />\\n<br />Restoring userdata....\\nDone<br />\\n<br /><br />Restoring custom virtualhost templates....\\nConverting email to cPanel 5+ (if needed)<blockquote><pre></pre></blockquote>Done<br />\\n<br />Cleaning up filters (if needed)<blockquote><pre>vfilter converter v3.0Updating vfilter files to latest format.Running for changeme only (force=0) (has_spam_acl=1)Processing changeme......Done</pre></blockquote>Done<br />\\n<br />Fixing mail permissions<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring crontabDone<br />\\nConverting to maildir if needed<blockquote><pre></pre></blockquote>Done<br />\\nRestoring Dns Zones<blockquote><pre>Restoring zone: example.com.db\\nUnable to determine IP address for example.com!Could not get zone ip for example.com.. skipping changes.\\n</pre></blockquote><br />Adding missing subdomain DNS entries (if needed)<pre></pre><br />Updating SPF Records<blockquote><pre></pre></blockquote>Done<br />\\n<br />Restoring quota<blockquote><pre></pre></blockquote>Done<br />\\n<br /><br />Update mail routing<blockquote><pre>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for example.com's mail.: This configuration has been manually selected.\\n</pre></blockquote>Done<br />\\n<br />Rebuilding Apache Conf<br />Restore CompleteAccount Restore Complete\\nUnlocking password for user changeme.passwd: Success.<br />\"}}}"
198
+ http_version: "1.1"