wf_node_api 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +22 -18
- data/Gemfile.lock +3 -3
- data/LICENSE +19 -340
- data/Vagrantfile +28 -23
- data/_docs/api/Api.html +22 -18
- data/_docs/api/Api/NodeApi.html +1 -1
- data/_docs/api/ConfigCheck.html +34 -30
- data/_docs/api/ContainerManager.html +176 -77
- data/_docs/api/ContainerManagerAdapter.html +22 -18
- data/_docs/api/ContainerManagerAdapter/Lxc.html +169 -58
- data/_docs/api/ContainerManagerAdapter/Vserver.html +169 -58
- data/_docs/api/NotFoundError.html +22 -18
- data/_docs/api/OS.html +26 -22
- data/_docs/api/ResourceManager.html +11 -11
- data/_docs/api/ResourceManagerAdapter.html +22 -18
- data/_docs/api/ResourceManagerAdapter/Linux.html +13 -13
- data/_docs/api/WfNodeApi.html +23 -19
- data/_docs/api/_index.html +1 -1
- data/_docs/api/file.README.html +96 -66
- data/_docs/api/index.html +96 -66
- data/_docs/api/method_list.html +60 -42
- data/_docs/api/top-level-namespace.html +7 -7
- data/_docs/rest/api_data.js +934 -1
- data/_docs/rest/api_data.json +934 -1
- data/_docs/rest/api_project.js +31 -1
- data/_docs/rest/api_project.json +31 -1
- data/bin/wf_node_api +25 -21
- data/lib/wf_node_api.rb +25 -21
- data/lib/wf_node_api/api/node_api.rb +36 -27
- data/lib/wf_node_api/config/config_template.erb +36 -4
- data/lib/wf_node_api/config_check.rb +25 -21
- data/lib/wf_node_api/container_manager.rb +34 -22
- data/lib/wf_node_api/container_manager_adapter/lxc.rb +43 -25
- data/lib/wf_node_api/container_manager_adapter/vserver.rb +45 -27
- data/lib/wf_node_api/error/not_found.rb +22 -18
- data/lib/wf_node_api/os.rb +22 -18
- data/lib/wf_node_api/resource_manager.rb +24 -20
- data/lib/wf_node_api/resource_manager_adapter/linux.rb +25 -21
- data/lib/wf_node_api/translations.rb +22 -18
- data/lib/wf_node_api/version.rb +22 -18
- data/wf-node-api.gemspec +26 -22
- metadata +4 -3
data/_docs/api/Api.html
CHANGED
@@ -88,29 +88,33 @@
|
|
88
88
|
<div class="discussion">
|
89
89
|
|
90
90
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
91
|
-
__
|
92
|
-
<em>_</em> / <em>_</em>| / |</p>
|
91
|
+
__</p>
|
93
92
|
|
94
|
-
<pre class="code ruby"><code class="ruby">\ \
|
95
|
-
\
|
96
|
-
\
|
93
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
94
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
95
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
96
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
97
97
|
Container Manager</code></pre>
|
98
98
|
|
99
|
-
<p>Copyright
|
99
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
100
100
|
|
101
|
-
<p>
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
102
|
+
copy of this software and associated documentation files (the “Software”),
|
103
|
+
to deal in the Software without restriction, including without limitation
|
104
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
105
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
106
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
105
107
|
|
106
|
-
<p>
|
107
|
-
|
108
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
109
|
-
more details.</p>
|
108
|
+
<p>The above copyright notice and this permission notice shall be included in
|
109
|
+
all copies or substantial portions of the Software.</p>
|
110
110
|
|
111
|
-
<p>
|
112
|
-
|
113
|
-
|
111
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
112
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
113
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
114
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
115
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
116
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
117
|
+
DEALINGS IN THE SOFTWARE.</p>
|
114
118
|
|
115
119
|
|
116
120
|
</div>
|
@@ -140,7 +144,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
140
144
|
</div>
|
141
145
|
|
142
146
|
<div id="footer">
|
143
|
-
Generated on
|
147
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
144
148
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
145
149
|
0.8.7.6 (ruby-2.0.0).
|
146
150
|
</div>
|
data/_docs/api/Api/NodeApi.html
CHANGED
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.8.7.6 (ruby-2.0.0).
|
120
120
|
</div>
|
data/_docs/api/ConfigCheck.html
CHANGED
@@ -88,29 +88,33 @@
|
|
88
88
|
<div class="discussion">
|
89
89
|
|
90
90
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
91
|
-
__
|
92
|
-
<em>_</em> / <em>_</em>| / |</p>
|
91
|
+
__</p>
|
93
92
|
|
94
|
-
<pre class="code ruby"><code class="ruby">\ \
|
95
|
-
\
|
96
|
-
\
|
93
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
94
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
95
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
96
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
97
97
|
Container Manager</code></pre>
|
98
98
|
|
99
|
-
<p>Copyright
|
99
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
100
100
|
|
101
|
-
<p>
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
102
|
+
copy of this software and associated documentation files (the “Software”),
|
103
|
+
to deal in the Software without restriction, including without limitation
|
104
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
105
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
106
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
105
107
|
|
106
|
-
<p>
|
107
|
-
|
108
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
109
|
-
more details.</p>
|
108
|
+
<p>The above copyright notice and this permission notice shall be included in
|
109
|
+
all copies or substantial portions of the Software.</p>
|
110
110
|
|
111
|
-
<p>
|
112
|
-
|
113
|
-
|
111
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
112
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
113
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
114
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
115
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
116
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
117
|
+
DEALINGS IN THE SOFTWARE.</p>
|
114
118
|
|
115
119
|
|
116
120
|
</div>
|
@@ -229,14 +233,14 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
229
233
|
<pre class="lines">
|
230
234
|
|
231
235
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
236
|
+
35
|
237
|
+
36
|
238
|
+
37
|
239
|
+
38
|
240
|
+
39</pre>
|
237
241
|
</td>
|
238
242
|
<td>
|
239
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/config_check.rb', line
|
243
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/config_check.rb', line 35</span>
|
240
244
|
|
241
245
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span>
|
242
246
|
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_valid_container_type?'>valid_container_type?</span><span class='lparen'>(</span><span class='gvar'>$container_type</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='kw'>false</span>
|
@@ -330,15 +334,15 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
330
334
|
<pre class="lines">
|
331
335
|
|
332
336
|
|
333
|
-
44
|
334
|
-
45
|
335
|
-
46
|
336
|
-
47
|
337
337
|
48
|
338
|
-
49
|
338
|
+
49
|
339
|
+
50
|
340
|
+
51
|
341
|
+
52
|
342
|
+
53</pre>
|
339
343
|
</td>
|
340
344
|
<td>
|
341
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/config_check.rb', line
|
345
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/config_check.rb', line 48</span>
|
342
346
|
|
343
347
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_valid_container_type?'>valid_container_type?</span><span class='lparen'>(</span><span class='id identifier rubyid_container_type'>container_type</span><span class='rparen'>)</span>
|
344
348
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>container_type not set</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_container_type'>container_type</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
@@ -356,7 +360,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
356
360
|
</div>
|
357
361
|
|
358
362
|
<div id="footer">
|
359
|
-
Generated on
|
363
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
360
364
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
361
365
|
0.8.7.6 (ruby-2.0.0).
|
362
366
|
</div>
|
@@ -200,7 +200,7 @@
|
|
200
200
|
<li class="public ">
|
201
201
|
<span class="summary_signature">
|
202
202
|
|
203
|
-
<a href="#create_container-instance_method" title="#create_container (instance method)">- (String) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count) </a>
|
203
|
+
<a href="#create_container-instance_method" title="#create_container (instance method)">- (String) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count, template) </a>
|
204
204
|
|
205
205
|
|
206
206
|
|
@@ -364,6 +364,30 @@
|
|
364
364
|
<p>Stops a container with the given name.</p>
|
365
365
|
</div></span>
|
366
366
|
|
367
|
+
</li>
|
368
|
+
|
369
|
+
|
370
|
+
<li class="public ">
|
371
|
+
<span class="summary_signature">
|
372
|
+
|
373
|
+
<a href="#supported_templates-instance_method" title="#supported_templates (instance method)">- (Hash) <strong>supported_templates</strong> </a>
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
</span>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<span class="summary_desc"><div class='inline'>
|
388
|
+
<p>Returns a list of supported templates.</p>
|
389
|
+
</div></span>
|
390
|
+
|
367
391
|
</li>
|
368
392
|
|
369
393
|
|
@@ -437,18 +461,18 @@
|
|
437
461
|
<pre class="lines">
|
438
462
|
|
439
463
|
|
440
|
-
149
|
441
|
-
150
|
442
|
-
151
|
443
|
-
152
|
444
464
|
153
|
445
465
|
154
|
446
466
|
155
|
447
467
|
156
|
448
|
-
157
|
468
|
+
157
|
469
|
+
158
|
470
|
+
159
|
471
|
+
160
|
472
|
+
161</pre>
|
449
473
|
</td>
|
450
474
|
<td>
|
451
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
475
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 153</span>
|
452
476
|
|
453
477
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_container_type'>container_type</span><span class='rparen'>)</span>
|
454
478
|
<span class='kw'>if</span> <span class='id identifier rubyid_container_type'>container_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lxc</span><span class='tstring_end'>'</span></span>
|
@@ -510,10 +534,6 @@
|
|
510
534
|
<pre class="lines">
|
511
535
|
|
512
536
|
|
513
|
-
31
|
514
|
-
32
|
515
|
-
33
|
516
|
-
34
|
517
537
|
35
|
518
538
|
36
|
519
539
|
37
|
@@ -621,10 +641,14 @@
|
|
621
641
|
139
|
622
642
|
140
|
623
643
|
141
|
624
|
-
142
|
644
|
+
142
|
645
|
+
143
|
646
|
+
144
|
647
|
+
145
|
648
|
+
146</pre>
|
625
649
|
</td>
|
626
650
|
<td>
|
627
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
651
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 35</span>
|
628
652
|
|
629
653
|
<span class='kw'>def</span> <span class='id identifier rubyid_check'>check</span>
|
630
654
|
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='int'>0</span><span class='op'>...</span><span class='int'>8</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='lparen'>(</span><span class='int'>65</span> <span class='op'>+</span> <span class='id identifier rubyid_rand'>rand</span><span class='lparen'>(</span><span class='int'>26</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_chr'>chr</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
|
@@ -820,16 +844,16 @@
|
|
820
844
|
<pre class="lines">
|
821
845
|
|
822
846
|
|
823
|
-
173
|
824
|
-
174
|
825
|
-
175
|
826
|
-
176
|
827
847
|
177
|
828
848
|
178
|
829
|
-
179
|
849
|
+
179
|
850
|
+
180
|
851
|
+
181
|
852
|
+
182
|
853
|
+
183</pre>
|
830
854
|
</td>
|
831
855
|
<td>
|
832
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
856
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 177</span>
|
833
857
|
|
834
858
|
<span class='kw'>def</span> <span class='id identifier rubyid_container'>container</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
835
859
|
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -882,12 +906,12 @@
|
|
882
906
|
<pre class="lines">
|
883
907
|
|
884
908
|
|
885
|
-
|
886
|
-
|
887
|
-
|
909
|
+
166
|
910
|
+
167
|
911
|
+
168</pre>
|
888
912
|
</td>
|
889
913
|
<td>
|
890
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
914
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 166</span>
|
891
915
|
|
892
916
|
<span class='kw'>def</span> <span class='id identifier rubyid_containers'>containers</span>
|
893
917
|
<span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_containers'>containers</span>
|
@@ -900,7 +924,7 @@
|
|
900
924
|
<div class="method_details ">
|
901
925
|
<h3 class="signature " id="create_container-instance_method">
|
902
926
|
|
903
|
-
- (<tt>String</tt>) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count)
|
927
|
+
- (<tt>String</tt>) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count, template)
|
904
928
|
|
905
929
|
|
906
930
|
|
@@ -994,6 +1018,22 @@
|
|
994
1018
|
—
|
995
1019
|
<div class='inline'>
|
996
1020
|
<p>Amount of Vcores to assign</p>
|
1021
|
+
</div>
|
1022
|
+
|
1023
|
+
</li>
|
1024
|
+
|
1025
|
+
<li>
|
1026
|
+
|
1027
|
+
<span class='name'>template</span>
|
1028
|
+
|
1029
|
+
|
1030
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
—
|
1035
|
+
<div class='inline'>
|
1036
|
+
<p>Name of the template to use</p>
|
997
1037
|
</div>
|
998
1038
|
|
999
1039
|
</li>
|
@@ -1056,30 +1096,30 @@
|
|
1056
1096
|
<pre class="lines">
|
1057
1097
|
|
1058
1098
|
|
1059
|
-
267
|
1060
|
-
268
|
1061
|
-
269
|
1062
|
-
270
|
1063
|
-
271
|
1064
|
-
272
|
1065
|
-
273
|
1066
|
-
274
|
1067
|
-
275
|
1068
|
-
276
|
1069
|
-
277
|
1070
|
-
278
|
1071
1099
|
279
|
1072
1100
|
280
|
1073
1101
|
281
|
1074
1102
|
282
|
1075
1103
|
283
|
1076
1104
|
284
|
1077
|
-
285
|
1105
|
+
285
|
1106
|
+
286
|
1107
|
+
287
|
1108
|
+
288
|
1109
|
+
289
|
1110
|
+
290
|
1111
|
+
291
|
1112
|
+
292
|
1113
|
+
293
|
1114
|
+
294
|
1115
|
+
295
|
1116
|
+
296
|
1117
|
+
297</pre>
|
1078
1118
|
</td>
|
1079
1119
|
<td>
|
1080
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
1120
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 279</span>
|
1081
1121
|
|
1082
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_create_container'>create_container</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_ip_address'>ip_address</span><span class='comma'>,</span> <span class='id identifier rubyid_disk_size_gb'>disk_size_gb</span><span class='comma'>,</span> <span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span><span class='comma'>,</span> <span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span><span class='rparen'>)</span>
|
1122
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_container'>create_container</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_ip_address'>ip_address</span><span class='comma'>,</span> <span class='id identifier rubyid_disk_size_gb'>disk_size_gb</span><span class='comma'>,</span> <span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span><span class='comma'>,</span> <span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span><span class='comma'>,</span> <span class='id identifier rubyid_template'>template</span><span class='rparen'>)</span>
|
1083
1123
|
<span class='id identifier rubyid_disk_size_gb'>disk_size_gb</span> <span class='op'>=</span> <span class='id identifier rubyid_disk_size_gb'>disk_size_gb</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1084
1124
|
<span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span> <span class='op'>=</span> <span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1085
1125
|
<span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span> <span class='op'>=</span> <span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
@@ -1096,7 +1136,7 @@
|
|
1096
1136
|
<span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>NotFoundError</span>
|
1097
1137
|
<span class='kw'>end</span>
|
1098
1138
|
|
1099
|
-
<span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_create_container'>create_container</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_ip_address'>ip_address</span><span class='comma'>,</span> <span class='id identifier rubyid_disk_size_gb'>disk_size_gb</span><span class='comma'>,</span> <span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span><span class='comma'>,</span> <span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span><span class='rparen'>)</span>
|
1139
|
+
<span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_create_container'>create_container</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_ip_address'>ip_address</span><span class='comma'>,</span> <span class='id identifier rubyid_disk_size_gb'>disk_size_gb</span><span class='comma'>,</span> <span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span><span class='comma'>,</span> <span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span><span class='comma'>,</span> <span class='id identifier rubyid_template'>template</span><span class='rparen'>)</span>
|
1100
1140
|
<span class='kw'>end</span></pre>
|
1101
1141
|
</td>
|
1102
1142
|
</tr>
|
@@ -1189,16 +1229,16 @@
|
|
1189
1229
|
<pre class="lines">
|
1190
1230
|
|
1191
1231
|
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1232
|
+
257
|
1233
|
+
258
|
1234
|
+
259
|
1235
|
+
260
|
1236
|
+
261
|
1237
|
+
262
|
1238
|
+
263</pre>
|
1199
1239
|
</td>
|
1200
1240
|
<td>
|
1201
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
1241
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 257</span>
|
1202
1242
|
|
1203
1243
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1204
1244
|
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -1276,12 +1316,12 @@
|
|
1276
1316
|
<pre class="lines">
|
1277
1317
|
|
1278
1318
|
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1319
|
+
197
|
1320
|
+
198
|
1321
|
+
199</pre>
|
1282
1322
|
</td>
|
1283
1323
|
<td>
|
1284
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
1324
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 197</span>
|
1285
1325
|
|
1286
1326
|
<span class='kw'>def</span> <span class='id identifier rubyid_free_cpu_core_count'>free_cpu_core_count</span><span class='lparen'>(</span><span class='id identifier rubyid_resman'>resman</span><span class='rparen'>)</span>
|
1287
1327
|
<span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_free_cpu_core_count'>free_cpu_core_count</span><span class='lparen'>(</span><span class='id identifier rubyid_resman'>resman</span><span class='rparen'>)</span>
|
@@ -1377,16 +1417,16 @@
|
|
1377
1417
|
<pre class="lines">
|
1378
1418
|
|
1379
1419
|
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1420
|
+
241
|
1421
|
+
242
|
1422
|
+
243
|
1423
|
+
244
|
1424
|
+
245
|
1425
|
+
246
|
1426
|
+
247</pre>
|
1387
1427
|
</td>
|
1388
1428
|
<td>
|
1389
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
1429
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 241</span>
|
1390
1430
|
|
1391
1431
|
<span class='kw'>def</span> <span class='id identifier rubyid_kill'>kill</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1392
1432
|
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -1486,16 +1526,16 @@
|
|
1486
1526
|
<pre class="lines">
|
1487
1527
|
|
1488
1528
|
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1529
|
+
209
|
1530
|
+
210
|
1531
|
+
211
|
1532
|
+
212
|
1533
|
+
213
|
1534
|
+
214
|
1535
|
+
215</pre>
|
1496
1536
|
</td>
|
1497
1537
|
<td>
|
1498
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
1538
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 209</span>
|
1499
1539
|
|
1500
1540
|
<span class='kw'>def</span> <span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1501
1541
|
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -1595,16 +1635,16 @@
|
|
1595
1635
|
<pre class="lines">
|
1596
1636
|
|
1597
1637
|
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1638
|
+
225
|
1639
|
+
226
|
1640
|
+
227
|
1641
|
+
228
|
1642
|
+
229
|
1643
|
+
230
|
1644
|
+
231</pre>
|
1605
1645
|
</td>
|
1606
1646
|
<td>
|
1607
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line
|
1647
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 225</span>
|
1608
1648
|
|
1609
1649
|
<span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1610
1650
|
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -1616,6 +1656,65 @@
|
|
1616
1656
|
</td>
|
1617
1657
|
</tr>
|
1618
1658
|
</table>
|
1659
|
+
</div>
|
1660
|
+
|
1661
|
+
<div class="method_details ">
|
1662
|
+
<h3 class="signature " id="supported_templates-instance_method">
|
1663
|
+
|
1664
|
+
- (<tt>Hash</tt>) <strong>supported_templates</strong>
|
1665
|
+
|
1666
|
+
|
1667
|
+
|
1668
|
+
|
1669
|
+
|
1670
|
+
</h3><div class="docstring">
|
1671
|
+
<div class="discussion">
|
1672
|
+
|
1673
|
+
<p>Returns a list of supported templates</p>
|
1674
|
+
|
1675
|
+
|
1676
|
+
</div>
|
1677
|
+
</div>
|
1678
|
+
<div class="tags">
|
1679
|
+
|
1680
|
+
<p class="tag_title">Returns:</p>
|
1681
|
+
<ul class="return">
|
1682
|
+
|
1683
|
+
<li>
|
1684
|
+
|
1685
|
+
|
1686
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1687
|
+
|
1688
|
+
|
1689
|
+
|
1690
|
+
—
|
1691
|
+
<div class='inline'>
|
1692
|
+
<p>List of supported templates</p>
|
1693
|
+
</div>
|
1694
|
+
|
1695
|
+
</li>
|
1696
|
+
|
1697
|
+
</ul>
|
1698
|
+
|
1699
|
+
</div><table class="source_code">
|
1700
|
+
<tr>
|
1701
|
+
<td>
|
1702
|
+
<pre class="lines">
|
1703
|
+
|
1704
|
+
|
1705
|
+
188
|
1706
|
+
189
|
1707
|
+
190</pre>
|
1708
|
+
</td>
|
1709
|
+
<td>
|
1710
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager.rb', line 188</span>
|
1711
|
+
|
1712
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_supported_templates'>supported_templates</span>
|
1713
|
+
<span class='ivar'>@adapter</span><span class='period'>.</span><span class='id identifier rubyid_supported_templates'>supported_templates</span>
|
1714
|
+
<span class='kw'>end</span></pre>
|
1715
|
+
</td>
|
1716
|
+
</tr>
|
1717
|
+
</table>
|
1619
1718
|
</div>
|
1620
1719
|
|
1621
1720
|
</div>
|
@@ -1623,7 +1722,7 @@
|
|
1623
1722
|
</div>
|
1624
1723
|
|
1625
1724
|
<div id="footer">
|
1626
|
-
Generated on
|
1725
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
1627
1726
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1628
1727
|
0.8.7.6 (ruby-2.0.0).
|
1629
1728
|
</div>
|