wf_node_api 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/Gemfile +28 -0
  4. data/Gemfile.lock +66 -0
  5. data/LICENSE +340 -0
  6. data/Makefile +19 -0
  7. data/README.md +78 -0
  8. data/Rakefile +2 -0
  9. data/Vagrantfile +102 -0
  10. data/_docs/api/Api/NodeApi.html +123 -0
  11. data/_docs/api/Api.html +149 -0
  12. data/_docs/api/Config/Check.html +331 -0
  13. data/_docs/api/Config.html +115 -0
  14. data/_docs/api/ConfigCheck.html +365 -0
  15. data/_docs/api/ContainerManager.html +1632 -0
  16. data/_docs/api/ContainerManagerAdapter/Lxc.html +1352 -0
  17. data/_docs/api/ContainerManagerAdapter/Vserver.html +1358 -0
  18. data/_docs/api/ContainerManagerAdapter.html +151 -0
  19. data/_docs/api/Error/NotFound.html +134 -0
  20. data/_docs/api/Error.html +115 -0
  21. data/_docs/api/NotFoundError.html +157 -0
  22. data/_docs/api/OS.html +234 -0
  23. data/_docs/api/ResourceManager.html +322 -0
  24. data/_docs/api/ResourceManagerAdapter/Linux.html +326 -0
  25. data/_docs/api/ResourceManagerAdapter.html +149 -0
  26. data/_docs/api/WfNodeApi.html +163 -0
  27. data/_docs/api/_index.html +239 -0
  28. data/_docs/api/class_list.html +58 -0
  29. data/_docs/api/css/common.css +1 -0
  30. data/_docs/api/css/full_list.css +57 -0
  31. data/_docs/api/css/style.css +339 -0
  32. data/_docs/api/file.README.html +146 -0
  33. data/_docs/api/file_list.html +60 -0
  34. data/_docs/api/frames.html +26 -0
  35. data/_docs/api/index.html +146 -0
  36. data/_docs/api/js/app.js +219 -0
  37. data/_docs/api/js/full_list.js +181 -0
  38. data/_docs/api/js/jquery.js +4 -0
  39. data/_docs/api/method_list.html +273 -0
  40. data/_docs/api/top-level-namespace.html +244 -0
  41. data/_docs/rest/api_data.js +1 -0
  42. data/_docs/rest/api_data.json +1 -0
  43. data/_docs/rest/api_project.js +1 -0
  44. data/_docs/rest/api_project.json +1 -0
  45. data/_docs/rest/css/style.css +538 -0
  46. data/_docs/rest/header.md +3 -0
  47. data/_docs/rest/img/favicon.ico +0 -0
  48. data/_docs/rest/img/glyphicons-halflings-white.png +0 -0
  49. data/_docs/rest/img/glyphicons-halflings.png +0 -0
  50. data/_docs/rest/index.html +658 -0
  51. data/_docs/rest/locales/de.js +25 -0
  52. data/_docs/rest/locales/fr.js +25 -0
  53. data/_docs/rest/locales/locale.js +43 -0
  54. data/_docs/rest/locales/nl.js +25 -0
  55. data/_docs/rest/locales/pl.js +25 -0
  56. data/_docs/rest/locales/pt_br.js +25 -0
  57. data/_docs/rest/locales/ru.js +25 -0
  58. data/_docs/rest/locales/zh.js +25 -0
  59. data/_docs/rest/main.js +691 -0
  60. data/_docs/rest/utils/handlebars_helper.js +327 -0
  61. data/_docs/rest/utils/send_sample_request.js +158 -0
  62. data/_docs/rest/vendor/bootstrap-responsive.min.css +9 -0
  63. data/_docs/rest/vendor/bootstrap.min.css +9 -0
  64. data/_docs/rest/vendor/bootstrap.min.js +6 -0
  65. data/_docs/rest/vendor/diff_match_patch.min.js +49 -0
  66. data/_docs/rest/vendor/handlebars.min.js +28 -0
  67. data/_docs/rest/vendor/jquery.min.js +4 -0
  68. data/_docs/rest/vendor/lodash.min.js +61 -0
  69. data/_docs/rest/vendor/path-to-regexp/LICENSE +21 -0
  70. data/_docs/rest/vendor/path-to-regexp/index.js +205 -0
  71. data/_docs/rest/vendor/polyfill.js +100 -0
  72. data/_docs/rest/vendor/prettify/lang-apollo.js +2 -0
  73. data/_docs/rest/vendor/prettify/lang-basic.js +3 -0
  74. data/_docs/rest/vendor/prettify/lang-clj.js +18 -0
  75. data/_docs/rest/vendor/prettify/lang-css.js +2 -0
  76. data/_docs/rest/vendor/prettify/lang-dart.js +3 -0
  77. data/_docs/rest/vendor/prettify/lang-erlang.js +2 -0
  78. data/_docs/rest/vendor/prettify/lang-go.js +1 -0
  79. data/_docs/rest/vendor/prettify/lang-hs.js +2 -0
  80. data/_docs/rest/vendor/prettify/lang-lisp.js +3 -0
  81. data/_docs/rest/vendor/prettify/lang-llvm.js +1 -0
  82. data/_docs/rest/vendor/prettify/lang-lua.js +2 -0
  83. data/_docs/rest/vendor/prettify/lang-matlab.js +6 -0
  84. data/_docs/rest/vendor/prettify/lang-ml.js +2 -0
  85. data/_docs/rest/vendor/prettify/lang-mumps.js +2 -0
  86. data/_docs/rest/vendor/prettify/lang-n.js +4 -0
  87. data/_docs/rest/vendor/prettify/lang-pascal.js +3 -0
  88. data/_docs/rest/vendor/prettify/lang-proto.js +1 -0
  89. data/_docs/rest/vendor/prettify/lang-r.js +2 -0
  90. data/_docs/rest/vendor/prettify/lang-rd.js +1 -0
  91. data/_docs/rest/vendor/prettify/lang-scala.js +2 -0
  92. data/_docs/rest/vendor/prettify/lang-sql.js +2 -0
  93. data/_docs/rest/vendor/prettify/lang-tcl.js +3 -0
  94. data/_docs/rest/vendor/prettify/lang-tex.js +1 -0
  95. data/_docs/rest/vendor/prettify/lang-vb.js +2 -0
  96. data/_docs/rest/vendor/prettify/lang-vhdl.js +3 -0
  97. data/_docs/rest/vendor/prettify/lang-wiki.js +2 -0
  98. data/_docs/rest/vendor/prettify/lang-xq.js +3 -0
  99. data/_docs/rest/vendor/prettify/lang-yaml.js +2 -0
  100. data/_docs/rest/vendor/prettify/prettify.css +1 -0
  101. data/_docs/rest/vendor/prettify/prettify.js +30 -0
  102. data/_docs/rest/vendor/prettify/run_prettify.js +34 -0
  103. data/_docs/rest/vendor/prettify.css +101 -0
  104. data/_docs/rest/vendor/require.min.js +36 -0
  105. data/apidoc.json +23 -0
  106. data/bin/wf_node_api +80 -0
  107. data/lib/wf_node_api/api/node_api.rb +360 -0
  108. data/lib/wf_node_api/config/config_template.erb +50 -0
  109. data/lib/wf_node_api/config_check.rb +50 -0
  110. data/lib/wf_node_api/container_manager.rb +286 -0
  111. data/lib/wf_node_api/container_manager_adapter/lxc.rb +431 -0
  112. data/lib/wf_node_api/container_manager_adapter/vserver.rb +448 -0
  113. data/lib/wf_node_api/error/not_found.rb +27 -0
  114. data/lib/wf_node_api/os.rb +32 -0
  115. data/lib/wf_node_api/resource_manager.rb +49 -0
  116. data/lib/wf_node_api/resource_manager_adapter/linux.rb +53 -0
  117. data/lib/wf_node_api/translations.rb +38 -0
  118. data/lib/wf_node_api/version.rb +28 -0
  119. data/lib/wf_node_api.rb +57 -0
  120. data/manifests/files/dhozac-vserver.repo +4 -0
  121. data/wf-node-api.gemspec +53 -0
  122. metadata +221 -0
