foreman_fog_proxmox 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +42 -29
- data/app/controllers/concerns/foreman_fog_proxmox/compute_resources_vms_controller.rb +17 -7
- data/app/controllers/concerns/foreman_fog_proxmox/controller/parameters/compute_resource.rb +1 -1
- data/app/controllers/concerns/foreman_fog_proxmox/hosts_controller.rb +8 -3
- data/app/controllers/foreman_fog_proxmox/compute_resources_controller.rb +6 -3
- data/app/helpers/proxmox_compute_controllers_helper.rb +2 -1
- data/app/helpers/proxmox_compute_resources_helper.rb +3 -3
- data/app/helpers/proxmox_compute_resources_vms_helper.rb +16 -7
- data/app/helpers/proxmox_form_helper.rb +9 -5
- data/app/helpers/proxmox_vm_config_helper.rb +16 -25
- data/app/helpers/proxmox_vm_interfaces_helper.rb +19 -6
- data/app/helpers/proxmox_vm_os_template_helper.rb +2 -5
- data/app/helpers/proxmox_vm_uuid_helper.rb +1 -1
- data/app/helpers/proxmox_vm_volumes_helper.rb +22 -25
- data/app/models/concerns/fog_extensions/proxmox/node.rb +2 -2
- data/app/models/concerns/fog_extensions/proxmox/server.rb +9 -5
- data/app/models/concerns/host_ext/proxmox/associator.rb +3 -2
- data/app/models/concerns/host_ext/proxmox/for_vm.rb +1 -1
- data/app/models/concerns/host_ext/proxmox/interfaces.rb +7 -3
- data/app/models/concerns/orchestration/proxmox/compute.rb +11 -4
- data/app/models/foreman_fog_proxmox/options_select.rb +1 -3
- data/app/models/foreman_fog_proxmox/proxmox.rb +12 -10
- data/app/models/foreman_fog_proxmox/proxmox_compute_attributes.rb +15 -3
- data/app/models/foreman_fog_proxmox/proxmox_connection.rb +6 -2
- data/app/models/foreman_fog_proxmox/proxmox_console.rb +3 -1
- data/app/models/foreman_fog_proxmox/proxmox_images.rb +2 -2
- data/app/models/foreman_fog_proxmox/proxmox_interfaces.rb +28 -6
- data/app/models/foreman_fog_proxmox/proxmox_operating_systems.rb +6 -1
- data/app/models/foreman_fog_proxmox/proxmox_pools.rb +4 -4
- data/app/models/foreman_fog_proxmox/proxmox_version.rb +7 -3
- data/app/models/foreman_fog_proxmox/proxmox_vm_commands.rb +9 -7
- data/app/models/foreman_fog_proxmox/proxmox_vm_new.rb +37 -24
- data/app/models/foreman_fog_proxmox/proxmox_vm_queries.rb +4 -5
- data/app/models/foreman_fog_proxmox/proxmox_volumes.rb +23 -12
- data/app/models/foreman_fog_proxmox/vms.rb +2 -2
- data/app/views/compute_resources_vms/form/proxmox/container/_config.html.erb +2 -2
- data/app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb +1 -1
- data/app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb +1 -1
- data/app/views/compute_resources_vms/form/proxmox/server/_config.html.erb +3 -3
- data/app/views/compute_resources_vms/form/proxmox/server/_volume_hard_disk.html.erb +1 -1
- data/config/routes.rb +8 -4
- data/db/migrate/20210312105013_update_proxmox_uuid_host.rb +1 -2
- data/lib/foreman_fog_proxmox/engine.rb +4 -3
- data/lib/foreman_fog_proxmox/semver.rb +1 -4
- data/lib/foreman_fog_proxmox/version.rb +1 -1
- data/locale/en/foreman_fog_proxmox.po +140 -47
- data/locale/foreman_fog_proxmox.pot +300 -137
- data/locale/fr/foreman_fog_proxmox.po +145 -52
- data/test/factories/foreman_fog_proxmox/proxmox_container_mock_factory.rb +6 -7
- data/test/factories/foreman_fog_proxmox/proxmox_server_mock_factory.rb +6 -7
- data/test/functional/compute_resources_controller_test.rb +4 -2
- data/test/test_plugin_helper.rb +12 -7
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb +38 -47
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb +49 -34
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb +29 -65
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_volumes_helper_test.rb +3 -3
- data/test/unit/foreman_fog_proxmox/proxmox_compute_attributes_test.rb +22 -13
- data/test/unit/foreman_fog_proxmox/proxmox_interfaces_test.rb +18 -9
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_container_test.rb +45 -35
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_create_test.rb +0 -4
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cdrom_test.rb +34 -22
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cloudinit_test.rb +20 -14
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_hard_disk_test.rb +76 -54
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_test.rb +26 -15
- data/test/unit/foreman_fog_proxmox/proxmox_vm_queries_test.rb +1 -1
- data/test/unit/foreman_fog_proxmox/semver_test.rb +2 -1
- metadata +35 -21
@@ -20,6 +20,24 @@ msgstr ""
|
|
20
20
|
msgid "%<s>s console is not supported at this time"
|
21
21
|
msgstr ""
|
22
22
|
|
23
|
+
msgid "%<vm>s is now %<vm_state>s"
|
24
|
+
msgstr ""
|
25
|
+
|
26
|
+
msgid "Access ticket fields"
|
27
|
+
msgstr ""
|
28
|
+
|
29
|
+
msgid "Add CD-ROM"
|
30
|
+
msgstr ""
|
31
|
+
|
32
|
+
msgid "Add Cloud-init"
|
33
|
+
msgstr ""
|
34
|
+
|
35
|
+
msgid "Add Hard Disk"
|
36
|
+
msgstr ""
|
37
|
+
|
38
|
+
msgid "Add Mount Point"
|
39
|
+
msgstr ""
|
40
|
+
|
23
41
|
msgid "Add Volume"
|
24
42
|
msgstr "Ajouter un volume"
|
25
43
|
|
@@ -29,9 +47,21 @@ msgstr "Avancé"
|
|
29
47
|
msgid "Architecture"
|
30
48
|
msgstr ""
|
31
49
|
|
50
|
+
msgid "Associate VM"
|
51
|
+
msgstr ""
|
52
|
+
|
53
|
+
msgid "Associate VM to a Foreman host"
|
54
|
+
msgstr ""
|
55
|
+
|
56
|
+
msgid "Authentication method"
|
57
|
+
msgstr ""
|
58
|
+
|
32
59
|
msgid "Average load (x100)"
|
33
60
|
msgstr "Charge moyenne du serveur (x100)"
|
34
61
|
|
62
|
+
msgid "BIOS"
|
63
|
+
msgstr ""
|
64
|
+
|
35
65
|
msgid "Boot device order"
|
36
66
|
msgstr ""
|
37
67
|
|
@@ -41,16 +71,16 @@ msgstr "Pont"
|
|
41
71
|
msgid "CD-ROM"
|
42
72
|
msgstr ""
|
43
73
|
|
44
|
-
msgid "
|
74
|
+
msgid "CIDR IPv4"
|
45
75
|
msgstr ""
|
46
76
|
|
47
|
-
msgid "CIDR
|
77
|
+
msgid "CIDR IPv6"
|
48
78
|
msgstr ""
|
49
79
|
|
50
|
-
msgid "
|
80
|
+
msgid "CPU"
|
51
81
|
msgstr ""
|
52
82
|
|
53
|
-
msgid "CPU"
|
83
|
+
msgid "CPU Flags"
|
54
84
|
msgstr ""
|
55
85
|
|
56
86
|
msgid "CPU limit"
|
@@ -71,9 +101,24 @@ msgstr "Carte"
|
|
71
101
|
msgid "Change the password"
|
72
102
|
msgstr "Changer le mot de passe"
|
73
103
|
|
104
|
+
msgid "Click Test connection button before changing it"
|
105
|
+
msgstr ""
|
106
|
+
|
107
|
+
msgid "Click Test connection button to check token"
|
108
|
+
msgstr ""
|
109
|
+
|
110
|
+
msgid "Cloud-init"
|
111
|
+
msgstr ""
|
112
|
+
|
74
113
|
msgid "Cluster nodes"
|
75
114
|
msgstr "Noeuds de la ferme"
|
76
115
|
|
116
|
+
msgid "Common fields"
|
117
|
+
msgstr ""
|
118
|
+
|
119
|
+
msgid "Console"
|
120
|
+
msgstr ""
|
121
|
+
|
77
122
|
msgid "Controller"
|
78
123
|
msgstr "Contrôleur"
|
79
124
|
|
@@ -92,9 +137,15 @@ msgstr ""
|
|
92
137
|
msgid "DNS"
|
93
138
|
msgstr ""
|
94
139
|
|
140
|
+
msgid "DNS domain"
|
141
|
+
msgstr ""
|
142
|
+
|
95
143
|
msgid "DNS server"
|
96
144
|
msgstr ""
|
97
145
|
|
146
|
+
msgid "DNS servers"
|
147
|
+
msgstr ""
|
148
|
+
|
98
149
|
msgid "Description"
|
99
150
|
msgstr ""
|
100
151
|
|
@@ -104,9 +155,6 @@ msgstr "Périphérque"
|
|
104
155
|
msgid "Disconnect"
|
105
156
|
msgstr "Se déconnecter"
|
106
157
|
|
107
|
-
msgid "Disk"
|
108
|
-
msgstr "Disque"
|
109
|
-
|
110
158
|
msgid "Does this image support user data input (e.g. via cloud-init)?"
|
111
159
|
msgstr "Cette immage gère-t-elle les données utilisateurs (par exemple via cloud-init)?"
|
112
160
|
|
@@ -116,19 +164,19 @@ msgstr "Activer NUMA"
|
|
116
164
|
msgid "Enable/disable KVM hardware virtualization"
|
117
165
|
msgstr "Activer/désactiver la virtualisation matérielle de KVM"
|
118
166
|
|
167
|
+
msgid "Error - %<message>s"
|
168
|
+
msgstr ""
|
169
|
+
|
119
170
|
msgid "Extended"
|
120
171
|
msgstr "Etendu"
|
121
172
|
|
122
|
-
msgid "Failed retrieving proxmox
|
173
|
+
msgid "Failed retrieving proxmox server vm by vmid=%<vmid>s"
|
123
174
|
msgstr ""
|
124
175
|
|
125
|
-
msgid "Failed
|
176
|
+
msgid "Failed to acquire IP addresses from compute resource for %<name>s"
|
126
177
|
msgstr ""
|
127
178
|
|
128
|
-
msgid "Failed
|
129
|
-
msgstr ""
|
130
|
-
|
131
|
-
msgid "Failed retrieving proxmox server vm by vmid=%<vmid>s"
|
179
|
+
msgid "Failed to set console: %s"
|
132
180
|
msgstr ""
|
133
181
|
|
134
182
|
msgid "Failed to undo update compute %<compute_resource>s instance %<name>s: %<e>s"
|
@@ -140,9 +188,6 @@ msgstr ""
|
|
140
188
|
msgid "Firewall"
|
141
189
|
msgstr "Pare-feu"
|
142
190
|
|
143
|
-
msgid "Floppy disk (a), hard disk (c), cdrom (d), network (n). Default cdn"
|
144
|
-
msgstr ""
|
145
|
-
|
146
191
|
msgid "Foreman Fog Proxmox widget"
|
147
192
|
msgstr ""
|
148
193
|
|
@@ -158,9 +203,18 @@ msgstr ""
|
|
158
203
|
msgid "General"
|
159
204
|
msgstr "Général"
|
160
205
|
|
206
|
+
msgid "Hard disk"
|
207
|
+
msgstr ""
|
208
|
+
|
209
|
+
msgid "Host"
|
210
|
+
msgstr ""
|
211
|
+
|
161
212
|
msgid "Hostname"
|
162
213
|
msgstr "Nom d'hôte"
|
163
214
|
|
215
|
+
msgid "Identifier"
|
216
|
+
msgstr ""
|
217
|
+
|
164
218
|
msgid "Image"
|
165
219
|
msgstr ""
|
166
220
|
|
@@ -170,17 +224,23 @@ msgstr ""
|
|
170
224
|
msgid "Image VMID"
|
171
225
|
msgstr ""
|
172
226
|
|
173
|
-
msgid "
|
227
|
+
msgid "Import as managed Host"
|
174
228
|
msgstr ""
|
175
229
|
|
176
|
-
msgid "
|
177
|
-
msgstr "
|
230
|
+
msgid "Import as unmanaged Host"
|
231
|
+
msgstr ""
|
232
|
+
|
233
|
+
msgid "KVM"
|
234
|
+
msgstr ""
|
178
235
|
|
179
236
|
msgid "Main option"
|
180
237
|
msgid_plural "Main options"
|
181
238
|
msgstr[0] "Option principale"
|
182
239
|
msgstr[1] "Options principales"
|
183
240
|
|
241
|
+
msgid "Media"
|
242
|
+
msgstr ""
|
243
|
+
|
184
244
|
msgid "Memory"
|
185
245
|
msgstr "Mémoire"
|
186
246
|
|
@@ -199,6 +259,9 @@ msgstr "Nom"
|
|
199
259
|
msgid "Nic"
|
200
260
|
msgstr ""
|
201
261
|
|
262
|
+
msgid "No host found to associate this VM with"
|
263
|
+
msgstr ""
|
264
|
+
|
202
265
|
msgid "Node"
|
203
266
|
msgstr "Noeud"
|
204
267
|
|
@@ -223,7 +286,10 @@ msgstr ""
|
|
223
286
|
msgid "Optionally provide a CA, or a correctly ordered CA chain. If left blank, disable ssl_verify_peer."
|
224
287
|
msgstr "Vous pouvez éventuellement fournir un certificat ou une chaîne de certificats. Si non renseigné, alors désactivez ssl_verify_peer."
|
225
288
|
|
226
|
-
msgid "
|
289
|
+
msgid "Order your devices, e.g. order=net0;ide2;scsi0. Default empty (any)"
|
290
|
+
msgstr ""
|
291
|
+
|
292
|
+
msgid "Password"
|
227
293
|
msgstr ""
|
228
294
|
|
229
295
|
msgid "Password to authenticate with - used for SSH finish step."
|
@@ -244,9 +310,6 @@ msgstr "Alimentation"
|
|
244
310
|
msgid "Proxmox Node Statistics: %s"
|
245
311
|
msgstr "Statistiques du noeud Proxmox: %s"
|
246
312
|
|
247
|
-
msgid "Proxmox compute resource version is %<version>s"
|
248
|
-
msgstr ""
|
249
|
-
|
250
313
|
msgid "Proxmox version %<version>s is not semver suitable"
|
251
314
|
msgstr ""
|
252
315
|
|
@@ -256,9 +319,6 @@ msgstr "Agent Qemu"
|
|
256
319
|
msgid "Rate limit"
|
257
320
|
msgstr "Taux limite"
|
258
321
|
|
259
|
-
msgid "Renew expired token ?"
|
260
|
-
msgstr "Renouveler jeton expiré?"
|
261
|
-
|
262
322
|
msgid "Root password"
|
263
323
|
msgstr "Mot de passe root"
|
264
324
|
|
@@ -268,6 +328,12 @@ msgstr ""
|
|
268
328
|
msgid "SCSI Controller"
|
269
329
|
msgstr ""
|
270
330
|
|
331
|
+
msgid "SSH public key"
|
332
|
+
msgstr ""
|
333
|
+
|
334
|
+
msgid "SSL fields"
|
335
|
+
msgstr ""
|
336
|
+
|
271
337
|
msgid "SSL verify peer"
|
272
338
|
msgstr ""
|
273
339
|
|
@@ -283,9 +349,6 @@ msgstr "Taille"
|
|
283
349
|
msgid "Sockets"
|
284
350
|
msgstr ""
|
285
351
|
|
286
|
-
msgid "Spectre-CTRL"
|
287
|
-
msgstr ""
|
288
|
-
|
289
352
|
msgid "Start after creation?"
|
290
353
|
msgstr "Démarrer après création?"
|
291
354
|
|
@@ -301,24 +364,18 @@ msgstr ""
|
|
301
364
|
msgid "Template storage"
|
302
365
|
msgstr "Modèle de stockage"
|
303
366
|
|
304
|
-
msgid "Test failed"
|
305
|
-
msgstr "Le test a échoué"
|
306
|
-
|
307
367
|
msgid "The user that is used to ssh into the instance, normally cloud-user, ubuntu, root etc"
|
308
368
|
msgstr "Le compte utilisé pour SSH, en général compte cloud, ubuntu ou root, etc"
|
309
369
|
|
310
370
|
msgid "Time"
|
311
371
|
msgstr "Temps"
|
312
372
|
|
313
|
-
msgid "Token expires on"
|
314
|
-
msgstr "Jeton expire le "
|
315
|
-
|
316
|
-
msgid "Token has expired?"
|
317
|
-
msgstr "Jeton expiré?"
|
318
|
-
|
319
373
|
msgid "Type"
|
320
374
|
msgstr ""
|
321
375
|
|
376
|
+
msgid "Type %<type>s, node %<node>s, %<cpus>s CPUs and %<memory>s MB memory"
|
377
|
+
msgstr ""
|
378
|
+
|
322
379
|
msgid "URL"
|
323
380
|
msgstr ""
|
324
381
|
|
@@ -331,6 +388,21 @@ msgstr "Impossible d'enregistrer les certificats X509"
|
|
331
388
|
msgid "Uptime"
|
332
389
|
msgstr "En marche depuis (s)"
|
333
390
|
|
391
|
+
msgid "User"
|
392
|
+
msgstr ""
|
393
|
+
|
394
|
+
msgid "User token expires"
|
395
|
+
msgstr ""
|
396
|
+
|
397
|
+
msgid "User token fields"
|
398
|
+
msgstr ""
|
399
|
+
|
400
|
+
msgid "User token id"
|
401
|
+
msgstr ""
|
402
|
+
|
403
|
+
msgid "User token value"
|
404
|
+
msgstr ""
|
405
|
+
|
334
406
|
msgid "VCPUs"
|
335
407
|
msgstr ""
|
336
408
|
|
@@ -343,21 +415,33 @@ msgstr "Etiquette VLAN"
|
|
343
415
|
msgid "VM ID"
|
344
416
|
msgstr ""
|
345
417
|
|
418
|
+
msgid "VM already associated with a host"
|
419
|
+
msgstr ""
|
420
|
+
|
421
|
+
msgid "VM associated to host %s"
|
422
|
+
msgstr ""
|
423
|
+
|
346
424
|
msgid "Version"
|
347
425
|
msgstr ""
|
348
426
|
|
349
427
|
msgid "X509 Certification Authorities"
|
350
428
|
msgstr "Autorités de certification X509"
|
351
429
|
|
352
|
-
msgid "add new
|
353
|
-
msgstr "
|
430
|
+
msgid "add new cd-rom"
|
431
|
+
msgstr ""
|
354
432
|
|
355
|
-
msgid "
|
433
|
+
msgid "add new cloud-init"
|
356
434
|
msgstr ""
|
357
435
|
|
358
|
-
msgid "
|
436
|
+
msgid "add new hard disk"
|
359
437
|
msgstr ""
|
360
438
|
|
439
|
+
msgid "add new mount point"
|
440
|
+
msgstr ""
|
441
|
+
|
442
|
+
msgid "add new storage volume"
|
443
|
+
msgstr "ajouter un nouveau volume de stockage"
|
444
|
+
|
361
445
|
msgid "e.g. /path/to/"
|
362
446
|
msgstr ""
|
363
447
|
|
@@ -367,25 +451,37 @@ msgstr "par exemple https://127.0.0.1:8006/api2/json"
|
|
367
451
|
msgid "e.g. root@pam"
|
368
452
|
msgstr "par exemple root@pam"
|
369
453
|
|
370
|
-
msgid "
|
371
|
-
msgstr "
|
454
|
+
msgid "eth[n] with n integer >= 0, e.g. eth0"
|
455
|
+
msgstr ""
|
456
|
+
|
457
|
+
msgid "failed to %<action>s %<vm>s"
|
458
|
+
msgstr ""
|
459
|
+
|
460
|
+
msgid "failed to save %<name>s"
|
461
|
+
msgstr ""
|
372
462
|
|
373
|
-
msgid "
|
463
|
+
msgid "integer within [0..128]"
|
464
|
+
msgstr ""
|
465
|
+
|
466
|
+
msgid "integer within [0..32]"
|
374
467
|
msgstr ""
|
375
468
|
|
376
469
|
msgid "invalid vmid=%<vmid>s"
|
377
470
|
msgstr "vmid=%<vmid>s incorrect"
|
378
471
|
|
379
|
-
msgid "
|
472
|
+
msgid "net[n] with n integer >= 0, e.g. net0"
|
473
|
+
msgstr ""
|
474
|
+
|
475
|
+
msgid "remove CDROM"
|
380
476
|
msgstr ""
|
381
477
|
|
382
|
-
msgid "
|
478
|
+
msgid "remove Cloud-init"
|
383
479
|
msgstr ""
|
384
480
|
|
385
|
-
msgid "
|
481
|
+
msgid "remove Hard disk"
|
386
482
|
msgstr ""
|
387
483
|
|
388
|
-
msgid "
|
484
|
+
msgid "remove mount point"
|
389
485
|
msgstr ""
|
390
486
|
|
391
487
|
msgid "remove network interface"
|
@@ -394,8 +490,5 @@ msgstr "retirer l'interface réseau"
|
|
394
490
|
msgid "remove storage volume"
|
395
491
|
msgstr "retirer le stockage de volume"
|
396
492
|
|
397
|
-
msgid "remove_vm_from_pool(%<poolid>s, %<vmid>s)"
|
398
|
-
msgstr ""
|
399
|
-
|
400
493
|
msgid "vmid of template vm."
|
401
494
|
msgstr "vmid de la VM modèle."
|
@@ -33,16 +33,15 @@ module ForemanFogProxmox
|
|
33
33
|
link_down: nil,
|
34
34
|
rate: nil,
|
35
35
|
queues: nil,
|
36
|
-
tag: nil
|
36
|
+
tag: nil,
|
37
37
|
}
|
38
|
-
|
38
|
+
{
|
39
39
|
id: 'net0',
|
40
40
|
mac: '36:25:8C:53:0C:50',
|
41
41
|
ip: nil,
|
42
42
|
ip6: nil,
|
43
|
-
compute_attributes: compute_attributes
|
43
|
+
compute_attributes: compute_attributes,
|
44
44
|
}
|
45
|
-
interface_attributes
|
46
45
|
end
|
47
46
|
|
48
47
|
def mock_container_vm
|
@@ -62,7 +61,7 @@ module ForemanFogProxmox
|
|
62
61
|
shared: nil,
|
63
62
|
snapshot: nil,
|
64
63
|
backup: nil,
|
65
|
-
aio: nil
|
64
|
+
aio: nil,
|
66
65
|
}
|
67
66
|
volume = mock('volume')
|
68
67
|
volume.stubs(:attributes).returns(volume_attributes)
|
@@ -96,7 +95,7 @@ module ForemanFogProxmox
|
|
96
95
|
bwlimit: nil,
|
97
96
|
unprivileged: nil,
|
98
97
|
interfaces: interfaces,
|
99
|
-
disks: volumes
|
98
|
+
disks: volumes,
|
100
99
|
}
|
101
100
|
config.stubs(:attributes).returns(config_attributes)
|
102
101
|
config.stubs(:attributes).returns(config_attributes)
|
@@ -139,7 +138,7 @@ module ForemanFogProxmox
|
|
139
138
|
blockstat: 0,
|
140
139
|
balloon: 0,
|
141
140
|
ballooninfo: 0,
|
142
|
-
snapshots: []
|
141
|
+
snapshots: [],
|
143
142
|
}
|
144
143
|
vm.stubs(:attributes).returns(vm_attributes)
|
145
144
|
vm.stubs(:container?).returns(true)
|
@@ -31,16 +31,15 @@ module ForemanFogProxmox
|
|
31
31
|
link_down: nil,
|
32
32
|
rate: nil,
|
33
33
|
queues: nil,
|
34
|
-
tag: nil
|
34
|
+
tag: nil,
|
35
35
|
}
|
36
|
-
|
36
|
+
{
|
37
37
|
id: 'net0',
|
38
38
|
mac: '36:25:8C:53:0C:50',
|
39
39
|
ip: nil,
|
40
40
|
ip6: nil,
|
41
|
-
compute_attributes: compute_attributes
|
41
|
+
compute_attributes: compute_attributes,
|
42
42
|
}
|
43
|
-
interface_attributes
|
44
43
|
end
|
45
44
|
|
46
45
|
def mock_server_vm
|
@@ -60,7 +59,7 @@ module ForemanFogProxmox
|
|
60
59
|
shared: nil,
|
61
60
|
snapshot: nil,
|
62
61
|
backup: nil,
|
63
|
-
aio: nil
|
62
|
+
aio: nil,
|
64
63
|
}
|
65
64
|
volume = mock('volume')
|
66
65
|
volume.stubs(:attributes).returns(volume_attributes)
|
@@ -93,7 +92,7 @@ module ForemanFogProxmox
|
|
93
92
|
keyboard: 'fr',
|
94
93
|
vga: 'std',
|
95
94
|
interfaces: interfaces,
|
96
|
-
disks: volumes
|
95
|
+
disks: volumes,
|
97
96
|
}
|
98
97
|
config.stubs(:attributes).returns(config_attributes)
|
99
98
|
config.stubs(:disks).returns(volumes)
|
@@ -134,7 +133,7 @@ module ForemanFogProxmox
|
|
134
133
|
blockstat: 0,
|
135
134
|
balloon: 0,
|
136
135
|
ballooninfo: 0,
|
137
|
-
snapshots: []
|
136
|
+
snapshots: [],
|
138
137
|
}
|
139
138
|
vm.stubs(:attributes).returns(vm_attributes)
|
140
139
|
vm.stubs(:container?).returns(false)
|
@@ -21,13 +21,15 @@ require 'test_plugin_helper'
|
|
21
21
|
module ForemanFogProxmox
|
22
22
|
class ComputeResourcesControllerTest < ActionController::TestCase
|
23
23
|
test 'should get isos by node and storage' do
|
24
|
-
get :isos_by_id_and_node_and_storage,
|
24
|
+
get :isos_by_id_and_node_and_storage,
|
25
|
+
params: { :compute_resource_id => 1, :node_id => 'proxmox', :storage => 'local' }
|
25
26
|
assert_response :found
|
26
27
|
show_response = @response.body
|
27
28
|
assert_not show_response.empty?
|
28
29
|
end
|
29
30
|
test 'should get ostemplates by node and storage' do
|
30
|
-
get :ostemplates_by_id_and_node_and_storage,
|
31
|
+
get :ostemplates_by_id_and_node_and_storage,
|
32
|
+
params: { :compute_resource_id => 1, :node_id => 'proxmox', :storage => 'local' }
|
31
33
|
assert_response :found
|
32
34
|
show_response = @response.body
|
33
35
|
assert_not show_response.empty?
|
data/test/test_plugin_helper.rb
CHANGED
@@ -2,14 +2,19 @@
|
|
2
2
|
|
3
3
|
# This calls the main test_helper in Foreman-core
|
4
4
|
|
5
|
-
|
5
|
+
if ENV['COVERAGE']
|
6
|
+
require 'simplecov'
|
6
7
|
|
7
|
-
SimpleCov.start do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
SimpleCov.start do
|
9
|
+
SimpleCov.root('../foreman_fog_proxmox')
|
10
|
+
load_profile "test_frameworks"
|
11
|
+
add_group 'Controllers', 'app/controllers'
|
12
|
+
add_group 'Models', 'app/models'
|
13
|
+
add_group 'Helpers', 'app/helpers'
|
14
|
+
add_group 'Overrides', 'app/overrides'
|
15
|
+
add_group 'Services', 'app/services'
|
16
|
+
add_group 'Lib', 'lib'
|
17
|
+
end
|
13
18
|
end
|
14
19
|
|
15
20
|
require 'test_helper'
|