foreman_fog_proxmox 0.4.0 → 0.5.0
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 +24 -12
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_compute_resource.js +26 -0
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm.js +92 -0
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm_container.js +60 -0
- data/app/assets/javascripts/foreman_fog_proxmox/{proxmox.js → proxmox_vm_server.js} +10 -10
- data/app/controllers/concerns/foreman_fog_proxmox/controller/parameters/compute_resource.rb +1 -1
- data/app/controllers/foreman_fog_proxmox/compute_resources_controller.rb +9 -1
- data/app/helpers/node_dashboard_helper.rb +36 -0
- data/app/helpers/proxmox_compute_selectors_helper.rb +23 -0
- data/app/helpers/proxmox_container_helper.rb +157 -0
- data/app/helpers/proxmox_form_helper.rb +67 -0
- data/app/helpers/{proxmox_compute_helper.rb → proxmox_server_helper.rb} +49 -38
- data/app/helpers/proxmox_vm_helper.rb +86 -0
- data/app/models/concerns/fog_extensions/proxmox/container.rb +57 -0
- data/{test/factories/foreman_fog_proxmox_factories.rb → app/models/concerns/fog_extensions/proxmox/container_config.rb} +16 -13
- data/app/models/concerns/fog_extensions/proxmox/server.rb +8 -2
- data/app/models/foreman_fog_proxmox/proxmox.rb +160 -67
- data/app/overrides/compute_resources_vms/form/add_clone_to_new_vm_compute_detail.rb +24 -0
- data/app/overrides/compute_resources_vms/form/add_vm_type_to_networks_form.rb +32 -0
- data/app/overrides/compute_resources_vms/form/add_vm_type_to_nic_provider_specific_form.rb +25 -0
- data/app/overrides/compute_resources_vms/form/add_vm_type_to_volumes_edit.rb +24 -0
- data/app/overrides/compute_resources_vms/form/add_vm_type_to_volumes_new_volume.rb +24 -0
- data/app/services/foreman_fog_proxmox/node_dashboard/data.rb +37 -0
- data/app/views/compute_resources/form/_proxmox.html.erb +7 -4
- data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_networks_form.html.erb +23 -0
- data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_networks_new_childs_form.html.erb +25 -0
- data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_nic_provider_specific_form.html.erb +23 -0
- data/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_volumes_edit.html.erb +73 -0
- data/app/views/compute_resources_vms/form/proxmox/_base.html.erb +16 -23
- data/app/views/compute_resources_vms/form/proxmox/_general.html.erb +37 -0
- data/app/views/compute_resources_vms/form/proxmox/_network.html.erb +2 -7
- data/app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb +31 -0
- data/app/views/compute_resources_vms/form/proxmox/container/_config.html.erb +41 -0
- data/app/views/compute_resources_vms/form/proxmox/container/_extended.html.erb +26 -0
- data/app/views/compute_resources_vms/form/proxmox/container/_network.html.erb +25 -0
- data/app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb +25 -0
- data/app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb +24 -0
- data/app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb +31 -0
- data/app/views/compute_resources_vms/form/proxmox/{_config.html.erb → server/_config.html.erb} +11 -8
- data/app/views/compute_resources_vms/form/proxmox/server/_network.html.erb +29 -0
- data/app/views/compute_resources_vms/form/proxmox/server/_volume.html.erb +27 -0
- data/app/views/compute_resources_vms/index/_proxmox.html.erb +4 -2
- data/app/views/compute_resources_vms/show/_proxmox.html.erb +9 -2
- data/app/views/dashboard/_foreman_fog_proxmox_widget.erb +4 -2
- data/app/views/images/form/_proxmox.html.erb +17 -0
- data/config/routes.rb +1 -0
- data/lib/foreman_fog_proxmox/engine.rb +10 -3
- data/lib/foreman_fog_proxmox/value.rb +24 -0
- data/lib/foreman_fog_proxmox/version.rb +1 -1
- data/locale/en/foreman_fog_proxmox.edit.po +456 -0
- data/locale/en/foreman_fog_proxmox.po +327 -11
- data/locale/en/foreman_fog_proxmox.po.time_stamp +0 -0
- data/locale/foreman_fog_proxmox.pot +515 -8
- data/locale/fr/foreman_fog_proxmox.edit.po +456 -0
- data/locale/fr/foreman_fog_proxmox.po +327 -11
- data/locale/fr/foreman_fog_proxmox.po.time_stamp +0 -0
- data/test/factories/proxmox_factory.rb +72 -0
- data/test/functional/compute_resources_controller_test.rb +34 -0
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb +205 -0
- data/test/{helpers/proxmox_compute_helper_test.rb → unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb} +36 -28
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb +240 -0
- data/test/unit/foreman_fog_proxmox/proxmox_test.rb +327 -0
- data/test/unit/foreman_fog_proxmox/proxmox_test_helpers.rb +251 -0
- metadata +83 -14
- data/app/views/compute_resources_vms/form/proxmox/_volume.html.erb +0 -23
- data/test/unit/foreman_fog_proxmox_test.rb +0 -11
@@ -1,19 +1,335 @@
|
|
1
|
-
# foreman_fog_proxmox
|
1
|
+
# French translations for foreman_fog_proxmox package.
|
2
|
+
# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the foreman_fog_proxmox package.
|
4
|
+
# Tristan Robert <tristan.robert.44@gmail.com>, 2018.
|
2
5
|
#
|
3
|
-
# This file is distributed under the same license as foreman_fog_proxmox.
|
4
|
-
#
|
5
|
-
#, fuzzy
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version:
|
8
|
+
"Project-Id-Version: foreman_fog_proxmox 1.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"Language
|
14
|
-
"Language: \n"
|
10
|
+
"PO-Revision-Date: 2018-07-17 15:16+0200\n"
|
11
|
+
"Last-Translator: Tristan Robert <tristan.robert.44@gmail.com>\n"
|
12
|
+
"Language-Team: French\n"
|
13
|
+
"Language: fr\n"
|
15
14
|
"MIME-Version: 1.0\n"
|
16
15
|
"Content-Type: text/plain; charset=UTF-8\n"
|
17
16
|
"Content-Transfer-Encoding: 8bit\n"
|
18
|
-
"Plural-Forms: nplurals=2; plural=
|
17
|
+
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
18
|
+
"\n"
|
19
|
+
|
20
|
+
msgid "%s console is not supported at this time"
|
21
|
+
msgstr "%s console pas encore supportée"
|
22
|
+
|
23
|
+
msgid "Add Volume"
|
24
|
+
msgstr "Ajouter un volume"
|
25
|
+
|
26
|
+
msgid "Advanced"
|
27
|
+
msgstr "Avancé"
|
28
|
+
|
29
|
+
msgid "Architecture"
|
30
|
+
msgstr ""
|
31
|
+
|
32
|
+
msgid "Average load (x100)"
|
33
|
+
msgstr "Charge moyenne du serveur (x100)"
|
34
|
+
|
35
|
+
msgid "Ballooning Device"
|
36
|
+
msgstr "Périphérique à gonflement"
|
37
|
+
|
38
|
+
msgid "Bridge"
|
39
|
+
msgstr "Pont"
|
40
|
+
|
41
|
+
msgid "CD-ROM"
|
42
|
+
msgstr ""
|
43
|
+
|
44
|
+
msgid "CDROM"
|
45
|
+
msgstr ""
|
46
|
+
|
47
|
+
msgid "CPU"
|
48
|
+
msgstr ""
|
49
|
+
|
50
|
+
msgid "CPU limit"
|
51
|
+
msgstr "Limite CPU"
|
52
|
+
|
53
|
+
msgid "CPU units"
|
54
|
+
msgstr "Unités CPU"
|
55
|
+
|
56
|
+
msgid "CPUs"
|
57
|
+
msgstr ""
|
58
|
+
|
59
|
+
msgid "Cache"
|
60
|
+
msgstr ""
|
61
|
+
|
62
|
+
msgid "Caps lock ON"
|
63
|
+
msgstr "Touches verrouillées"
|
64
|
+
|
65
|
+
msgid "Card"
|
66
|
+
msgstr "Carte"
|
67
|
+
|
68
|
+
msgid "Change the password"
|
69
|
+
msgstr "Changer le mot de passe"
|
70
|
+
|
71
|
+
msgid "Controller"
|
72
|
+
msgstr "Contrôleur"
|
73
|
+
|
74
|
+
msgid "Cores"
|
75
|
+
msgstr "Coeurs"
|
76
|
+
|
77
|
+
msgid "Create image?"
|
78
|
+
msgstr "Créer image?"
|
79
|
+
|
80
|
+
msgid "DNS"
|
81
|
+
msgstr ""
|
82
|
+
|
83
|
+
msgid "DNS server"
|
84
|
+
msgstr ""
|
85
|
+
|
86
|
+
msgid "Description"
|
87
|
+
msgstr ""
|
88
|
+
|
89
|
+
msgid "Device"
|
90
|
+
msgstr "Périphérque"
|
91
|
+
|
92
|
+
msgid "Disconnect"
|
93
|
+
msgstr "Se déconnecter"
|
94
|
+
|
95
|
+
msgid "Disk"
|
96
|
+
msgstr "Disque"
|
97
|
+
|
98
|
+
msgid "Does this image support user data input (e.g. via cloud-init)?"
|
99
|
+
msgstr "Cette immage gère-t-elle les données utilisateurs (par exemple via cloud-init)?"
|
100
|
+
|
101
|
+
msgid "Enable NUMA"
|
102
|
+
msgstr "Activer NUMA"
|
103
|
+
|
104
|
+
msgid "Enable/disable KVM hardware virtualization"
|
105
|
+
msgstr "Activer/désactiver la virtualisation matérielle de KVM"
|
106
|
+
|
107
|
+
msgid "Extended"
|
108
|
+
msgstr "Etendu"
|
109
|
+
|
110
|
+
msgid "Failed retrieving proxmox vm by vmid=%{vmid} and type=%{type}"
|
111
|
+
msgstr "Echec de récupération de la vm proxmox avec vmid=%{vmid} et type=%{type}"
|
112
|
+
|
113
|
+
msgid "Firewall"
|
114
|
+
msgstr "Pare-feu"
|
115
|
+
|
116
|
+
msgid "Foreman Fog Proxmox widget"
|
117
|
+
msgstr ""
|
118
|
+
|
119
|
+
msgid "ForemanFogProxmox plugin adds Proxmox VE compute resource to Foreman using fog-proxmox gem."
|
120
|
+
msgstr "Le plugin ForemanFogProxmox ajoute la ressource de calcul Proxmox VE à foreman en utilisant le gem fog-proxmox"
|
121
|
+
|
122
|
+
msgid "General"
|
123
|
+
msgstr "Général"
|
124
|
+
|
125
|
+
msgid "Hostname"
|
126
|
+
msgstr "Nom d'hôte"
|
127
|
+
|
128
|
+
msgid "Identifier interface[%{index}] required."
|
129
|
+
msgstr "L'identifiant de interface[%{index}] est obligatoire."
|
130
|
+
|
131
|
+
msgid "Image"
|
132
|
+
msgstr ""
|
133
|
+
|
134
|
+
msgid "Image ISO"
|
135
|
+
msgstr ""
|
136
|
+
|
137
|
+
msgid "Image VMID"
|
138
|
+
msgstr ""
|
139
|
+
|
140
|
+
msgid "Invalid identifier interface[%{index}]. Must be net[n] with n integer >= 0"
|
141
|
+
msgstr "L'identifiant de interface[%{index}] est incorrect. La syntaxe correcte est net[n] avec n un entier naturel positif"
|
142
|
+
|
143
|
+
msgid "Invalid uuid=[%{uuid}]."
|
144
|
+
msgstr ""
|
145
|
+
|
146
|
+
msgid "KVM"
|
147
|
+
msgstr ""
|
148
|
+
|
149
|
+
msgid "Keyboard"
|
150
|
+
msgstr "Clavier"
|
151
|
+
|
152
|
+
msgid "Main option"
|
153
|
+
msgid_plural "Main options"
|
154
|
+
msgstr[0] "Option principale"
|
155
|
+
msgstr[1] "Options principales"
|
156
|
+
|
157
|
+
msgid "Memory"
|
158
|
+
msgstr "Mémoire"
|
159
|
+
|
160
|
+
msgid "Minimum memory"
|
161
|
+
msgstr "Mémoire minimale"
|
162
|
+
|
163
|
+
msgid "Mount point"
|
164
|
+
msgstr "Point de montage"
|
165
|
+
|
166
|
+
msgid "Multiqueue"
|
167
|
+
msgstr ""
|
168
|
+
|
169
|
+
msgid "Name"
|
170
|
+
msgstr "Nom"
|
171
|
+
|
172
|
+
msgid "Nic"
|
173
|
+
msgstr ""
|
174
|
+
|
175
|
+
msgid "Node"
|
176
|
+
msgstr "Noeud"
|
177
|
+
|
178
|
+
msgid "None"
|
179
|
+
msgstr "Aucun"
|
180
|
+
|
181
|
+
msgid "OS"
|
182
|
+
msgstr "Système d'exploitation"
|
183
|
+
|
184
|
+
msgid "OS Template"
|
185
|
+
msgstr "Modèle d'OS"
|
186
|
+
|
187
|
+
msgid "OS type"
|
188
|
+
msgstr "Type de système d'exploitation"
|
189
|
+
|
190
|
+
msgid "Operating System"
|
191
|
+
msgstr "Système d'exploitation"
|
192
|
+
|
193
|
+
msgid "Operating system family %{type} is not consistent with %{ostype}"
|
194
|
+
msgstr "La famille %{type} du système d'exploitation n'est pas cohérente avec %{ostype}"
|
195
|
+
|
196
|
+
msgid "Optionally provide a CA, or a correctly ordered CA chain. If left blank, disable ssl_verify_peer."
|
197
|
+
msgstr "Vous pouvez éventuellement fournir un certificat ou une chaîne de certificats. Si non renseigné, alors désactivez ssl_verify_peer."
|
198
|
+
|
199
|
+
msgid "PCID"
|
200
|
+
msgstr ""
|
201
|
+
|
202
|
+
msgid "Password to authenticate with - used for SSH finish step."
|
203
|
+
msgstr "Mot de passe d'authentification - utilisé dans la dernière phase avec SSH."
|
204
|
+
|
205
|
+
msgid "Physical"
|
206
|
+
msgstr "Physique"
|
207
|
+
|
208
|
+
msgid "Power"
|
209
|
+
msgstr "Alimentation"
|
210
|
+
|
211
|
+
msgid "Proxmox Node Statistics: %s"
|
212
|
+
msgstr "Statistiques du noeud Proxmox: %s"
|
213
|
+
|
214
|
+
msgid "Qemu Agent"
|
215
|
+
msgstr "Agent Qemu"
|
216
|
+
|
217
|
+
msgid "Rate limit"
|
218
|
+
msgstr "Taux limite"
|
219
|
+
|
220
|
+
msgid "Root password"
|
221
|
+
msgstr "Mot de passe root"
|
222
|
+
|
223
|
+
msgid "Rootfs"
|
224
|
+
msgstr ""
|
225
|
+
|
226
|
+
msgid "SSL verify peer"
|
227
|
+
msgstr ""
|
228
|
+
|
229
|
+
msgid "Search domain"
|
230
|
+
msgstr "Domaine de recherche"
|
231
|
+
|
232
|
+
msgid "Shares"
|
233
|
+
msgstr "Partages"
|
234
|
+
|
235
|
+
msgid "Size"
|
236
|
+
msgstr "Taille"
|
237
|
+
|
238
|
+
msgid "Sockets"
|
239
|
+
msgstr ""
|
240
|
+
|
241
|
+
msgid "Spectre-CTRL"
|
242
|
+
msgstr ""
|
243
|
+
|
244
|
+
msgid "Start at boot"
|
245
|
+
msgstr "Démarrer au boot"
|
246
|
+
|
247
|
+
msgid "Start/Shutdown order"
|
248
|
+
msgstr "Ordre au démarrage/arrêt"
|
249
|
+
|
250
|
+
msgid "Storage"
|
251
|
+
msgstr "Stockage"
|
252
|
+
|
253
|
+
msgid "Swap"
|
254
|
+
msgstr ""
|
255
|
+
|
256
|
+
msgid "Template storage"
|
257
|
+
msgstr "Modèle de stockage"
|
258
|
+
|
259
|
+
msgid "Test failed"
|
260
|
+
msgstr "Le test a échoué"
|
261
|
+
|
262
|
+
msgid "The user that is used to ssh into the instance, normally cloud-user, ubuntu, root etc"
|
263
|
+
msgstr "Le compte utilisé pour SSH, en général compte cloud, ubuntu ou root, etc"
|
264
|
+
|
265
|
+
msgid "Time"
|
266
|
+
msgstr "Temps"
|
267
|
+
|
268
|
+
msgid "Type"
|
269
|
+
msgstr ""
|
270
|
+
|
271
|
+
msgid "URL"
|
272
|
+
msgstr ""
|
273
|
+
|
274
|
+
msgid "Unable to store X509 certificates"
|
275
|
+
msgstr "Impossible d'enregistrer les certificats X509"
|
276
|
+
|
277
|
+
msgid "Uptime"
|
278
|
+
msgstr "En marche depuis (s)"
|
279
|
+
|
280
|
+
msgid "VCPUs"
|
281
|
+
msgstr ""
|
282
|
+
|
283
|
+
msgid "VGA"
|
284
|
+
msgstr ""
|
285
|
+
|
286
|
+
msgid "VLAN tag"
|
287
|
+
msgstr "Etiquette VLAN"
|
288
|
+
|
289
|
+
msgid "VM ID"
|
290
|
+
msgstr ""
|
291
|
+
|
292
|
+
msgid "X509 Certification Authorities"
|
293
|
+
msgstr "Autorités de certification X509"
|
294
|
+
|
295
|
+
msgid "add new storage volume"
|
296
|
+
msgstr "ajouter un nouveau volume de stockage"
|
297
|
+
|
298
|
+
msgid "create_vm(): %{args}"
|
299
|
+
msgstr ""
|
300
|
+
|
301
|
+
msgid "create_vm(): clone %{image_id} in %{vmid}"
|
302
|
+
msgstr ""
|
303
|
+
|
304
|
+
msgid "e.g. https://127.0.0.1:8006/api2/json"
|
305
|
+
msgstr "par exemple https://127.0.0.1:8006/api2/json"
|
306
|
+
|
307
|
+
msgid "e.g. root@pam"
|
308
|
+
msgstr "par exemple root@pam"
|
309
|
+
|
310
|
+
msgid "failed to create vm: %{e}"
|
311
|
+
msgstr "échec à la création de la VM: %{e}"
|
312
|
+
|
313
|
+
msgid "invalid vmid=%{vmid}"
|
314
|
+
msgstr "vmid=%{vmid} incorrect"
|
315
|
+
|
316
|
+
msgid "new_container_vm() vm.config=%{config}"
|
317
|
+
msgstr ""
|
318
|
+
|
319
|
+
msgid "new_server_vm() vm.config=%{config}"
|
320
|
+
msgstr ""
|
321
|
+
|
322
|
+
msgid "new_vm() vm.config=%{config}"
|
323
|
+
msgstr ""
|
324
|
+
|
325
|
+
msgid "remove network interface"
|
326
|
+
msgstr "retirer l'interface réseau"
|
327
|
+
|
328
|
+
msgid "remove storage volume"
|
329
|
+
msgstr "retirer le stockage de volume"
|
330
|
+
|
331
|
+
msgid "save_vm(): %{attr}"
|
332
|
+
msgstr ""
|
19
333
|
|
334
|
+
msgid "vmid of template vm."
|
335
|
+
msgstr "vmid de la VM modèle."
|
File without changes
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2018 Tristan Robert
|
4
|
+
|
5
|
+
# This file is part of ForemanFogProxmox.
|
6
|
+
|
7
|
+
# ForemanFogProxmox is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
|
12
|
+
# ForemanFogProxmox is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
FactoryBot.define do
|
21
|
+
|
22
|
+
factory :proxmox_resource, :class => ComputeResource do
|
23
|
+
sequence(:name) { |n| "compute_resource#{n}" }
|
24
|
+
|
25
|
+
trait :proxmox do
|
26
|
+
provider 'Proxmox'
|
27
|
+
user 'root@pam'
|
28
|
+
password 'proxmox01'
|
29
|
+
url 'https://192.168.56.101:8006/api2/json'
|
30
|
+
node_name 'pve'
|
31
|
+
end
|
32
|
+
|
33
|
+
factory :proxmox_cr, :class => ForemanFogProxmox::Proxmox, :traits => [:proxmox]
|
34
|
+
|
35
|
+
after(:create) do |cr, evaluator|
|
36
|
+
FactoryBot.create(:node, :compute_resource => cr)
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
factory :node do
|
42
|
+
sequence(:identity) { |n| "node#{n}" }
|
43
|
+
association :compute_resource, factory: :proxmox_cr
|
44
|
+
end
|
45
|
+
|
46
|
+
def deferred_nic_attrs
|
47
|
+
[:ip, :ip6, :mac, :subnet, :domain]
|
48
|
+
end
|
49
|
+
|
50
|
+
def set_nic_attributes(host, attributes, evaluator)
|
51
|
+
attributes.each do |nic_attribute|
|
52
|
+
next unless evaluator.send(nic_attribute).present?
|
53
|
+
host.primary_interface.send(:"#{nic_attribute}=", evaluator.send(nic_attribute))
|
54
|
+
end
|
55
|
+
host
|
56
|
+
end
|
57
|
+
|
58
|
+
factory :nic_base_empty, :class => Nic::Base do
|
59
|
+
type 'Nic::Base'
|
60
|
+
end
|
61
|
+
|
62
|
+
factory :nic_managed_empty, :class => Nic::Managed, :parent => :nic_base_empty do
|
63
|
+
type 'Nic::Managed'
|
64
|
+
identifier 'net0'
|
65
|
+
end
|
66
|
+
|
67
|
+
factory :host_empty, :class => Host do
|
68
|
+
sequence(:name) { |n| "host#{n}" }
|
69
|
+
sequence(:hostname) { |n| "host#{n}" }
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2018 Tristan Robert
|
4
|
+
|
5
|
+
# This file is part of ForemanFogProxmox.
|
6
|
+
|
7
|
+
# ForemanFogProxmox is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
|
12
|
+
# ForemanFogProxmox is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
require 'test_plugin_helper'
|
20
|
+
|
21
|
+
class ::ForemanFogProxmox::ComputeResourcesControllerTest < ActionController::TestCase
|
22
|
+
test 'should get isos' do
|
23
|
+
get :isos, params: { :storage => 'local' }
|
24
|
+
assert_response :found
|
25
|
+
show_response = @response.body
|
26
|
+
assert !show_response.empty?
|
27
|
+
end
|
28
|
+
test 'should get ostemplates' do
|
29
|
+
get :ostemplates, params: { :storage => 'local' }
|
30
|
+
assert_response :found
|
31
|
+
show_response = @response.body
|
32
|
+
assert !show_response.empty?
|
33
|
+
end
|
34
|
+
end
|