@@ -0,0 +1,57 @@
1
+ =begin
2
+ __ ___ _ _ _____ ____ __ __
3
+ \ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
4
+ \ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
5
+ \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
6
+ \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
7
+ Container Manager
8
+
9
+ Copyright (C) 2015 David Prandzioch <kontakt@davidprandzioch.de>
10
+
11
+ This program is free software; you can redistribute it and/or
12
+ modify it under the terms of the GNU General Public License
13
+ as published by the Free Software Foundation; either version 2
14
+ of the License, or (at your option) any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU General Public License for more details.
20
+
21
+ You should have received a copy of the GNU General Public License
22
+ along with this program; if not, write to the Free Software
23
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
+ =end
25
+
26
+ require 'webrick'
27
+ require 'webrick/https'
28
+ require 'openssl'
29
+ require 'grape'
30
+ require 'erb'
31
+ require 'daemons'
32
+ require 'securerandom'
33
+ require 'resolv'
34
+ require 'open3'
35
+ require 'logger'
36
+
37
+ require 'wf_node_api/error/not_found.rb'
38
+
39
+ require 'wf_node_api/config_check.rb'
40
+
41
+ require 'wf_node_api/container_manager_adapter/lxc.rb'
42
+ require 'wf_node_api/container_manager_adapter/vserver.rb'
43
+
44
+ require 'wf_node_api/resource_manager_adapter/linux.rb'
45
+
46
+ require 'wf_node_api/version.rb'
47
+ require 'wf_node_api/translations.rb'
48
+ require 'wf_node_api/resource_manager.rb'
49
+ require 'wf_node_api/os.rb'
50
+ require 'wf_node_api/container_manager.rb'
51
+
52
+ require 'wf_node_api/api/node_api.rb'
53
+
54
+ module WfNodeApi
55
+ LIBNAME = 'wf_node_api'
56
+ LIBDIR = File.expand_path("../#{LIBNAME}", __FILE__)
57
+ end
@@ -0,0 +1,4 @@
1
+ [dhozac-vserver]
2
+ name=Linux-VServer related packages for CentOS 6 - $basearch
3
+ baseurl=http://rpm.hozac.com/dhozac/rhel/6/vserver/$basearch
4
+ gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY
@@ -0,0 +1,53 @@
1
+ =begin
2
+ __ ___ _ _ _____ ____ __ __
3
+ \ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
4
+ \ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
5
+ \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
6
+ \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
7
+ Container Manager
8
+
9
+ Copyright (C) 2015 David Prandzioch <kontakt@davidprandzioch.de>
10
+
11
+ This program is free software; you can redistribute it and/or
12
+ modify it under the terms of the GNU General Public License
13
+ as published by the Free Software Foundation; either version 2
14
+ of the License, or (at your option) any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU General Public License for more details.
20
+
21
+ You should have received a copy of the GNU General Public License
22
+ along with this program; if not, write to the Free Software
23
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
+ =end
25
+
26
+ lib = File.expand_path('../lib', __FILE__)
27
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
28
+
29
+ require 'wf_node_api/version'
30
+
31
+ Gem::Specification.new do |spec|
32
+ spec.name = 'wf_node_api'
33
+ spec.version = WfNodeApi::VERSION
34
+ spec.authors = ['David Prandzioch']
35
+ spec.email = ['kontakt@davidprandzioch.de']
36
+ spec.summary = %q{WhiteFuse Container Management Node API.}
37
+ spec.description = ''
38
+ spec.homepage = 'http://github.com/dprandzioch/whitefuse-node-api/'
39
+ spec.license = 'GPLv2'
40
+
41
+ spec.files = `git ls-files -z`.split("\x0")
42
+ spec.executables = ['wf_node_api']
43
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
44
+ spec.require_paths = ['lib']
45
+
46
+ spec.required_ruby_version = '>= 2.0.0'
47
+
48
+ spec.add_development_dependency 'bundler', '>= 1.3.1'
49
+ spec.add_development_dependency 'rake', '>= 10.0'
50
+
51
+ spec.add_dependency 'grape', '~> 0.12.0'
52
+ spec.add_dependency 'daemons', '~> 1.2.3'
53
+ end
metadata ADDED
@@ -0,0 +1,221 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wf_node_api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
5
+ platform: ruby
6
+ authors:
7
+ - David Prandzioch
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.3.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: grape
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.12.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.12.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: daemons
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 1.2.3
69
+ description: ''
70
+ email:
71
+ - kontakt@davidprandzioch.de
72
+ executables:
73
+ - wf_node_api
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - .gitignore
78
+ - Gemfile
79
+ - Gemfile.lock
80
+ - LICENSE
81
+ - Makefile
82
+ - README.md
83
+ - Rakefile
84
+ - Vagrantfile
85
+ - _docs/api/Api.html
86
+ - _docs/api/Api/NodeApi.html
87
+ - _docs/api/Config.html
88
+ - _docs/api/Config/Check.html
89
+ - _docs/api/ConfigCheck.html
90
+ - _docs/api/ContainerManager.html
91
+ - _docs/api/ContainerManagerAdapter.html
92
+ - _docs/api/ContainerManagerAdapter/Lxc.html
93
+ - _docs/api/ContainerManagerAdapter/Vserver.html
94
+ - _docs/api/Error.html
95
+ - _docs/api/Error/NotFound.html
96
+ - _docs/api/NotFoundError.html
97
+ - _docs/api/OS.html
98
+ - _docs/api/ResourceManager.html
99
+ - _docs/api/ResourceManagerAdapter.html
100
+ - _docs/api/ResourceManagerAdapter/Linux.html
101
+ - _docs/api/WfNodeApi.html
102
+ - _docs/api/_index.html
103
+ - _docs/api/class_list.html
104
+ - _docs/api/css/common.css
105
+ - _docs/api/css/full_list.css
106
+ - _docs/api/css/style.css
107
+ - _docs/api/file.README.html
108
+ - _docs/api/file_list.html
109
+ - _docs/api/frames.html
110
+ - _docs/api/index.html
111
+ - _docs/api/js/app.js
112
+ - _docs/api/js/full_list.js
113
+ - _docs/api/js/jquery.js
114
+ - _docs/api/method_list.html
115
+ - _docs/api/top-level-namespace.html
116
+ - _docs/rest/api_data.js
117
+ - _docs/rest/api_data.json
118
+ - _docs/rest/api_project.js
119
+ - _docs/rest/api_project.json
120
+ - _docs/rest/css/style.css
121
+ - _docs/rest/header.md
122
+ - _docs/rest/img/favicon.ico
123
+ - _docs/rest/img/glyphicons-halflings-white.png
124
+ - _docs/rest/img/glyphicons-halflings.png
125
+ - _docs/rest/index.html
126
+ - _docs/rest/locales/de.js
127
+ - _docs/rest/locales/fr.js
128
+ - _docs/rest/locales/locale.js
129
+ - _docs/rest/locales/nl.js
130
+ - _docs/rest/locales/pl.js
131
+ - _docs/rest/locales/pt_br.js
132
+ - _docs/rest/locales/ru.js
133
+ - _docs/rest/locales/zh.js
134
+ - _docs/rest/main.js
135
+ - _docs/rest/utils/handlebars_helper.js
136
+ - _docs/rest/utils/send_sample_request.js
137
+ - _docs/rest/vendor/bootstrap-responsive.min.css
138
+ - _docs/rest/vendor/bootstrap.min.css
139
+ - _docs/rest/vendor/bootstrap.min.js
140
+ - _docs/rest/vendor/diff_match_patch.min.js
141
+ - _docs/rest/vendor/handlebars.min.js
142
+ - _docs/rest/vendor/jquery.min.js
143
+ - _docs/rest/vendor/lodash.min.js
144
+ - _docs/rest/vendor/path-to-regexp/LICENSE
145
+ - _docs/rest/vendor/path-to-regexp/index.js
146
+ - _docs/rest/vendor/polyfill.js
147
+ - _docs/rest/vendor/prettify.css
148
+ - _docs/rest/vendor/prettify/lang-apollo.js
149
+ - _docs/rest/vendor/prettify/lang-basic.js
150
+ - _docs/rest/vendor/prettify/lang-clj.js
151
+ - _docs/rest/vendor/prettify/lang-css.js
152
+ - _docs/rest/vendor/prettify/lang-dart.js
153
+ - _docs/rest/vendor/prettify/lang-erlang.js
154
+ - _docs/rest/vendor/prettify/lang-go.js
155
+ - _docs/rest/vendor/prettify/lang-hs.js
156
+ - _docs/rest/vendor/prettify/lang-lisp.js
157
+ - _docs/rest/vendor/prettify/lang-llvm.js
158
+ - _docs/rest/vendor/prettify/lang-lua.js
159
+ - _docs/rest/vendor/prettify/lang-matlab.js
160
+ - _docs/rest/vendor/prettify/lang-ml.js
161
+ - _docs/rest/vendor/prettify/lang-mumps.js
162
+ - _docs/rest/vendor/prettify/lang-n.js
163
+ - _docs/rest/vendor/prettify/lang-pascal.js
164
+ - _docs/rest/vendor/prettify/lang-proto.js
165
+ - _docs/rest/vendor/prettify/lang-r.js
166
+ - _docs/rest/vendor/prettify/lang-rd.js
167
+ - _docs/rest/vendor/prettify/lang-scala.js
168
+ - _docs/rest/vendor/prettify/lang-sql.js
169
+ - _docs/rest/vendor/prettify/lang-tcl.js
170
+ - _docs/rest/vendor/prettify/lang-tex.js
171
+ - _docs/rest/vendor/prettify/lang-vb.js
172
+ - _docs/rest/vendor/prettify/lang-vhdl.js
173
+ - _docs/rest/vendor/prettify/lang-wiki.js
174
+ - _docs/rest/vendor/prettify/lang-xq.js
175
+ - _docs/rest/vendor/prettify/lang-yaml.js
176
+ - _docs/rest/vendor/prettify/prettify.css
177
+ - _docs/rest/vendor/prettify/prettify.js
178
+ - _docs/rest/vendor/prettify/run_prettify.js
179
+ - _docs/rest/vendor/require.min.js
180
+ - apidoc.json
181
+ - bin/wf_node_api
182
+ - lib/wf_node_api.rb
183
+ - lib/wf_node_api/api/node_api.rb
184
+ - lib/wf_node_api/config/config_template.erb
185
+ - lib/wf_node_api/config_check.rb
186
+ - lib/wf_node_api/container_manager.rb
187
+ - lib/wf_node_api/container_manager_adapter/lxc.rb
188
+ - lib/wf_node_api/container_manager_adapter/vserver.rb
189
+ - lib/wf_node_api/error/not_found.rb
190
+ - lib/wf_node_api/os.rb
191
+ - lib/wf_node_api/resource_manager.rb
192
+ - lib/wf_node_api/resource_manager_adapter/linux.rb
193
+ - lib/wf_node_api/translations.rb
194
+ - lib/wf_node_api/version.rb
195
+ - manifests/files/dhozac-vserver.repo
196
+ - wf-node-api.gemspec
197
+ homepage: http://github.com/dprandzioch/whitefuse-node-api/
198
+ licenses:
199
+ - GPLv2
200
+ metadata: {}
201
+ post_install_message:
202
+ rdoc_options: []
203
+ require_paths:
204
+ - lib
205
+ required_ruby_version: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - '>='
208
+ - !ruby/object:Gem::Version
209
+ version: 2.0.0
210
+ required_rubygems_version: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - '>='
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ requirements: []
216
+ rubyforge_project:
217
+ rubygems_version: 2.0.14
218
+ signing_key:
219
+ specification_version: 4
220
+ summary: WhiteFuse Container Management Node API.
221
+ test_files: []