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
@@ -90,29 +90,33 @@
|
|
90
90
|
<div class="discussion">
|
91
91
|
|
92
92
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
93
|
-
__
|
94
|
-
<em>_</em> / <em>_</em>| / |</p>
|
93
|
+
__</p>
|
95
94
|
|
96
|
-
<pre class="code ruby"><code class="ruby">\ \
|
97
|
-
\
|
98
|
-
\
|
95
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
96
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
97
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
98
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
99
99
|
Container Manager</code></pre>
|
100
100
|
|
101
|
-
<p>Copyright
|
101
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
102
102
|
|
103
|
-
<p>
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
104
|
+
copy of this software and associated documentation files (the “Software”),
|
105
|
+
to deal in the Software without restriction, including without limitation
|
106
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
107
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
108
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
107
109
|
|
108
|
-
<p>
|
109
|
-
|
110
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
111
|
-
more details.</p>
|
110
|
+
<p>The above copyright notice and this permission notice shall be included in
|
111
|
+
all copies or substantial portions of the Software.</p>
|
112
112
|
|
113
|
-
<p>
|
114
|
-
|
115
|
-
|
113
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
114
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
115
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
116
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
117
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
118
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
119
|
+
DEALINGS IN THE SOFTWARE.</p>
|
116
120
|
|
117
121
|
|
118
122
|
</div>
|
@@ -142,7 +146,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
142
146
|
</div>
|
143
147
|
|
144
148
|
<div id="footer">
|
145
|
-
Generated on
|
149
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
146
150
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
147
151
|
0.8.7.6 (ruby-2.0.0).
|
148
152
|
</div>
|
@@ -177,7 +177,7 @@ wrapping</p>
|
|
177
177
|
<li class="public ">
|
178
178
|
<span class="summary_signature">
|
179
179
|
|
180
|
-
<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>
|
180
|
+
<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>
|
181
181
|
|
182
182
|
|
183
183
|
|
@@ -339,6 +339,30 @@ wrapping</p>
|
|
339
339
|
<p>Stops a container with the given name.</p>
|
340
340
|
</div></span>
|
341
341
|
|
342
|
+
</li>
|
343
|
+
|
344
|
+
|
345
|
+
<li class="public ">
|
346
|
+
<span class="summary_signature">
|
347
|
+
|
348
|
+
<a href="#supported_templates-instance_method" title="#supported_templates (instance method)">- (Hash) <strong>supported_templates</strong> </a>
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
</span>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
<span class="summary_desc"><div class='inline'>
|
363
|
+
<p>Returns a list of supported templates.</p>
|
364
|
+
</div></span>
|
365
|
+
|
342
366
|
</li>
|
343
367
|
|
344
368
|
|
@@ -415,10 +439,6 @@ wrapping</p>
|
|
415
439
|
<pre class="lines">
|
416
440
|
|
417
441
|
|
418
|
-
124
|
419
|
-
125
|
420
|
-
126
|
421
|
-
127
|
422
442
|
128
|
423
443
|
129
|
424
444
|
130
|
@@ -429,10 +449,14 @@ wrapping</p>
|
|
429
449
|
135
|
430
450
|
136
|
431
451
|
137
|
432
|
-
138
|
452
|
+
138
|
453
|
+
139
|
454
|
+
140
|
455
|
+
141
|
456
|
+
142</pre>
|
433
457
|
</td>
|
434
458
|
<td>
|
435
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
459
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 128</span>
|
436
460
|
|
437
461
|
<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>
|
438
462
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
@@ -493,18 +517,18 @@ wrapping</p>
|
|
493
517
|
<pre class="lines">
|
494
518
|
|
495
519
|
|
496
|
-
33
|
497
|
-
34
|
498
|
-
35
|
499
|
-
36
|
500
520
|
37
|
501
521
|
38
|
502
522
|
39
|
503
523
|
40
|
504
|
-
41
|
524
|
+
41
|
525
|
+
42
|
526
|
+
43
|
527
|
+
44
|
528
|
+
45</pre>
|
505
529
|
</td>
|
506
530
|
<td>
|
507
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
531
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 37</span>
|
508
532
|
|
509
533
|
<span class='kw'>def</span> <span class='id identifier rubyid_containers'>containers</span>
|
510
534
|
<span class='id identifier rubyid_container_list'>container_list</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -523,7 +547,7 @@ wrapping</p>
|
|
523
547
|
<div class="method_details ">
|
524
548
|
<h3 class="signature " id="create_container-instance_method">
|
525
549
|
|
526
|
-
- (<tt>String</tt>) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count)
|
550
|
+
- (<tt>String</tt>) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count, template)
|
527
551
|
|
528
552
|
|
529
553
|
|
@@ -617,6 +641,22 @@ wrapping</p>
|
|
617
641
|
—
|
618
642
|
<div class='inline'>
|
619
643
|
<p>Amount of Vcores to assign. 0 if no limit should be set</p>
|
644
|
+
</div>
|
645
|
+
|
646
|
+
</li>
|
647
|
+
|
648
|
+
<li>
|
649
|
+
|
650
|
+
<span class='name'>template</span>
|
651
|
+
|
652
|
+
|
653
|
+
<span class='type'>(<tt>String</tt>)</span>
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
—
|
658
|
+
<div class='inline'>
|
659
|
+
<p>Name of the template to use</p>
|
620
660
|
</div>
|
621
661
|
|
622
662
|
</li>
|
@@ -661,11 +701,6 @@ wrapping</p>
|
|
661
701
|
<pre class="lines">
|
662
702
|
|
663
703
|
|
664
|
-
151
|
665
|
-
152
|
666
|
-
153
|
667
|
-
154
|
668
|
-
155
|
669
704
|
156
|
670
705
|
157
|
671
706
|
158
|
@@ -699,12 +734,23 @@ wrapping</p>
|
|
699
734
|
186
|
700
735
|
187
|
701
736
|
188
|
702
|
-
189
|
737
|
+
189
|
738
|
+
190
|
739
|
+
191
|
740
|
+
192
|
741
|
+
193
|
742
|
+
194
|
743
|
+
195
|
744
|
+
196
|
745
|
+
197
|
746
|
+
198
|
747
|
+
199
|
748
|
+
200</pre>
|
703
749
|
</td>
|
704
750
|
<td>
|
705
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
751
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 156</span>
|
706
752
|
|
707
|
-
<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>
|
753
|
+
<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>
|
708
754
|
<span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
709
755
|
|
710
756
|
<span class='kw'>begin</span>
|
@@ -712,7 +758,11 @@ wrapping</p>
|
|
712
758
|
<span class='id identifier rubyid_cpuset'>cpuset</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_generate_cpu_set'>generate_cpu_set</span><span class='lparen'>(</span><span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span><span class='comma'>,</span> <span class='const'>ResourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>linux</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
713
759
|
<span class='kw'>end</span>
|
714
760
|
|
715
|
-
<span class='
|
761
|
+
<span class='kw'>if</span> <span class='kw'>false</span> <span class='op'>==</span> <span class='gvar'>$lxc_cmd_create</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_template'>template</span><span class='rparen'>)</span>
|
762
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>template does not exist</span><span class='tstring_end'>"</span></span>
|
763
|
+
<span class='kw'>end</span>
|
764
|
+
|
765
|
+
<span class='id identifier rubyid_create_result'>create_result</span> <span class='op'>=</span> <span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_capture3'>capture3</span><span class='lparen'>(</span><span class='gvar'>$lxc_cmd_create</span><span class='lbracket'>[</span><span class='id identifier rubyid_template'>template</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>[name]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
716
766
|
|
717
767
|
<span class='id identifier rubyid_output'>output</span> <span class='op'>+=</span> <span class='id identifier rubyid_create_result'>create_result</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
718
768
|
<span class='id identifier rubyid_output'>output</span> <span class='op'>+=</span> <span class='id identifier rubyid_create_result'>create_result</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
@@ -724,11 +774,13 @@ wrapping</p>
|
|
724
774
|
<span class='id identifier rubyid_f'>f</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lxc.start.auto=1\n</span><span class='tstring_end'>"</span></span>
|
725
775
|
<span class='id identifier rubyid_f'>f</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lxc.start.delay=5\n</span><span class='tstring_end'>"</span></span>
|
726
776
|
|
727
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_cpu_core_count'>cpu_core_count</span> <span class='op'>!=</span> <span class='int'>0</span>
|
777
|
+
<span class='kw'>if</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> <span class='op'>!=</span> <span class='int'>0</span>
|
728
778
|
<span class='id identifier rubyid_f'>f</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lxc.cgroup.cpuset.cpus=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cpuset'>cpuset</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
729
779
|
<span class='kw'>end</span>
|
730
780
|
|
731
|
-
<span class='
|
781
|
+
<span class='kw'>if</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> <span class='op'>!=</span> <span class='int'>0</span>
|
782
|
+
<span class='id identifier rubyid_f'>f</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lxc.cgroup.memory.limit_in_bytes=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_memory_limit_mb'>memory_limit_mb</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_content'>M\n</span><span class='tstring_end'>"</span></span>
|
783
|
+
<span class='kw'>end</span>
|
732
784
|
<span class='kw'>end</span>
|
733
785
|
|
734
786
|
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>creation of container </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> successful</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -825,20 +877,20 @@ wrapping</p>
|
|
825
877
|
<pre class="lines">
|
826
878
|
|
827
879
|
|
828
|
-
107
|
829
|
-
108
|
830
|
-
109
|
831
|
-
110
|
832
880
|
111
|
833
881
|
112
|
834
882
|
113
|
835
883
|
114
|
836
884
|
115
|
837
885
|
116
|
838
|
-
117
|
886
|
+
117
|
887
|
+
118
|
888
|
+
119
|
889
|
+
120
|
890
|
+
121</pre>
|
839
891
|
</td>
|
840
892
|
<td>
|
841
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
893
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 111</span>
|
842
894
|
|
843
895
|
<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>
|
844
896
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_capture3'>capture3</span><span class='lparen'>(</span><span class='gvar'>$lxc_cmd_destroy</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>[name]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -920,12 +972,12 @@ wrapping</p>
|
|
920
972
|
<pre class="lines">
|
921
973
|
|
922
974
|
|
923
|
-
|
924
|
-
|
925
|
-
|
975
|
+
207
|
976
|
+
208
|
977
|
+
209</pre>
|
926
978
|
</td>
|
927
979
|
<td>
|
928
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
980
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 207</span>
|
929
981
|
|
930
982
|
<span class='kw'>def</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>
|
931
983
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_container_names'>container_names</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -999,12 +1051,12 @@ wrapping</p>
|
|
999
1051
|
<pre class="lines">
|
1000
1052
|
|
1001
1053
|
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1054
|
+
216
|
1055
|
+
217
|
1056
|
+
218</pre>
|
1005
1057
|
</td>
|
1006
1058
|
<td>
|
1007
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
1059
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 216</span>
|
1008
1060
|
|
1009
1061
|
<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>
|
1010
1062
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_free_cpu_cores'>free_cpu_cores</span><span class='lparen'>(</span><span class='id identifier rubyid_resman'>resman</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
|
@@ -1091,20 +1143,20 @@ wrapping</p>
|
|
1091
1143
|
<pre class="lines">
|
1092
1144
|
|
1093
1145
|
|
1094
|
-
88
|
1095
|
-
89
|
1096
|
-
90
|
1097
|
-
91
|
1098
1146
|
92
|
1099
1147
|
93
|
1100
1148
|
94
|
1101
1149
|
95
|
1102
1150
|
96
|
1103
1151
|
97
|
1104
|
-
98
|
1152
|
+
98
|
1153
|
+
99
|
1154
|
+
100
|
1155
|
+
101
|
1156
|
+
102</pre>
|
1105
1157
|
</td>
|
1106
1158
|
<td>
|
1107
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
1159
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 92</span>
|
1108
1160
|
|
1109
1161
|
<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>
|
1110
1162
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_capture3'>capture3</span><span class='lparen'>(</span><span class='gvar'>$lxc_cmd_kill</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>[name]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -1199,20 +1251,20 @@ wrapping</p>
|
|
1199
1251
|
<pre class="lines">
|
1200
1252
|
|
1201
1253
|
|
1202
|
-
50
|
1203
|
-
51
|
1204
|
-
52
|
1205
|
-
53
|
1206
1254
|
54
|
1207
1255
|
55
|
1208
1256
|
56
|
1209
1257
|
57
|
1210
1258
|
58
|
1211
1259
|
59
|
1212
|
-
60
|
1260
|
+
60
|
1261
|
+
61
|
1262
|
+
62
|
1263
|
+
63
|
1264
|
+
64</pre>
|
1213
1265
|
</td>
|
1214
1266
|
<td>
|
1215
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
1267
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 54</span>
|
1216
1268
|
|
1217
1269
|
<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>
|
1218
1270
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_capture3'>capture3</span><span class='lparen'>(</span><span class='gvar'>$lxc_cmd_start</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>[name]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -1307,20 +1359,20 @@ wrapping</p>
|
|
1307
1359
|
<pre class="lines">
|
1308
1360
|
|
1309
1361
|
|
1310
|
-
69
|
1311
|
-
70
|
1312
|
-
71
|
1313
|
-
72
|
1314
1362
|
73
|
1315
1363
|
74
|
1316
1364
|
75
|
1317
1365
|
76
|
1318
1366
|
77
|
1319
1367
|
78
|
1320
|
-
79
|
1368
|
+
79
|
1369
|
+
80
|
1370
|
+
81
|
1371
|
+
82
|
1372
|
+
83</pre>
|
1321
1373
|
</td>
|
1322
1374
|
<td>
|
1323
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line
|
1375
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 73</span>
|
1324
1376
|
|
1325
1377
|
<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>
|
1326
1378
|
<span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_capture3'>capture3</span><span class='lparen'>(</span><span class='gvar'>$lxc_cmd_stop</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>[name]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -1336,6 +1388,65 @@ wrapping</p>
|
|
1336
1388
|
</td>
|
1337
1389
|
</tr>
|
1338
1390
|
</table>
|
1391
|
+
</div>
|
1392
|
+
|
1393
|
+
<div class="method_details ">
|
1394
|
+
<h3 class="signature " id="supported_templates-instance_method">
|
1395
|
+
|
1396
|
+
- (<tt>Hash</tt>) <strong>supported_templates</strong>
|
1397
|
+
|
1398
|
+
|
1399
|
+
|
1400
|
+
|
1401
|
+
|
1402
|
+
</h3><div class="docstring">
|
1403
|
+
<div class="discussion">
|
1404
|
+
|
1405
|
+
<p>Returns a list of supported templates</p>
|
1406
|
+
|
1407
|
+
|
1408
|
+
</div>
|
1409
|
+
</div>
|
1410
|
+
<div class="tags">
|
1411
|
+
|
1412
|
+
<p class="tag_title">Returns:</p>
|
1413
|
+
<ul class="return">
|
1414
|
+
|
1415
|
+
<li>
|
1416
|
+
|
1417
|
+
|
1418
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1419
|
+
|
1420
|
+
|
1421
|
+
|
1422
|
+
—
|
1423
|
+
<div class='inline'>
|
1424
|
+
<p>List of supported templates</p>
|
1425
|
+
</div>
|
1426
|
+
|
1427
|
+
</li>
|
1428
|
+
|
1429
|
+
</ul>
|
1430
|
+
|
1431
|
+
</div><table class="source_code">
|
1432
|
+
<tr>
|
1433
|
+
<td>
|
1434
|
+
<pre class="lines">
|
1435
|
+
|
1436
|
+
|
1437
|
+
223
|
1438
|
+
224
|
1439
|
+
225</pre>
|
1440
|
+
</td>
|
1441
|
+
<td>
|
1442
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/lxc.rb', line 223</span>
|
1443
|
+
|
1444
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_supported_templates'>supported_templates</span>
|
1445
|
+
<span class='gvar'>$lxc_cmd_create</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
|
1446
|
+
<span class='kw'>end</span></pre>
|
1447
|
+
</td>
|
1448
|
+
</tr>
|
1449
|
+
</table>
|
1339
1450
|
</div>
|
1340
1451
|
|
1341
1452
|
</div>
|
@@ -1343,7 +1454,7 @@ wrapping</p>
|
|
1343
1454
|
</div>
|
1344
1455
|
|
1345
1456
|
<div id="footer">
|
1346
|
-
Generated on
|
1457
|
+
Generated on Sun Oct 25 20:54:55 2015 by
|
1347
1458
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1348
1459
|
0.8.7.6 (ruby-2.0.0).
|
1349
1460
|
</div>
|