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
@@ -177,7 +177,7 @@ command line 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 @@ command line 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 @@ command line wrapping</p>
|
|
415
439
|
<pre class="lines">
|
416
440
|
|
417
441
|
|
418
|
-
121
|
419
|
-
122
|
420
|
-
123
|
421
|
-
124
|
422
442
|
125
|
423
443
|
126
|
424
444
|
127
|
@@ -430,10 +450,14 @@ command line wrapping</p>
|
|
430
450
|
133
|
431
451
|
134
|
432
452
|
135
|
433
|
-
136
|
453
|
+
136
|
454
|
+
137
|
455
|
+
138
|
456
|
+
139
|
457
|
+
140</pre>
|
434
458
|
</td>
|
435
459
|
<td>
|
436
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
460
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 125</span>
|
437
461
|
|
438
462
|
<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>
|
439
463
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
@@ -495,18 +519,18 @@ command line wrapping</p>
|
|
495
519
|
<pre class="lines">
|
496
520
|
|
497
521
|
|
498
|
-
33
|
499
|
-
34
|
500
|
-
35
|
501
|
-
36
|
502
522
|
37
|
503
523
|
38
|
504
524
|
39
|
505
525
|
40
|
506
|
-
41
|
526
|
+
41
|
527
|
+
42
|
528
|
+
43
|
529
|
+
44
|
530
|
+
45</pre>
|
507
531
|
</td>
|
508
532
|
<td>
|
509
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
533
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 37</span>
|
510
534
|
|
511
535
|
<span class='kw'>def</span> <span class='id identifier rubyid_containers'>containers</span>
|
512
536
|
<span class='id identifier rubyid_container_list'>container_list</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -525,7 +549,7 @@ command line wrapping</p>
|
|
525
549
|
<div class="method_details ">
|
526
550
|
<h3 class="signature " id="create_container-instance_method">
|
527
551
|
|
528
|
-
- (<tt>String</tt>) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count)
|
552
|
+
- (<tt>String</tt>) <strong>create_container</strong>(name, ip_address, disk_size_gb, memory_limit_mb, cpu_core_count, template)
|
529
553
|
|
530
554
|
|
531
555
|
|
@@ -619,6 +643,22 @@ command line wrapping</p>
|
|
619
643
|
—
|
620
644
|
<div class='inline'>
|
621
645
|
<p>Amount of Vcores to assign. 0 for no limit</p>
|
646
|
+
</div>
|
647
|
+
|
648
|
+
</li>
|
649
|
+
|
650
|
+
<li>
|
651
|
+
|
652
|
+
<span class='name'>template</span>
|
653
|
+
|
654
|
+
|
655
|
+
<span class='type'>(<tt>String</tt>)</span>
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
—
|
660
|
+
<div class='inline'>
|
661
|
+
<p>Name of the template to use</p>
|
622
662
|
</div>
|
623
663
|
|
624
664
|
</li>
|
@@ -663,11 +703,6 @@ command line wrapping</p>
|
|
663
703
|
<pre class="lines">
|
664
704
|
|
665
705
|
|
666
|
-
149
|
667
|
-
150
|
668
|
-
151
|
669
|
-
152
|
670
|
-
153
|
671
706
|
154
|
672
707
|
155
|
673
708
|
156
|
@@ -706,12 +741,23 @@ command line wrapping</p>
|
|
706
741
|
189
|
707
742
|
190
|
708
743
|
191
|
709
|
-
192
|
744
|
+
192
|
745
|
+
193
|
746
|
+
194
|
747
|
+
195
|
748
|
+
196
|
749
|
+
197
|
750
|
+
198
|
751
|
+
199
|
752
|
+
200
|
753
|
+
201
|
754
|
+
202
|
755
|
+
203</pre>
|
710
756
|
</td>
|
711
757
|
<td>
|
712
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
758
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 154</span>
|
713
759
|
|
714
|
-
<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>
|
760
|
+
<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>
|
715
761
|
<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>
|
716
762
|
|
717
763
|
<span class='kw'>begin</span>
|
@@ -719,8 +765,12 @@ command line wrapping</p>
|
|
719
765
|
<span class='id identifier rubyid_cpuset'>cpuset</span> <span class='op'>=</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>
|
720
766
|
<span class='kw'>end</span>
|
721
767
|
|
768
|
+
<span class='kw'>if</span> <span class='kw'>false</span> <span class='op'>==</span> <span class='gvar'>$vserver_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>
|
769
|
+
<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>
|
770
|
+
<span class='kw'>end</span>
|
771
|
+
|
722
772
|
<span class='id identifier rubyid_new_context'>new_context</span> <span class='op'>=</span> <span class='id identifier rubyid_highest_context'>highest_context</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>1</span>
|
723
|
-
<span class='id identifier rubyid_cmd'>cmd</span> <span class='op'>=</span> <span class='gvar'>$vserver_cmd_create</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='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'>[ip_address]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_ip_address'>ip_address</span><span class='rparen'>)</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'>[context]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_new_context'>new_context</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
773
|
+
<span class='id identifier rubyid_cmd'>cmd</span> <span class='op'>=</span> <span class='gvar'>$vserver_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='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'>[ip_address]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_ip_address'>ip_address</span><span class='rparen'>)</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'>[context]</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_new_context'>new_context</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
724
774
|
|
725
775
|
<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='id identifier rubyid_cmd'>cmd</span><span class='rparen'>)</span>
|
726
776
|
|
@@ -732,11 +782,13 @@ command line wrapping</p>
|
|
732
782
|
<span class='kw'>end</span>
|
733
783
|
|
734
784
|
<span class='comment'># memory limit
|
735
|
-
</span> <span class='
|
736
|
-
|
737
|
-
|
785
|
+
</span> <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>
|
786
|
+
<span class='id identifier rubyid_memory_limit_bytes'>memory_limit_bytes</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> <span class='op'>*</span> <span class='int'>1024</span> <span class='op'>*</span> <span class='int'>1024</span>
|
787
|
+
<span class='id identifier rubyid_page_size'>page_size</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='embexpr_beg'>#{</span><span class='gvar'>$page_size_cmd</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
788
|
+
<span class='id identifier rubyid_memory_limit_pages'>memory_limit_pages</span> <span class='op'>=</span> <span class='id identifier rubyid_memory_limit_bytes'>memory_limit_bytes</span> <span class='op'>/</span> <span class='id identifier rubyid_page_size'>page_size</span>
|
738
789
|
|
739
|
-
|
790
|
+
<span class='id identifier rubyid_write_config_file'>write_config_file</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/rlimits/rss.hard</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_memory_limit_pages'>memory_limit_pages</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
791
|
+
<span class='kw'>end</span>
|
740
792
|
|
741
793
|
<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>
|
742
794
|
<span class='comment'># cpu core limit
|
@@ -837,20 +889,20 @@ command line wrapping</p>
|
|
837
889
|
<pre class="lines">
|
838
890
|
|
839
891
|
|
840
|
-
104
|
841
|
-
105
|
842
|
-
106
|
843
|
-
107
|
844
892
|
108
|
845
893
|
109
|
846
894
|
110
|
847
895
|
111
|
848
896
|
112
|
849
897
|
113
|
850
|
-
114
|
898
|
+
114
|
899
|
+
115
|
900
|
+
116
|
901
|
+
117
|
902
|
+
118</pre>
|
851
903
|
</td>
|
852
904
|
<td>
|
853
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
905
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 108</span>
|
854
906
|
|
855
907
|
<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>
|
856
908
|
<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'>$vserver_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>
|
@@ -932,12 +984,12 @@ command line wrapping</p>
|
|
932
984
|
<pre class="lines">
|
933
985
|
|
934
986
|
|
935
|
-
|
936
|
-
|
937
|
-
|
987
|
+
210
|
988
|
+
211
|
989
|
+
212</pre>
|
938
990
|
</td>
|
939
991
|
<td>
|
940
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
992
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 210</span>
|
941
993
|
|
942
994
|
<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>
|
943
995
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_container_names'>container_names</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>
|
@@ -1011,12 +1063,12 @@ command line wrapping</p>
|
|
1011
1063
|
<pre class="lines">
|
1012
1064
|
|
1013
1065
|
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1066
|
+
219
|
1067
|
+
220
|
1068
|
+
221</pre>
|
1017
1069
|
</td>
|
1018
1070
|
<td>
|
1019
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
1071
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 219</span>
|
1020
1072
|
|
1021
1073
|
<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>
|
1022
1074
|
<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>
|
@@ -1103,12 +1155,12 @@ command line wrapping</p>
|
|
1103
1155
|
<pre class="lines">
|
1104
1156
|
|
1105
1157
|
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1158
|
+
97
|
1159
|
+
98
|
1160
|
+
99</pre>
|
1109
1161
|
</td>
|
1110
1162
|
<td>
|
1111
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
1163
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 97</span>
|
1112
1164
|
|
1113
1165
|
<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>
|
1114
1166
|
<span class='kw'>return</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>
|
@@ -1195,20 +1247,20 @@ command line wrapping</p>
|
|
1195
1247
|
<pre class="lines">
|
1196
1248
|
|
1197
1249
|
|
1198
|
-
50
|
1199
|
-
51
|
1200
|
-
52
|
1201
|
-
53
|
1202
1250
|
54
|
1203
1251
|
55
|
1204
1252
|
56
|
1205
1253
|
57
|
1206
1254
|
58
|
1207
1255
|
59
|
1208
|
-
60
|
1256
|
+
60
|
1257
|
+
61
|
1258
|
+
62
|
1259
|
+
63
|
1260
|
+
64</pre>
|
1209
1261
|
</td>
|
1210
1262
|
<td>
|
1211
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
1263
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 54</span>
|
1212
1264
|
|
1213
1265
|
<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>
|
1214
1266
|
<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'>$vserver_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>
|
@@ -1303,10 +1355,6 @@ command line wrapping</p>
|
|
1303
1355
|
<pre class="lines">
|
1304
1356
|
|
1305
1357
|
|
1306
|
-
69
|
1307
|
-
70
|
1308
|
-
71
|
1309
|
-
72
|
1310
1358
|
73
|
1311
1359
|
74
|
1312
1360
|
75
|
@@ -1318,10 +1366,14 @@ command line wrapping</p>
|
|
1318
1366
|
81
|
1319
1367
|
82
|
1320
1368
|
83
|
1321
|
-
84
|
1369
|
+
84
|
1370
|
+
85
|
1371
|
+
86
|
1372
|
+
87
|
1373
|
+
88</pre>
|
1322
1374
|
</td>
|
1323
1375
|
<td>
|
1324
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line
|
1376
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 73</span>
|
1325
1377
|
|
1326
1378
|
<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>
|
1327
1379
|
<span class='kw'>if</span> <span class='id identifier rubyid_state'>state</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>STOPPED</span><span class='tstring_end'>'</span></span>
|
@@ -1342,6 +1394,65 @@ command line wrapping</p>
|
|
1342
1394
|
</td>
|
1343
1395
|
</tr>
|
1344
1396
|
</table>
|
1397
|
+
</div>
|
1398
|
+
|
1399
|
+
<div class="method_details ">
|
1400
|
+
<h3 class="signature " id="supported_templates-instance_method">
|
1401
|
+
|
1402
|
+
- (<tt>Hash</tt>) <strong>supported_templates</strong>
|
1403
|
+
|
1404
|
+
|
1405
|
+
|
1406
|
+
|
1407
|
+
|
1408
|
+
</h3><div class="docstring">
|
1409
|
+
<div class="discussion">
|
1410
|
+
|
1411
|
+
<p>Returns a list of supported templates</p>
|
1412
|
+
|
1413
|
+
|
1414
|
+
</div>
|
1415
|
+
</div>
|
1416
|
+
<div class="tags">
|
1417
|
+
|
1418
|
+
<p class="tag_title">Returns:</p>
|
1419
|
+
<ul class="return">
|
1420
|
+
|
1421
|
+
<li>
|
1422
|
+
|
1423
|
+
|
1424
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1425
|
+
|
1426
|
+
|
1427
|
+
|
1428
|
+
—
|
1429
|
+
<div class='inline'>
|
1430
|
+
<p>List of supported templates</p>
|
1431
|
+
</div>
|
1432
|
+
|
1433
|
+
</li>
|
1434
|
+
|
1435
|
+
</ul>
|
1436
|
+
|
1437
|
+
</div><table class="source_code">
|
1438
|
+
<tr>
|
1439
|
+
<td>
|
1440
|
+
<pre class="lines">
|
1441
|
+
|
1442
|
+
|
1443
|
+
226
|
1444
|
+
227
|
1445
|
+
228</pre>
|
1446
|
+
</td>
|
1447
|
+
<td>
|
1448
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/container_manager_adapter/vserver.rb', line 226</span>
|
1449
|
+
|
1450
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_supported_templates'>supported_templates</span>
|
1451
|
+
<span class='gvar'>$vserver_cmd_create</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
|
1452
|
+
<span class='kw'>end</span></pre>
|
1453
|
+
</td>
|
1454
|
+
</tr>
|
1455
|
+
</table>
|
1345
1456
|
</div>
|
1346
1457
|
|
1347
1458
|
</div>
|
@@ -1349,7 +1460,7 @@ command line wrapping</p>
|
|
1349
1460
|
</div>
|
1350
1461
|
|
1351
1462
|
<div id="footer">
|
1352
|
-
Generated on
|
1463
|
+
Generated on Sun Oct 25 20:54:55 2015 by
|
1353
1464
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1354
1465
|
0.8.7.6 (ruby-2.0.0).
|
1355
1466
|
</div>
|
@@ -105,29 +105,33 @@
|
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
107
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
108
|
-
__
|
109
|
-
<em>_</em> / <em>_</em>| / |</p>
|
108
|
+
__</p>
|
110
109
|
|
111
|
-
<pre class="code ruby"><code class="ruby">\ \
|
112
|
-
\
|
113
|
-
\
|
110
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
111
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
112
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
113
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
114
114
|
Container Manager</code></pre>
|
115
115
|
|
116
|
-
<p>Copyright
|
116
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
117
117
|
|
118
|
-
<p>
|
119
|
-
|
120
|
-
|
121
|
-
|
118
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
119
|
+
copy of this software and associated documentation files (the “Software”),
|
120
|
+
to deal in the Software without restriction, including without limitation
|
121
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
122
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
123
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
122
124
|
|
123
|
-
<p>
|
124
|
-
|
125
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
126
|
-
more details.</p>
|
125
|
+
<p>The above copyright notice and this permission notice shall be included in
|
126
|
+
all copies or substantial portions of the Software.</p>
|
127
127
|
|
128
|
-
<p>
|
129
|
-
|
130
|
-
|
128
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
129
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
130
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
131
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
132
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
133
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
134
|
+
DEALINGS IN THE SOFTWARE.</p>
|
131
135
|
|
132
136
|
|
133
137
|
</div>
|
@@ -148,7 +152,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
148
152
|
</div>
|
149
153
|
|
150
154
|
<div id="footer">
|
151
|
-
Generated on
|
155
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
152
156
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
153
157
|
0.8.7.6 (ruby-2.0.0).
|
154
158
|
</div>
|