foreman_fog_proxmox 0.13.4 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +63 -52
  3. data/app/assets/javascripts/foreman_fog_proxmox/proxmox_compute_resource.js +0 -2
  4. data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm.js +0 -1
  5. data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm_server.js +0 -2
  6. data/app/assets/javascripts/foreman_fog_proxmox/proxmox_volume_cloudinit.js +0 -1
  7. data/app/controllers/concerns/foreman_fog_proxmox/compute_resources_vms_controller.rb +17 -7
  8. data/app/controllers/concerns/foreman_fog_proxmox/controller/parameters/compute_resource.rb +1 -1
  9. data/app/controllers/concerns/foreman_fog_proxmox/hosts_controller.rb +58 -0
  10. data/app/controllers/foreman_fog_proxmox/compute_resources_controller.rb +6 -3
  11. data/app/helpers/proxmox_compute_controllers_helper.rb +2 -1
  12. data/app/helpers/proxmox_compute_resources_helper.rb +3 -3
  13. data/app/helpers/proxmox_compute_resources_vms_helper.rb +16 -7
  14. data/app/helpers/proxmox_form_helper.rb +10 -6
  15. data/app/helpers/proxmox_vm_config_helper.rb +16 -25
  16. data/app/helpers/proxmox_vm_interfaces_helper.rb +19 -6
  17. data/app/helpers/proxmox_vm_os_template_helper.rb +2 -5
  18. data/app/helpers/proxmox_vm_uuid_helper.rb +1 -1
  19. data/app/helpers/proxmox_vm_volumes_helper.rb +22 -25
  20. data/app/models/concerns/fog_extensions/proxmox/node.rb +2 -2
  21. data/app/models/concerns/fog_extensions/proxmox/server.rb +10 -6
  22. data/app/models/concerns/host_ext/proxmox/associator.rb +3 -2
  23. data/app/models/concerns/host_ext/proxmox/for_vm.rb +1 -1
  24. data/app/models/concerns/host_ext/proxmox/interfaces.rb +7 -3
  25. data/app/models/concerns/orchestration/proxmox/compute.rb +11 -4
  26. data/app/models/foreman_fog_proxmox/options_select.rb +1 -3
  27. data/app/models/foreman_fog_proxmox/proxmox.rb +12 -10
  28. data/app/models/foreman_fog_proxmox/proxmox_compute_attributes.rb +15 -3
  29. data/app/models/foreman_fog_proxmox/proxmox_connection.rb +6 -2
  30. data/app/models/foreman_fog_proxmox/proxmox_console.rb +3 -1
  31. data/app/models/foreman_fog_proxmox/proxmox_images.rb +2 -2
  32. data/app/models/foreman_fog_proxmox/proxmox_interfaces.rb +37 -14
  33. data/app/models/foreman_fog_proxmox/proxmox_operating_systems.rb +6 -1
  34. data/app/models/foreman_fog_proxmox/proxmox_pools.rb +4 -4
  35. data/app/models/foreman_fog_proxmox/proxmox_version.rb +7 -3
  36. data/app/models/foreman_fog_proxmox/proxmox_vm_commands.rb +9 -7
  37. data/app/models/foreman_fog_proxmox/proxmox_vm_new.rb +37 -24
  38. data/app/models/foreman_fog_proxmox/proxmox_vm_queries.rb +4 -5
  39. data/app/models/foreman_fog_proxmox/proxmox_volumes.rb +23 -12
  40. data/app/models/foreman_fog_proxmox/vms.rb +2 -2
  41. data/app/overrides/compute_resources_vms/form/add_clone_to_new_vm_compute_detail.rb +1 -1
  42. data/app/views/compute_resources_vms/form/proxmox/_add_from_profile_to_compute_form.html.erb +2 -2
  43. data/app/views/compute_resources_vms/form/proxmox/_add_from_profile_to_hosts_compute_detail_form.html.erb +4 -2
  44. data/app/views/compute_resources_vms/form/proxmox/_base.html.erb +0 -1
  45. data/app/views/compute_resources_vms/form/proxmox/container/_config.html.erb +2 -2
  46. data/app/views/compute_resources_vms/form/proxmox/container/_network.html.erb +1 -1
  47. data/app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb +1 -1
  48. data/app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb +1 -1
  49. data/app/views/compute_resources_vms/form/proxmox/server/_config.html.erb +3 -3
  50. data/app/views/compute_resources_vms/form/proxmox/server/_network.html.erb +2 -2
  51. data/app/views/compute_resources_vms/form/proxmox/server/_volume_hard_disk.html.erb +1 -1
  52. data/config/routes.rb +8 -4
  53. data/db/migrate/20210312105013_update_proxmox_uuid_host.rb +1 -2
  54. data/lib/foreman_fog_proxmox/engine.rb +5 -3
  55. data/lib/foreman_fog_proxmox/semver.rb +1 -4
  56. data/lib/foreman_fog_proxmox/version.rb +1 -1
  57. data/locale/en/foreman_fog_proxmox.po +140 -47
  58. data/locale/foreman_fog_proxmox.pot +300 -137
  59. data/locale/fr/foreman_fog_proxmox.po +145 -52
  60. data/test/factories/foreman_fog_proxmox/proxmox_container_mock_factory.rb +6 -7
  61. data/test/factories/foreman_fog_proxmox/proxmox_server_mock_factory.rb +6 -7
  62. data/test/functional/compute_resources_controller_test.rb +4 -2
  63. data/test/test_plugin_helper.rb +12 -7
  64. data/test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb +38 -47
  65. data/test/unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb +49 -34
  66. data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb +29 -65
  67. data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_volumes_helper_test.rb +3 -3
  68. data/test/unit/foreman_fog_proxmox/proxmox_compute_attributes_test.rb +22 -13
  69. data/test/unit/foreman_fog_proxmox/proxmox_interfaces_test.rb +48 -37
  70. data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_container_test.rb +45 -35
  71. data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_create_test.rb +0 -4
  72. data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cdrom_test.rb +34 -22
  73. data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cloudinit_test.rb +20 -14
  74. data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_hard_disk_test.rb +76 -54
  75. data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_test.rb +26 -15
  76. data/test/unit/foreman_fog_proxmox/proxmox_vm_queries_test.rb +1 -1
  77. data/test/unit/foreman_fog_proxmox/semver_test.rb +2 -1
  78. metadata +36 -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 "CDROM"
