foreman_fog_proxmox 0.10.2 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of foreman_fog_proxmox might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +61 -13
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm_server.js +0 -22
- data/app/helpers/proxmox_compute_selectors_helper.rb +14 -0
- data/app/helpers/proxmox_server_helper.rb +2 -6
- data/app/helpers/proxmox_vm_helper.rb +2 -10
- data/app/models/concerns/fog_extensions/proxmox/server.rb +1 -0
- data/app/models/foreman_fog_proxmox/proxmox_compute_attributes.rb +14 -1
- data/app/models/foreman_fog_proxmox/proxmox_connection.rb +1 -1
- data/app/models/foreman_fog_proxmox/proxmox_operating_systems.rb +1 -1
- data/app/models/foreman_fog_proxmox/proxmox_pools.rb +56 -0
- data/app/models/foreman_fog_proxmox/proxmox_vm_commands.rb +5 -1
- data/app/models/foreman_fog_proxmox/proxmox_vm_new.rb +4 -4
- data/app/models/foreman_fog_proxmox/proxmox_vm_queries.rb +6 -7
- data/app/views/api/v2/compute_resources/proxmox.json.rabl +1 -1
- data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_nic_provider_specific_form.html.erb +2 -2
- data/app/views/compute_resources_vms/form/proxmox/_general.html.erb +1 -0
- data/app/views/compute_resources_vms/form/proxmox/server/_config.html.erb +4 -4
- data/app/views/compute_resources_vms/show/_proxmox.html.erb +1 -0
- data/lib/foreman_fog_proxmox/engine.rb +2 -2
- data/lib/foreman_fog_proxmox/version.rb +1 -1
- data/locale/en/foreman_fog_proxmox.po +18 -3
- data/locale/foreman_fog_proxmox.pot +48 -28
- data/locale/fr/foreman_fog_proxmox.po +18 -3
- data/test/factories/foreman_fog_proxmox/proxmox_node_mock_factory.rb +6 -0
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb +4 -4
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb +10 -9
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb +1 -1
- data/test/unit/foreman_fog_proxmox/proxmox_compute_attributes_test.rb +10 -2
- data/test/unit/foreman_fog_proxmox/proxmox_version_test.rb +4 -4
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_container_test.rb +14 -0
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_create_test.rb +29 -1
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_test.rb +91 -0
- data/test/unit/foreman_fog_proxmox/proxmox_vm_queries_test.rb +7 -2
- data/test/unit/foreman_fog_proxmox/semver_test.rb +3 -5
- metadata +21 -24
- data/locale/en/foreman_fog_proxmox.edit.po +0 -508
- data/locale/en/foreman_fog_proxmox.po.time_stamp +0 -0
- data/locale/fr/foreman_fog_proxmox.edit.po +0 -508
- data/locale/fr/foreman_fog_proxmox.po.time_stamp +0 -0
@@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License
|
|
16
16
|
along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
17
17
|
<% if @host.compute_resource.class == ForemanFogProxmox::Proxmox %>
|
18
18
|
<% compute_attributes = f.object.compute_attributes %>
|
19
|
-
<% vm_type =
|
20
|
-
<% node_id = node_id
|
19
|
+
<% vm_type = f.object.respond_to?('type') ? f.object.type : nil %>
|
20
|
+
<% node_id = f.object.respond_to?('node_id') ? f.object.node_id : nil %>
|
21
21
|
|
22
22
|
<%= f.fields_for 'compute_attributes', OpenStruct.new(f.object.compute_attributes) do |f| %>
|
23
23
|
<%= render provider_partial(@host.compute_resource, 'network'), :f => f, :vm_type => vm_type, :node_id => node_id, :disabled => f.object.persisted?, :compute_resource => @host.compute_resource, :new_host => new_vm, :new_vm => new_vm %>
|
@@ -35,4 +35,5 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
35
35
|
:label_size => "col-md-2" %>
|
36
36
|
</div>
|
37
37
|
<% end %>
|
38
|
+
<%= select_f f, :pool, compute_resource.pools, :poolid, :poolid, { :include_blank => true }, :label => _('Pool'), :label_size => "col-md-2", :required => false %>
|
38
39
|
<% end %>
|
@@ -27,6 +27,8 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
27
27
|
<%= checkbox_f f, :kvm, :label => _('KVM'), :label_help => _('Enable/disable KVM hardware virtualization') %>
|
28
28
|
<%= select_f f, :keyboard, proxmox_keyboards_map, :id, :name, { }, :label => _('Keyboard'), :label_size => "col-md-2" %>
|
29
29
|
<%= select_f f, :vga, proxmox_vgas_map, :id, :name, { :include_blank => true }, :label => _('VGA'), :label_size => "col-md-2" %>
|
30
|
+
<%= select_f f, :scsihw, proxmox_scsi_controllers_map, :id, :name, { }, :label => _('SCSI Controller'), :label_size => "col-md-2" %>
|
31
|
+
<%= select_f f, :bios, proxmox_bios_map, :id, :name, { }, :label => _('BIOS'), :label_size => "col-md-2" %>
|
30
32
|
<% end %>
|
31
33
|
<%= field_set_tag _("CPU"), :id => "server_config_cpu", :class => 'hide', :disabled => !server do %>
|
32
34
|
<%= select_f f, :cpu_type, proxmox_cpus_map, :id, :name, { }, :label => _('Type'), :label_size => "col-md-2" %>
|
@@ -40,11 +42,9 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
40
42
|
<%= checkbox_f f, :spectre, :label => _('Spectre-CTRL') %>
|
41
43
|
<% end %>
|
42
44
|
<%= field_set_tag _("Memory"), :id => "server_config_memory", :class => 'hide', :disabled => !server do %>
|
43
|
-
<% ballooned = f.object.balloon == 1 %>
|
44
45
|
<%= byte_size_f f, :memory, :class => "input-mini", :label => _('Memory'), :label_size => "col-md-2" %>
|
45
|
-
<%= byte_size_f f, :
|
46
|
-
<%= counter_f f, :shares, :class => "input-mini", :label => _('Shares'), :label_size => "col-md-2"
|
47
|
-
<%= checkbox_f f, :balloon, :label => _('Ballooning Device'), :onchange => 'balloonSelected(this)' %>
|
46
|
+
<%= byte_size_f f, :balloon, :class => "input-mini", :label => _('Minimum memory'), :label_size => "col-md-2" %>
|
47
|
+
<%= counter_f f, :shares, :class => "input-mini", :label => _('Shares'), :label_size => "col-md-2" %>
|
48
48
|
<% end %>
|
49
49
|
<%= field_set_tag _("CD-ROM"), :id => "server_config_cdrom", :class => 'hide', :disabled => !server do %>
|
50
50
|
<%= radio_button_f f, :cdrom, :value => 'none', :text => _('None'), :onclick => 'cdromSelected(this)' %>
|
@@ -45,8 +45,8 @@ module ForemanFogProxmox
|
|
45
45
|
# add dashboard widget
|
46
46
|
widget 'foreman_fog_proxmox_widget', name: N_('Foreman Fog Proxmox widget'), sizex: 8, sizey: 1
|
47
47
|
security_block :foreman_fog_proxmox do
|
48
|
-
permission :view_compute_resource,
|
49
|
-
[:ostemplates_by_node_and_storage, :isos_by_node_and_storage, :ostemplates_by_node, :isos_by_node, :storages_by_node, :iso_storages_by_node, :bridges_by_node]
|
48
|
+
permission :view_compute_resource, { :"foreman_fog_proxmox/compute_resources" =>
|
49
|
+
[:ostemplates_by_node_and_storage, :isos_by_node_and_storage, :ostemplates_by_node, :isos_by_node, :storages_by_node, :iso_storages_by_node, :bridges_by_node] }
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -32,9 +32,6 @@ msgstr ""
|
|
32
32
|
msgid "Average load (x100)"
|
33
33
|
msgstr ""
|
34
34
|
|
35
|
-
msgid "Ballooning Device"
|
36
|
-
msgstr ""
|
37
|
-
|
38
35
|
msgid "Boot device order"
|
39
36
|
msgstr ""
|
40
37
|
|
@@ -238,6 +235,9 @@ msgstr ""
|
|
238
235
|
msgid "Physical"
|
239
236
|
msgstr ""
|
240
237
|
|
238
|
+
msgid "Pool"
|
239
|
+
msgstr ""
|
240
|
+
|
241
241
|
msgid "Power"
|
242
242
|
msgstr ""
|
243
243
|
|
@@ -265,6 +265,9 @@ msgstr ""
|
|
265
265
|
msgid "Rootfs"
|
266
266
|
msgstr ""
|
267
267
|
|
268
|
+
msgid "SCSI Controller"
|
269
|
+
msgstr ""
|
270
|
+
|
268
271
|
msgid "SSL verify peer"
|
269
272
|
msgstr ""
|
270
273
|
|
@@ -349,6 +352,9 @@ msgstr ""
|
|
349
352
|
msgid "add new storage volume"
|
350
353
|
msgstr ""
|
351
354
|
|
355
|
+
msgid "add_vm_to_pool(%<poolid>s, %<vmid>s)"
|
356
|
+
msgstr ""
|
357
|
+
|
352
358
|
msgid "create_vm(): clone %<image_id>s in %<vmid>s"
|
353
359
|
msgstr ""
|
354
360
|
|
@@ -364,6 +370,9 @@ msgstr ""
|
|
364
370
|
msgid "failed to create vm: %<e>s"
|
365
371
|
msgstr ""
|
366
372
|
|
373
|
+
msgid "found vm: %<vmid>s member of pool: %<poolid>s"
|
374
|
+
msgstr ""
|
375
|
+
|
367
376
|
msgid "invalid vmid=%<vmid>s"
|
368
377
|
msgstr ""
|
369
378
|
|
@@ -376,11 +385,17 @@ msgstr ""
|
|
376
385
|
msgid "new_vm() vm.config=%<config>s"
|
377
386
|
msgstr ""
|
378
387
|
|
388
|
+
msgid "pool_owner(%<vmid>s)"
|
389
|
+
msgstr ""
|
390
|
+
|
379
391
|
msgid "remove network interface"
|
380
392
|
msgstr ""
|
381
393
|
|
382
394
|
msgid "remove storage volume"
|
383
395
|
msgstr ""
|
384
396
|
|
397
|
+
msgid "remove_vm_from_pool(%<poolid>s, %<vmid>s)"
|
398
|
+
msgstr ""
|
399
|
+
|
385
400
|
msgid "vmid of template vm."
|
386
401
|
msgstr ""
|
@@ -8,8 +8,8 @@ msgid ""
|
|
8
8
|
msgstr ""
|
9
9
|
"Project-Id-Version: foreman_fog_proxmox 1.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
|
-
"POT-Creation-Date: 2020-
|
12
|
-
"PO-Revision-Date: 2020-
|
11
|
+
"POT-Creation-Date: 2020-05-11 16:25+0200\n"
|
12
|
+
"PO-Revision-Date: 2020-05-11 16:25+0200\n"
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
15
|
"Language: \n"
|
@@ -66,6 +66,22 @@ msgstr ""
|
|
66
66
|
msgid "create_vm(): clone %<image_id>s in %<vmid>s"
|
67
67
|
msgstr ""
|
68
68
|
|
69
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:28
|
70
|
+
msgid "pool_owner(%<vmid>s)"
|
71
|
+
msgstr ""
|
72
|
+
|
73
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:31
|
74
|
+
msgid "found vm: %<vmid>s member of pool: %<poolid>s"
|
75
|
+
msgstr ""
|
76
|
+
|
77
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:36
|
78
|
+
msgid "add_vm_to_pool(%<poolid>s, %<vmid>s)"
|
79
|
+
msgstr ""
|
80
|
+
|
81
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:42
|
82
|
+
msgid "remove_vm_from_pool(%<poolid>s, %<vmid>s)"
|
83
|
+
msgstr ""
|
84
|
+
|
69
85
|
#: ../app/models/foreman_fog_proxmox/proxmox_version.rb:25
|
70
86
|
msgid "Proxmox compute resource version is %<version>s"
|
71
87
|
msgstr ""
|
@@ -74,11 +90,11 @@ msgstr ""
|
|
74
90
|
msgid "Proxmox version %<version>s is not semver suitable"
|
75
91
|
msgstr ""
|
76
92
|
|
77
|
-
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:
|
93
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:35
|
78
94
|
msgid "invalid vmid=%<vmid>s"
|
79
95
|
msgstr ""
|
80
96
|
|
81
|
-
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:
|
97
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:54
|
82
98
|
msgid "failed to create vm: %<e>s"
|
83
99
|
msgstr ""
|
84
100
|
|
@@ -94,7 +110,7 @@ msgstr ""
|
|
94
110
|
msgid "new_server_vm() vm.config=%<config>s"
|
95
111
|
msgstr ""
|
96
112
|
|
97
|
-
#: ../app/models/foreman_fog_proxmox/proxmox_vm_queries.rb:
|
113
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_vm_queries.rb:71
|
98
114
|
msgid "Failed retrieving proxmox server vm by vmid=%<vmid>s"
|
99
115
|
msgstr ""
|
100
116
|
|
@@ -186,7 +202,7 @@ msgid "add new storage volume"
|
|
186
202
|
msgstr ""
|
187
203
|
|
188
204
|
#: ../app/views/compute_resources_vms/form/proxmox/_base.html.erb:6
|
189
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
205
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:18
|
190
206
|
#: ../app/views/compute_resources_vms/index/_proxmox.html.erb:8
|
191
207
|
msgid "Type"
|
192
208
|
msgstr ""
|
@@ -213,10 +229,14 @@ msgid "Start after creation?"
|
|
213
229
|
msgstr ""
|
214
230
|
|
215
231
|
#: ../app/views/compute_resources_vms/form/proxmox/_general.html.erb:19
|
216
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
232
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:36
|
217
233
|
msgid "Image"
|
218
234
|
msgstr ""
|
219
235
|
|
236
|
+
#: ../app/views/compute_resources_vms/form/proxmox/_general.html.erb:23
|
237
|
+
msgid "Pool"
|
238
|
+
msgstr ""
|
239
|
+
|
220
240
|
#:
|
221
241
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:5
|
222
242
|
#: ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:5
|
@@ -237,7 +257,7 @@ msgstr[1] ""
|
|
237
257
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:8
|
238
258
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:9
|
239
259
|
#: ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:8
|
240
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
260
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:17
|
241
261
|
msgid "CPU"
|
242
262
|
msgstr ""
|
243
263
|
|
@@ -246,7 +266,7 @@ msgstr ""
|
|
246
266
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:15
|
247
267
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:16
|
248
268
|
#: ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:10
|
249
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
269
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:28
|
250
270
|
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:29
|
251
271
|
#: ../app/views/compute_resources_vms/index/_proxmox.html.erb:10
|
252
272
|
msgid "Memory"
|
@@ -281,19 +301,19 @@ msgstr ""
|
|
281
301
|
|
282
302
|
#:
|
283
303
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:11
|
284
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
304
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:20
|
285
305
|
msgid "Cores"
|
286
306
|
msgstr ""
|
287
307
|
|
288
308
|
#:
|
289
309
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:12
|
290
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
310
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:22
|
291
311
|
msgid "CPU limit"
|
292
312
|
msgstr ""
|
293
313
|
|
294
314
|
#:
|
295
315
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:13
|
296
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
316
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:23
|
297
317
|
msgid "CPU units"
|
298
318
|
msgstr ""
|
299
319
|
|
@@ -319,13 +339,13 @@ msgstr ""
|
|
319
339
|
|
320
340
|
#:
|
321
341
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:24
|
322
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
342
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:42
|
323
343
|
msgid "Operating System"
|
324
344
|
msgstr ""
|
325
345
|
|
326
346
|
#:
|
327
347
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:25
|
328
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
348
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:43
|
329
349
|
msgid "OS type"
|
330
350
|
msgstr ""
|
331
351
|
|
@@ -417,7 +437,7 @@ msgstr ""
|
|
417
437
|
#:
|
418
438
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb:8
|
419
439
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb:7
|
420
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
440
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:38
|
421
441
|
#: ../app/views/compute_resources_vms/form/proxmox/server/_volume.html.erb:8
|
422
442
|
msgid "Storage"
|
423
443
|
msgstr ""
|
@@ -482,23 +502,27 @@ msgstr ""
|
|
482
502
|
msgid "VGA"
|
483
503
|
msgstr ""
|
484
504
|
|
485
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
505
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:15
|
506
|
+
msgid "SCSI Controller"
|
507
|
+
msgstr ""
|
508
|
+
|
509
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:19
|
486
510
|
msgid "Sockets"
|
487
511
|
msgstr ""
|
488
512
|
|
489
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
513
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:21
|
490
514
|
msgid "VCPUs"
|
491
515
|
msgstr ""
|
492
516
|
|
493
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
517
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:24
|
494
518
|
msgid "Enable NUMA"
|
495
519
|
msgstr ""
|
496
520
|
|
497
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
521
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:25
|
498
522
|
msgid "PCID"
|
499
523
|
msgstr ""
|
500
524
|
|
501
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
525
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:26
|
502
526
|
msgid "Spectre-CTRL"
|
503
527
|
msgstr ""
|
504
528
|
|
@@ -510,23 +534,19 @@ msgstr ""
|
|
510
534
|
msgid "Shares"
|
511
535
|
msgstr ""
|
512
536
|
|
513
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
514
|
-
msgid "Ballooning Device"
|
515
|
-
msgstr ""
|
516
|
-
|
517
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:34
|
537
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:33
|
518
538
|
msgid "CD-ROM"
|
519
539
|
msgstr ""
|
520
540
|
|
521
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
541
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:34
|
522
542
|
msgid "None"
|
523
543
|
msgstr ""
|
524
544
|
|
525
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
545
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:35
|
526
546
|
msgid "Physical"
|
527
547
|
msgstr ""
|
528
548
|
|
529
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
549
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:39
|
530
550
|
msgid "Image ISO"
|
531
551
|
msgstr ""
|
532
552
|
|
@@ -32,9 +32,6 @@ msgstr ""
|
|
32
32
|
msgid "Average load (x100)"
|
33
33
|
msgstr "Charge moyenne du serveur (x100)"
|
34
34
|
|
35
|
-
msgid "Ballooning Device"
|
36
|
-
msgstr "Périphérique à gonflement"
|
37
|
-
|
38
35
|
msgid "Boot device order"
|
39
36
|
msgstr ""
|
40
37
|
|
@@ -238,6 +235,9 @@ msgstr "Chemin"
|
|
238
235
|
msgid "Physical"
|
239
236
|
msgstr "Physique"
|
240
237
|
|
238
|
+
msgid "Pool"
|
239
|
+
msgstr ""
|
240
|
+
|
241
241
|
msgid "Power"
|
242
242
|
msgstr "Alimentation"
|
243
243
|
|
@@ -265,6 +265,9 @@ msgstr "Mot de passe root"
|
|
265
265
|
msgid "Rootfs"
|
266
266
|
msgstr ""
|
267
267
|
|
268
|
+
msgid "SCSI Controller"
|
269
|
+
msgstr ""
|
270
|
+
|
268
271
|
msgid "SSL verify peer"
|
269
272
|
msgstr ""
|
270
273
|
|
@@ -349,6 +352,9 @@ msgstr "Autorités de certification X509"
|
|
349
352
|
msgid "add new storage volume"
|
350
353
|
msgstr "ajouter un nouveau volume de stockage"
|
351
354
|
|
355
|
+
msgid "add_vm_to_pool(%<poolid>s, %<vmid>s)"
|
356
|
+
msgstr ""
|
357
|
+
|
352
358
|
msgid "create_vm(): clone %<image_id>s in %<vmid>s"
|
353
359
|
msgstr ""
|
354
360
|
|
@@ -364,6 +370,9 @@ msgstr "par exemple root@pam"
|
|
364
370
|
msgid "failed to create vm: %<e>s"
|
365
371
|
msgstr "échec à la création de la VM: %<e>s"
|
366
372
|
|
373
|
+
msgid "found vm: %<vmid>s member of pool: %<poolid>s"
|
374
|
+
msgstr ""
|
375
|
+
|
367
376
|
msgid "invalid vmid=%<vmid>s"
|
368
377
|
msgstr "vmid=%<vmid>s incorrect"
|
369
378
|
|
@@ -376,11 +385,17 @@ msgstr ""
|
|
376
385
|
msgid "new_vm() vm.config=%<config>s"
|
377
386
|
msgstr ""
|
378
387
|
|
388
|
+
msgid "pool_owner(%<vmid>s)"
|
389
|
+
msgstr ""
|
390
|
+
|
379
391
|
msgid "remove network interface"
|
380
392
|
msgstr "retirer l'interface réseau"
|
381
393
|
|
382
394
|
msgid "remove storage volume"
|
383
395
|
msgstr "retirer le stockage de volume"
|
384
396
|
|
397
|
+
msgid "remove_vm_from_pool(%<poolid>s, %<vmid>s)"
|
398
|
+
msgstr ""
|
399
|
+
|
385
400
|
msgid "vmid of template vm."
|
386
401
|
msgstr "vmid de la VM modèle."
|
@@ -75,6 +75,12 @@ module ForemanFogProxmox
|
|
75
75
|
client = mock('client')
|
76
76
|
client.stubs(:nodes).returns(nodes)
|
77
77
|
cr.stubs(:client).returns(client)
|
78
|
+
identity_client = mock('identity_client')
|
79
|
+
pools = mock('pools')
|
80
|
+
pools.stubs(:select).returns([])
|
81
|
+
pools.stubs(:all).returns([])
|
82
|
+
identity_client.stubs(:pools).returns(pools)
|
83
|
+
cr.stubs(:identity_client).returns(identity_client)
|
78
84
|
cr
|
79
85
|
end
|
80
86
|
end
|
@@ -187,17 +187,17 @@ module ForemanFogProxmox
|
|
187
187
|
deletes = []
|
188
188
|
nics = []
|
189
189
|
add_container_interface(host_delete['interfaces_attributes']['0'], deletes, nics)
|
190
|
-
|
190
|
+
assert_empty nics
|
191
191
|
assert_equal 1, deletes.length
|
192
192
|
assert_equal 'net0', deletes[0]
|
193
193
|
end
|
194
194
|
|
195
195
|
test '#interfaces' do
|
196
196
|
interfaces_to_add, interfaces_to_delete = parse_container_interfaces(host['interfaces_attributes'])
|
197
|
-
|
197
|
+
assert_empty interfaces_to_delete
|
198
198
|
assert_equal 2, interfaces_to_add.length
|
199
|
-
|
200
|
-
|
199
|
+
assert_includes interfaces_to_add, { net0: 'name=eth0,bridge=vmbr0,ip=dhcp,ip6=dhcp,gw=192.168.56.100,gw6=2001:0:1234::c1c0:abcd:876' }
|
200
|
+
assert_includes interfaces_to_add, { net1: 'name=eth1,bridge=vmbr0,ip=dhcp,ip6=dhcp,gw=192.168.56.100,gw6=2001:0:1234::c1c0:abcd:876' }
|
201
201
|
end
|
202
202
|
end
|
203
203
|
end
|
@@ -35,9 +35,8 @@ module ForemanFogProxmox
|
|
35
35
|
'type' => 'qemu',
|
36
36
|
'config_attributes' => {
|
37
37
|
'memory' => '536870912',
|
38
|
-
'
|
39
|
-
'
|
40
|
-
'shares' => '',
|
38
|
+
'balloon' => '268435456',
|
39
|
+
'shares' => '5',
|
41
40
|
'cpu_type' => 'kvm64',
|
42
41
|
'spectre' => '1',
|
43
42
|
'pcid' => '0',
|
@@ -83,6 +82,8 @@ module ForemanFogProxmox
|
|
83
82
|
assert_equal '1', vm['sockets']
|
84
83
|
assert_equal 'cputype=kvm64,flags=+spec-ctrl', vm[:cpu]
|
85
84
|
assert_equal 536_870_912, vm[:memory]
|
85
|
+
assert_equal 268_435_456, vm[:balloon]
|
86
|
+
assert_equal 5, vm[:shares]
|
86
87
|
assert_equal 'local-lvm:1073741824,cache=none', vm[:scsi0]
|
87
88
|
assert_equal 'model=virtio,bridge=vmbr0,firewall=0,link_down=0', vm[:net0]
|
88
89
|
assert_not vm.key?(:config)
|
@@ -111,7 +112,7 @@ module ForemanFogProxmox
|
|
111
112
|
interfaces_to_delete = []
|
112
113
|
interfaces_to_add = []
|
113
114
|
add_server_interface(host['interfaces_attributes']['0'], interfaces_to_delete, interfaces_to_add)
|
114
|
-
|
115
|
+
assert_empty interfaces_to_delete
|
115
116
|
assert_equal 1, interfaces_to_add.length
|
116
117
|
assert interfaces_to_add[0].key?(:net0)
|
117
118
|
assert_equal 'model=virtio,bridge=vmbr0,firewall=0,link_down=0', interfaces_to_add[0][:net0]
|
@@ -121,7 +122,7 @@ module ForemanFogProxmox
|
|
121
122
|
interfaces_to_delete = []
|
122
123
|
interfaces_to_add = []
|
123
124
|
add_server_interface(host['interfaces_attributes']['1'], interfaces_to_delete, interfaces_to_add)
|
124
|
-
|
125
|
+
assert_empty interfaces_to_delete
|
125
126
|
assert_equal 1, interfaces_to_add.length
|
126
127
|
assert interfaces_to_add[0].key?(:net1)
|
127
128
|
assert_equal 'model=e1000,bridge=vmbr0,firewall=0,link_down=0', interfaces_to_add[0][:net1]
|
@@ -131,17 +132,17 @@ module ForemanFogProxmox
|
|
131
132
|
interfaces_to_delete = []
|
132
133
|
interfaces_to_add = []
|
133
134
|
add_server_interface(host_delete['interfaces_attributes']['0'], interfaces_to_delete, interfaces_to_add)
|
134
|
-
|
135
|
+
assert_empty interfaces_to_add
|
135
136
|
assert_equal 1, interfaces_to_delete.length
|
136
137
|
assert_equal 'net0', interfaces_to_delete[0]
|
137
138
|
end
|
138
139
|
|
139
140
|
test '#interfaces' do
|
140
141
|
interfaces_to_add, interfaces_to_delete = parse_server_interfaces(host['interfaces_attributes'])
|
141
|
-
|
142
|
+
assert_empty interfaces_to_delete
|
142
143
|
assert_equal 2, interfaces_to_add.length
|
143
|
-
|
144
|
-
|
144
|
+
assert_includes interfaces_to_add, { net0: 'model=virtio,bridge=vmbr0,firewall=0,link_down=0' }
|
145
|
+
assert_includes interfaces_to_add, { net1: 'model=e1000,bridge=vmbr0,firewall=0,link_down=0' }
|
145
146
|
end
|
146
147
|
end
|
147
148
|
end
|