74
+ msgid "CIDR IPv4"
45
75
  msgstr ""
46
76
 
47
- msgid "CIDR IPv4 prefix"
77
+ msgid "CIDR IPv6"
48
78
  msgstr ""
49
79
 
50
- msgid "CIDR IPv6 prefix"
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 compute client caused by %<e>s"
173
+ msgid "Failed retrieving proxmox server vm by vmid=%<vmid>s"
123
174
  msgstr ""
124
175
 
125
- msgid "Failed retrieving proxmox identity client caused by %<e>s"
176
+ msgid "Failed to acquire IP addresses from compute resource for %<name>s"
126
177
  msgstr ""
127
178
 
128
- msgid "Failed retrieving proxmox network client caused by %<e>s"
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 "KVM"
227
+ msgid "Import as managed Host"
174
228
  msgstr ""
175
229
 
176
- msgid "Keyboard"
177
- msgstr "Clavier"
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 "PCID"
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 storage volume"
353
- msgstr "ajouter un nouveau volume de stockage"
430
+ msgid "add new cd-rom"
431
+ msgstr ""
354
432
 
355
- msgid "add_vm_to_pool(%<poolid>s, %<vmid>s)"
433
+ msgid "add new cloud-init"
356
434
  msgstr ""
357
435
 
358
- msgid "create_vm(): clone %<image_id>s in %<vmid>s"
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 "failed to create vm: %<e>s"
371
- msgstr "échec à la création de la VM: %<e>s"
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 "found vm: %<vmid>s member of pool: %<poolid>s"
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 "new_container_vm() vm.config=%<config>s"
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 "new_server_vm() vm.config=%<config>s"
478
+ msgid "remove Cloud-init"
383
479
  msgstr ""
384
480
 
385
- msgid "new_vm() vm.config=%<config>s"
481
+ msgid "remove Hard disk"
386
482
  msgstr ""
387
483
 
388
- msgid "pool_owner(%<vmid>s)"
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
- interface_attributes = {
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
- interface_attributes = {
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, params: { :compute_resource_id => 1, :node_id => 'proxmox', :storage => 'local' }
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, params: { :compute_resource_id => 1, :node_id => 'proxmox', :storage => 'local' }
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?
@@ -2,14 +2,19 @@
2
2
 
3
3
  # This calls the main test_helper in Foreman-core
4
4
 
5
- require 'simplecov'
5
+ if ENV['COVERAGE']
6
+ require 'simplecov'
6
7
 
7
- SimpleCov.start do
8
- add_filter '/test/'
9
- add_group 'Controllers', 'app/controllers'
10
- add_group 'Models', 'app/models'
11
- add_group 'Helpers', 'app/helpers'
12
- add_group 'Lib', 'lib'
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'