foreman_kubevirt 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_kubevirt/locale/ca/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/cs_CZ/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/de/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/en/foreman_kubevirt.js +175 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/en_GB/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/es/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/fr/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/gl/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/it/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/ja/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/ka/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/ko/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/nl_NL/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/pl/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/pt_BR/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/ru/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/sv_SE/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/zh_CN/foreman_kubevirt.js +176 -0
- data/app/assets/javascripts/foreman_kubevirt/locale/zh_TW/foreman_kubevirt.js +176 -0
- data/app/models/concerns/fog_extensions/kubevirt/server.rb +1 -1
- data/app/models/foreman_kubevirt/kubevirt.rb +12 -14
- data/app/validators/volume_validator.rb +1 -1
- data/app/views/compute_resources_vms/form/kubevirt/_base.html.erb +0 -2
- data/lib/foreman_kubevirt/engine.rb +21 -27
- data/lib/foreman_kubevirt/version.rb +1 -1
- data/locale/Makefile +8 -5
- data/locale/ca/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/ca/foreman_kubevirt.edit.po +227 -0
- data/locale/ca/foreman_kubevirt.po +34 -29
- data/locale/ca/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/cs_CZ/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/cs_CZ/foreman_kubevirt.edit.po +231 -0
- data/locale/cs_CZ/foreman_kubevirt.po +42 -33
- data/locale/cs_CZ/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/de/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/de/foreman_kubevirt.edit.po +239 -0
- data/locale/de/foreman_kubevirt.po +75 -58
- data/locale/de/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/en/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/en/foreman_kubevirt.edit.po +24 -19
- data/locale/en/foreman_kubevirt.po +4 -1
- data/locale/en_GB/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/en_GB/foreman_kubevirt.edit.po +231 -0
- data/locale/en_GB/foreman_kubevirt.po +67 -58
- data/locale/en_GB/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/es/foreman_kubevirt.edit.po +237 -0
- data/locale/es/foreman_kubevirt.po +73 -58
- data/locale/es/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/foreman_kubevirt.pot +16 -11
- data/locale/fr/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/fr/foreman_kubevirt.edit.po +232 -0
- data/locale/fr/foreman_kubevirt.po +69 -59
- data/locale/fr/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/gl/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/gl/foreman_kubevirt.edit.po +227 -0
- data/locale/gl/foreman_kubevirt.po +34 -29
- data/locale/gl/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/it/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/it/foreman_kubevirt.edit.po +230 -0
- data/locale/it/foreman_kubevirt.po +44 -36
- data/locale/it/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/ja/foreman_kubevirt.edit.po +233 -0
- data/locale/ja/foreman_kubevirt.po +68 -57
- data/locale/ja/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/ka/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/ka/foreman_kubevirt.edit.po +229 -0
- data/locale/ka/foreman_kubevirt.po +177 -0
- data/locale/ka/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/ko/foreman_kubevirt.edit.po +228 -0
- data/locale/ko/foreman_kubevirt.po +41 -35
- data/locale/ko/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/nl_NL/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/nl_NL/foreman_kubevirt.edit.po +231 -0
- data/locale/nl_NL/foreman_kubevirt.po +5 -3
- data/locale/nl_NL/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/pl/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/pl/foreman_kubevirt.edit.po +230 -0
- data/locale/pl/foreman_kubevirt.po +5 -3
- data/locale/pl/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/pt_BR/foreman_kubevirt.edit.po +235 -0
- data/locale/pt_BR/foreman_kubevirt.po +37 -32
- data/locale/pt_BR/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/ru/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/ru/foreman_kubevirt.edit.po +234 -0
- data/locale/ru/foreman_kubevirt.po +5 -3
- data/locale/ru/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/sv_SE/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/sv_SE/foreman_kubevirt.edit.po +230 -0
- data/locale/sv_SE/foreman_kubevirt.po +5 -3
- data/locale/sv_SE/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/zh_CN/foreman_kubevirt.edit.po +233 -0
- data/locale/zh_CN/foreman_kubevirt.po +18 -14
- data/locale/zh_CN/foreman_kubevirt.po.time_stamp +0 -0
- data/locale/zh_TW/LC_MESSAGES/foreman_kubevirt.mo +0 -0
- data/locale/zh_TW/foreman_kubevirt.edit.po +229 -0
- data/locale/zh_TW/foreman_kubevirt.po +5 -3
- data/locale/zh_TW/foreman_kubevirt.po.time_stamp +0 -0
- data/test/factories/host_factories.rb +0 -1
- metadata +72 -28
- data/app/assets/javascripts/bundle.js +0 -1
- data/locale/action_names.rb +0 -5
@@ -0,0 +1,176 @@
|
|
1
|
+
locales['foreman_kubevirt'] = locales['foreman_kubevirt'] || {}; locales['foreman_kubevirt']['zh_TW'] = {
|
2
|
+
"domain": "foreman_kubevirt",
|
3
|
+
"locale_data": {
|
4
|
+
"foreman_kubevirt": {
|
5
|
+
"": {
|
6
|
+
"Project-Id-Version": "foreman_kubevirt 0.1.9",
|
7
|
+
"Report-Msgid-Bugs-To": "",
|
8
|
+
"POT-Creation-Date": "2023-06-06 13:39+0200",
|
9
|
+
"PO-Revision-Date": "2020-05-26 07:39+0000",
|
10
|
+
"Last-Translator": "Bryan Kearney <bryan.kearney@gmail.com>, 2020",
|
11
|
+
"Language-Team": "Chinese (Taiwan) (https://app.transifex.com/foreman/teams/114/zh_TW/)",
|
12
|
+
"MIME-Version": "1.0",
|
13
|
+
"Content-Type": "text/plain; charset=UTF-8",
|
14
|
+
"Content-Transfer-Encoding": "8bit",
|
15
|
+
"Language": "zh_TW",
|
16
|
+
"Plural-Forms": "nplurals=1; plural=0;",
|
17
|
+
"lang": "zh_TW",
|
18
|
+
"domain": "foreman_kubevirt",
|
19
|
+
"plural_forms": "nplurals=1; plural=0;"
|
20
|
+
},
|
21
|
+
"Token for KubeVirt only": [
|
22
|
+
""
|
23
|
+
],
|
24
|
+
"Host name for KubeVirt only": [
|
25
|
+
""
|
26
|
+
],
|
27
|
+
"Namespace for KubeVirt only": [
|
28
|
+
""
|
29
|
+
],
|
30
|
+
"CA crt for KubeVirt only": [
|
31
|
+
""
|
32
|
+
],
|
33
|
+
"API port for KubeVirt only": [
|
34
|
+
""
|
35
|
+
],
|
36
|
+
"%{cpu_cores} Cores and %{memory} memory": [
|
37
|
+
""
|
38
|
+
],
|
39
|
+
"The compute resource could not be authenticated": [
|
40
|
+
""
|
41
|
+
],
|
42
|
+
"no Storage Classes available on provider": [
|
43
|
+
""
|
44
|
+
],
|
45
|
+
"multus": [
|
46
|
+
""
|
47
|
+
],
|
48
|
+
"genie": [
|
49
|
+
""
|
50
|
+
],
|
51
|
+
"pod": [
|
52
|
+
""
|
53
|
+
],
|
54
|
+
"The remote system presented a public key signed by an unidentified certificate authority.\\n If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' button and submit": [
|
55
|
+
""
|
56
|
+
],
|
57
|
+
"VM should be created based on Persistent Volume Claim or Image": [
|
58
|
+
""
|
59
|
+
],
|
60
|
+
"It is not possible to set a bootable volume and image based provisioning.": [
|
61
|
+
""
|
62
|
+
],
|
63
|
+
"VM should be created based on an image": [
|
64
|
+
""
|
65
|
+
],
|
66
|
+
"Volume size %s is not valid": [
|
67
|
+
""
|
68
|
+
],
|
69
|
+
"Only one volume can be bootable": [
|
70
|
+
"只有一個卷冊能作為開機卷冊"
|
71
|
+
],
|
72
|
+
"cni_provider or network are missing": [
|
73
|
+
""
|
74
|
+
],
|
75
|
+
"Hostname": [
|
76
|
+
"主機名稱"
|
77
|
+
],
|
78
|
+
"API Port": [
|
79
|
+
""
|
80
|
+
],
|
81
|
+
"Namespace": [
|
82
|
+
""
|
83
|
+
],
|
84
|
+
"Token": [
|
85
|
+
"權杖"
|
86
|
+
],
|
87
|
+
"e.g. eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9...": [
|
88
|
+
""
|
89
|
+
],
|
90
|
+
"X509 Certification Authorities": [
|
91
|
+
"X509 憑證許可"
|
92
|
+
],
|
93
|
+
"Optionally provide a CA, or a correctly ordered CA chain or a path to a file. If left blank - insecure.": [
|
94
|
+
""
|
95
|
+
],
|
96
|
+
"Name": [
|
97
|
+
"名稱"
|
98
|
+
],
|
99
|
+
"CPUs": [
|
100
|
+
"CPU"
|
101
|
+
],
|
102
|
+
"Memory": [
|
103
|
+
"記憶體"
|
104
|
+
],
|
105
|
+
"Power ON this machine": [
|
106
|
+
"開啟這部機器的電源"
|
107
|
+
],
|
108
|
+
"Start": [
|
109
|
+
"開始"
|
110
|
+
],
|
111
|
+
"Please select an image": [
|
112
|
+
"請選擇一個映像檔"
|
113
|
+
],
|
114
|
+
"Image": [
|
115
|
+
"影像"
|
116
|
+
],
|
117
|
+
"CNI Provider": [
|
118
|
+
""
|
119
|
+
],
|
120
|
+
"Network": [
|
121
|
+
"網路"
|
122
|
+
],
|
123
|
+
"Storage Class": [
|
124
|
+
""
|
125
|
+
],
|
126
|
+
"Size (GB)": [
|
127
|
+
"大小(GB)"
|
128
|
+
],
|
129
|
+
"Bootable": [
|
130
|
+
"可開機"
|
131
|
+
],
|
132
|
+
"Power": [
|
133
|
+
"電源"
|
134
|
+
],
|
135
|
+
"Actions": [
|
136
|
+
"動作"
|
137
|
+
],
|
138
|
+
"Properties": [
|
139
|
+
"屬性"
|
140
|
+
],
|
141
|
+
"VCPU(s)": [
|
142
|
+
"VCPU"
|
143
|
+
],
|
144
|
+
"UUID": [
|
145
|
+
"UUID"
|
146
|
+
],
|
147
|
+
"Type": [
|
148
|
+
"類型"
|
149
|
+
],
|
150
|
+
"NIC": [
|
151
|
+
"NIC"
|
152
|
+
],
|
153
|
+
"Disk": [
|
154
|
+
"磁碟"
|
155
|
+
],
|
156
|
+
"Running on": [
|
157
|
+
"執行於"
|
158
|
+
],
|
159
|
+
"The user that is used to ssh into the instance, normally cloud-user, ec2-user, ubuntu, root etc": [
|
160
|
+
"使用來 ssh 入 instance 的使用者,一般會是 cloud-user、ec2-user、ubuntu、root 等等"
|
161
|
+
],
|
162
|
+
"Password to authenticate with - used for SSH finish step.": [
|
163
|
+
"用來進行認證的密碼 - 用於 SSH 完成步驟。"
|
164
|
+
],
|
165
|
+
"Does this image support user data input (e.g. via cloud-init)?": [
|
166
|
+
"這映像檔是否支援使用者資料輸入(比方說透過 cloud-init)?"
|
167
|
+
],
|
168
|
+
"The name of the image in the registry.": [
|
169
|
+
""
|
170
|
+
],
|
171
|
+
"Provision and manage Kubevirt Virtual Machines from Foreman.": [
|
172
|
+
""
|
173
|
+
]
|
174
|
+
}
|
175
|
+
}
|
176
|
+
};
|
@@ -66,7 +66,7 @@ module ForemanKubevirt
|
|
66
66
|
return false if errors.any?
|
67
67
|
client&.valid? && client&.virt_supported?
|
68
68
|
rescue StandardError => e
|
69
|
-
if e.message
|
69
|
+
if /401/.match?(e.message)
|
70
70
|
errors[:base] << _('The compute resource could not be authenticated')
|
71
71
|
else
|
72
72
|
errors[:base] << e.message
|
@@ -341,7 +341,7 @@ module ForemanKubevirt
|
|
341
341
|
|
342
342
|
def raise_certification_failure_exception
|
343
343
|
raise Foreman::FingerprintException.new(
|
344
|
-
|
344
|
+
_("The remote system presented a public key signed by an unidentified certificate authority.
|
345
345
|
If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' button and submit"),
|
346
346
|
ca_cert
|
347
347
|
)
|
@@ -352,18 +352,18 @@ module ForemanKubevirt
|
|
352
352
|
def verify_at_least_one_volume_provided(options)
|
353
353
|
image = options[:image_id]
|
354
354
|
volumes_attributes = options[:volumes_attributes]
|
355
|
-
raise ::Foreman::Exception.new
|
355
|
+
raise ::Foreman::Exception.new _('VM should be created based on Persistent Volume Claim or Image') unless
|
356
356
|
(volumes_attributes.present? || image)
|
357
357
|
end
|
358
358
|
|
359
359
|
def verify_booting_from_image_is_possible(volumes)
|
360
|
-
raise ::Foreman::Exception.new
|
360
|
+
raise ::Foreman::Exception.new _('It is not possible to set a bootable volume and image based provisioning.') if
|
361
361
|
volumes&.any? { |_, v| v[:bootable] == "true" }
|
362
362
|
end
|
363
363
|
|
364
364
|
def add_volume_for_image_provision(options)
|
365
365
|
image = options[:image_id]
|
366
|
-
raise ::Foreman::Exception.new
|
366
|
+
raise ::Foreman::Exception.new _('VM should be created based on an image') unless image
|
367
367
|
|
368
368
|
verify_booting_from_image_is_possible(options[:volumes_attributes])
|
369
369
|
|
@@ -377,17 +377,17 @@ module ForemanKubevirt
|
|
377
377
|
def validate_volume_capacity(volumes_attributes)
|
378
378
|
volumes_attributes.each do |_, vol|
|
379
379
|
if vol[:capacity].to_s.empty? || /\A\d+G?\Z/.match(vol[:capacity].to_s).nil?
|
380
|
-
raise Foreman::Exception.new(
|
380
|
+
raise Foreman::Exception.new(_("Volume size %s is not valid") % vol[:capacity])
|
381
381
|
end
|
382
382
|
end
|
383
383
|
end
|
384
384
|
|
385
385
|
def validate_only_single_bootable_volume(volumes_attributes)
|
386
|
-
raise ::Foreman::Exception.new
|
386
|
+
raise ::Foreman::Exception.new _('Only one volume can be bootable') if volumes_attributes.count { |_, v| v[:bootable] == "true" } > 1
|
387
387
|
end
|
388
388
|
|
389
389
|
def create_new_pvc(pvc_name, capacity, storage_class)
|
390
|
-
capacity
|
390
|
+
capacity += "G" unless capacity.end_with? "G"
|
391
391
|
client.pvcs.create(:name => pvc_name,
|
392
392
|
:namespace => namespace,
|
393
393
|
:storage_class => storage_class,
|
@@ -397,11 +397,9 @@ module ForemanKubevirt
|
|
397
397
|
|
398
398
|
def delete_pvcs(volumes)
|
399
399
|
volumes.each do |volume|
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
logger.error("The PVC #{volume.info} couldn't be delete due to #{e.message}")
|
404
|
-
end
|
400
|
+
client.pvcs.delete(volume.info) if volume.type == "persistentVolumeClaim"
|
401
|
+
rescue StandardError => e
|
402
|
+
logger.error("The PVC #{volume.info} couldn't be delete due to #{e.message}")
|
405
403
|
end
|
406
404
|
end
|
407
405
|
|
@@ -470,7 +468,7 @@ module ForemanKubevirt
|
|
470
468
|
interfaces = []
|
471
469
|
networks = []
|
472
470
|
options[:interfaces_attributes].values.each do |iface|
|
473
|
-
raise ::Foreman::Exception.new
|
471
|
+
raise ::Foreman::Exception.new _('cni_provider or network are missing') unless (iface.key?(:cni_provider) && iface.key?(:network))
|
474
472
|
if iface[:cni_provider] == 'pod'
|
475
473
|
nic, net = create_pod_network_element
|
476
474
|
else
|
@@ -4,7 +4,7 @@ class VolumeValidator < ActiveModel::EachValidator
|
|
4
4
|
value[:volumes_attributes].each do |_, attrs|
|
5
5
|
if attrs.key?("capacity") && attrs.key?("storage_class")
|
6
6
|
if attrs["capacity"].to_s.empty? || /\A\d+G?\Z/.match(attrs["capacity"].to_s).nil?
|
7
|
-
record.errors.add(attribute, _("Volume size
|
7
|
+
record.errors.add(attribute, _("Volume size %s is not valid") % attrs['capacity'])
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
<%= javascript_tag("$(document).on('ContentLoad', tfm.numFields.initAll)"); %>
|
2
|
-
|
3
1
|
<%= text_f f, :name, :label => _('Name'), :label_size => "col-md-2", :disabled => !new_vm if show_vm_name? %>
|
4
2
|
|
5
3
|
<%= counter_f f, :cpu_cores, :disabled => !new_vm, :label => _('CPUs'), :label_size => 'col-md-2', :'data-soft-max' => compute_resource.max_cpu_count %>
|
@@ -4,7 +4,9 @@ module ForemanKubevirt
|
|
4
4
|
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
|
5
5
|
initializer "foreman_kubevirt.register_plugin", :before => :finisher_hook do |_app|
|
6
6
|
Foreman::Plugin.register :foreman_kubevirt do
|
7
|
-
requires_foreman
|
7
|
+
requires_foreman '>= 3.7'
|
8
|
+
register_gettext
|
9
|
+
|
8
10
|
compute_resource(ForemanKubevirt::Kubevirt)
|
9
11
|
|
10
12
|
parameter_filter(ComputeResource, :hostname, :url)
|
@@ -42,37 +44,29 @@ module ForemanKubevirt
|
|
42
44
|
|
43
45
|
# Include concerns in this config.to_prepare block
|
44
46
|
config.to_prepare do
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
require File.expand_path("../../app/models/concerns/fog_extensions/kubevirt/server", __dir__)
|
50
|
-
|
51
|
-
::Api::V2::ComputeResourcesController.send :include, ForemanKubevirt::Concerns::Api::ComputeResourcesControllerExtensions
|
52
|
-
Fog::Kubevirt::Compute::Server.send(:include, ::FogExtensions::Kubevirt::Server)
|
47
|
+
require "fog/kubevirt"
|
48
|
+
require "fog/kubevirt/compute/utils/unit_converter"
|
49
|
+
require "fog/kubevirt/compute/models/server"
|
50
|
+
require File.expand_path("../../app/models/concerns/fog_extensions/kubevirt/server", __dir__)
|
53
51
|
|
54
|
-
|
55
|
-
|
56
|
-
Fog::Kubevirt::Compute::Volume.send(:include, ::FogExtensions::Kubevirt::Volume)
|
52
|
+
::Api::V2::ComputeResourcesController.send :include, ForemanKubevirt::Concerns::Api::ComputeResourcesControllerExtensions
|
53
|
+
Fog::Kubevirt::Compute::Server.send(:include, ::FogExtensions::Kubevirt::Server)
|
57
54
|
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
require "fog/kubevirt/compute/models/volume"
|
56
|
+
require File.expand_path("../../app/models/concerns/fog_extensions/kubevirt/volume", __dir__)
|
57
|
+
Fog::Kubevirt::Compute::Volume.send(:include, ::FogExtensions::Kubevirt::Volume)
|
61
58
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
ComputeAttribute.send :include, ForemanKubevirt::ComputeAttributeExtensions
|
59
|
+
require "fog/kubevirt/compute/models/vmnic"
|
60
|
+
require File.expand_path("../../app/models/concerns/fog_extensions/kubevirt/vmnic", __dir__)
|
61
|
+
Fog::Kubevirt::Compute::VmNic.send(:include, ::FogExtensions::Kubevirt::VmNic)
|
66
62
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
63
|
+
require "fog/kubevirt/compute/models/networkattachmentdef"
|
64
|
+
require File.expand_path("../../app/models/concerns/fog_extensions/kubevirt/network", __dir__)
|
65
|
+
Fog::Kubevirt::Compute::Networkattachmentdef.send(:include, ::FogExtensions::Kubevirt::Network)
|
66
|
+
ComputeAttribute.send :include, ForemanKubevirt::ComputeAttributeExtensions
|
71
67
|
|
72
|
-
|
73
|
-
|
74
|
-
locale_domain = "foreman_kubevirt"
|
75
|
-
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
68
|
+
rescue StandardError => e
|
69
|
+
Rails.logger.warn "Foreman-Kubevirt: skipping engine hook (#{e})"
|
76
70
|
end
|
77
71
|
end
|
78
72
|
end
|
data/locale/Makefile
CHANGED
@@ -6,14 +6,15 @@
|
|
6
6
|
# make tx-update - download and merge translations from Transifex
|
7
7
|
# make clean - clean everything
|
8
8
|
#
|
9
|
-
DOMAIN =
|
10
|
-
VERSION = $(shell ruby -e '
|
9
|
+
DOMAIN = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).name')
|
10
|
+
VERSION = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).version')
|
11
11
|
POTFILE = $(DOMAIN).pot
|
12
12
|
MOFILE = $(DOMAIN).mo
|
13
13
|
POFILES = $(shell find . -name '$(DOMAIN).po')
|
14
14
|
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
|
15
15
|
POXFILES = $(patsubst %.po,%.pox,$(POFILES))
|
16
16
|
EDITFILES = $(patsubst %.po,%.edit.po,$(POFILES))
|
17
|
+
JSFILES = $(shell find ../app/assets/javascripts/*/locale -name '$(DOMAIN).js')
|
17
18
|
|
18
19
|
%.mo: %.po
|
19
20
|
mkdir -p $(shell dirname $@)/LC_MESSAGES
|
@@ -42,18 +43,20 @@ uniq-po:
|
|
42
43
|
done
|
43
44
|
|
44
45
|
tx-pull: $(EDITFILES)
|
45
|
-
tx pull -f
|
46
|
+
cd .. && tx pull -f --all
|
46
47
|
for f in $(EDITFILES) ; do \
|
47
48
|
sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
|
48
49
|
done
|
49
50
|
|
50
51
|
tx-update: tx-pull
|
51
52
|
@echo
|
52
|
-
@echo Run rake plugin:gettext[$(DOMAIN)] from the Foreman installation
|
53
|
+
@echo Run rake plugin:gettext[$(DOMAIN)] from the Foreman installation
|
54
|
+
@echo then run rake plugin:po_to_json[$(DOMAIN)] from the Foreman installation
|
55
|
+
@echo then run make -C locale mo-files to finish
|
53
56
|
@echo
|
54
57
|
|
55
58
|
mo-files: $(MOFILES)
|
56
|
-
git add $(POFILES) $(POTFILE) ../locale/*/LC_MESSAGES
|
59
|
+
git add $(POFILES) $(POTFILE) $(JSFILES) ../locale/*/LC_MESSAGES
|
57
60
|
git commit -m "i18n - pulling from tx"
|
58
61
|
@echo
|
59
62
|
@echo Changes commited!
|
Binary file
|
@@ -0,0 +1,227 @@
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the foreman_kubevirt package.
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
|
+
#
|
6
|
+
# Translators:
|
7
|
+
# Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2020
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: foreman_kubevirt 0.1.9\n"
|
12
|
+
"Report-Msgid-Bugs-To: \n"
|
13
|
+
"POT-Creation-Date: 2023-06-06 13:39+0200\n"
|
14
|
+
"PO-Revision-Date: 2020-05-26 07:39+0000\n"
|
15
|
+
"Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2020\n"
|
16
|
+
"Language-Team: Catalan (https://app.transifex.com/foreman/teams/114/ca/)\n"
|
17
|
+
"MIME-Version: 1.0\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
19
|
+
"Content-Transfer-Encoding: 8bit\n"
|
20
|
+
"Language: ca\n"
|
21
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
22
|
+
|
23
|
+
#: ../app/controllers/foreman_kubevirt/concerns/api/compute_resources_controller_extensions.rb:8
|
24
|
+
msgid "Token for KubeVirt only"
|
25
|
+
msgstr ""
|
26
|
+
|
27
|
+
#: ../app/controllers/foreman_kubevirt/concerns/api/compute_resources_controller_extensions.rb:9
|
28
|
+
msgid "Host name for KubeVirt only"
|
29
|
+
msgstr ""
|
30
|
+
|
31
|
+
#: ../app/controllers/foreman_kubevirt/concerns/api/compute_resources_controller_extensions.rb:10
|
32
|
+
msgid "Namespace for KubeVirt only"
|
33
|
+
msgstr ""
|
34
|
+
|
35
|
+
#: ../app/controllers/foreman_kubevirt/concerns/api/compute_resources_controller_extensions.rb:11
|
36
|
+
msgid "CA crt for KubeVirt only"
|
37
|
+
msgstr ""
|
38
|
+
|
39
|
+
#: ../app/controllers/foreman_kubevirt/concerns/api/compute_resources_controller_extensions.rb:12
|
40
|
+
msgid "API port for KubeVirt only"
|
41
|
+
msgstr ""
|
42
|
+
|
43
|
+
#: ../app/models/concerns/fog_extensions/kubevirt/server.rb:47
|
44
|
+
msgid "%{cpu_cores} Cores and %{memory} memory"
|
45
|
+
msgstr ""
|
46
|
+
|
47
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:70
|
48
|
+
msgid "The compute resource could not be authenticated"
|
49
|
+
msgstr ""
|
50
|
+
|
51
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:118
|
52
|
+
msgid "no Storage Classes available on provider"
|
53
|
+
msgstr ""
|
54
|
+
|
55
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:123
|
56
|
+
msgid "multus"
|
57
|
+
msgstr ""
|
58
|
+
|
59
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:123
|
60
|
+
msgid "genie"
|
61
|
+
msgstr ""
|
62
|
+
|
63
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:123
|
64
|
+
msgid "pod"
|
65
|
+
msgstr ""
|
66
|
+
|
67
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:344
|
68
|
+
msgid ""
|
69
|
+
"The remote system presented a public key signed by an unidentified certificate authority.\n"
|
70
|
+
" If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' button and submit"
|
71
|
+
msgstr ""
|
72
|
+
|
73
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:355
|
74
|
+
msgid "VM should be created based on Persistent Volume Claim or Image"
|
75
|
+
msgstr ""
|
76
|
+
|
77
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:360
|
78
|
+
msgid "It is not possible to set a bootable volume and image based provisioning."
|
79
|
+
msgstr ""
|
80
|
+
|
81
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:366
|
82
|
+
msgid "VM should be created based on an image"
|
83
|
+
msgstr ""
|
84
|
+
|
85
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:380 ../app/validators/volume_validator.rb:7
|
86
|
+
msgid "Volume size %s is not valid"
|
87
|
+
msgstr ""
|
88
|
+
|
89
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:386 ../app/views/compute_resources_vms/form/kubevirt/_volume.html.erb:22
|
90
|
+
msgid "Only one volume can be bootable"
|
91
|
+
msgstr ""
|
92
|
+
|
93
|
+
#: ../app/models/foreman_kubevirt/kubevirt.rb:473
|
94
|
+
msgid "cni_provider or network are missing"
|
95
|
+
msgstr ""
|
96
|
+
|
97
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:1 ../app/views/compute_resources/show/_kubevirt.html.erb:2
|
98
|
+
msgid "Hostname"
|
99
|
+
msgstr "Nom d'amfitrió"
|
100
|
+
|
101
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:2 ../app/views/compute_resources/show/_kubevirt.html.erb:7
|
102
|
+
msgid "API Port"
|
103
|
+
msgstr ""
|
104
|
+
|
105
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:3 ../app/views/compute_resources/show/_kubevirt.html.erb:12 ../app/views/compute_resources_vms/show/_kubevirt.html.erb:26
|
106
|
+
msgid "Namespace"
|
107
|
+
msgstr ""
|
108
|
+
|
109
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:4
|
110
|
+
msgid "Token"
|
111
|
+
msgstr "Testimoni"
|
112
|
+
|
113
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:6
|
114
|
+
msgid "e.g. eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9..."
|
115
|
+
msgstr ""
|
116
|
+
|
117
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:12
|
118
|
+
msgid "X509 Certification Authorities"
|
119
|
+
msgstr "Autoritats de certificació X509"
|
120
|
+
|
121
|
+
#: ../app/views/compute_resources/form/_kubevirt.html.erb:13
|
122
|
+
msgid "Optionally provide a CA, or a correctly ordered CA chain or a path to a file. If left blank - insecure."
|
123
|
+
msgstr ""
|
124
|
+
|
125
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:1 ../app/views/compute_resources_vms/index/_kubevirt.html.erb:3 ../app/views/compute_resources_vms/show/_kubevirt.html.erb:10
|
126
|
+
msgid "Name"
|
127
|
+
msgstr "Nom"
|
128
|
+
|
129
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:3 ../app/views/compute_resources_vms/index/_kubevirt.html.erb:4
|
130
|
+
msgid "CPUs"
|
131
|
+
msgstr "Nombre de CPU"
|
132
|
+
|
133
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:5 ../app/views/compute_resources_vms/index/_kubevirt.html.erb:5 ../app/views/compute_resources_vms/show/_kubevirt.html.erb:22
|
134
|
+
msgid "Memory"
|
135
|
+
msgstr "Memòria"
|
136
|
+
|
137
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:8
|
138
|
+
msgid "Power ON this machine"
|
139
|
+
msgstr "Engega aquesta màquina"
|
140
|
+
|
141
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:8
|
142
|
+
msgid "Start"
|
143
|
+
msgstr "Inicia"
|
144
|
+
|
145
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:19
|
146
|
+
msgid "Please select an image"
|
147
|
+
msgstr "Si us plau, seleccioneu una imatge"
|
148
|
+
|
149
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_base.html.erb:20 ../app/views/images/form/_kubevirt.html.erb:4
|
150
|
+
msgid "Image"
|
151
|
+
msgstr "Imatge"
|
152
|
+
|
153
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_network.html.erb:4
|
154
|
+
msgid "CNI Provider"
|
155
|
+
msgstr ""
|
156
|
+
|
157
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_network.html.erb:18
|
158
|
+
msgid "Network"
|
159
|
+
msgstr "Xarxa"
|
160
|
+
|
161
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_volume.html.erb:13
|
162
|
+
msgid "Storage Class"
|
163
|
+
msgstr ""
|
164
|
+
|
165
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_volume.html.erb:17
|
166
|
+
msgid "Size (GB)"
|
167
|
+
msgstr "Mida (GB)"
|
168
|
+
|
169
|
+
#: ../app/views/compute_resources_vms/form/kubevirt/_volume.html.erb:20
|
170
|
+
msgid "Bootable"
|
171
|
+
msgstr ""
|
172
|
+
|
173
|
+
#: ../app/views/compute_resources_vms/index/_kubevirt.html.erb:6
|
174
|
+
msgid "Power"
|
175
|
+
msgstr "Energia"
|
176
|
+
|
177
|
+
#: ../app/views/compute_resources_vms/index/_kubevirt.html.erb:7
|
178
|
+
msgid "Actions"
|
179
|
+
msgstr "Accions"
|
180
|
+
|
181
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:6
|
182
|
+
msgid "Properties"
|
183
|
+
msgstr "Propietats"
|
184
|
+
|
185
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:14
|
186
|
+
msgid "VCPU(s)"
|
187
|
+
msgstr ""
|
188
|
+
|
189
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:18
|
190
|
+
msgid "UUID"
|
191
|
+
msgstr "UUID"
|
192
|
+
|
193
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:30
|
194
|
+
msgid "Type"
|
195
|
+
msgstr "Tipus"
|
196
|
+
|
197
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:36
|
198
|
+
msgid "NIC"
|
199
|
+
msgstr "NIC"
|
200
|
+
|
201
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:43
|
202
|
+
msgid "Disk"
|
203
|
+
msgstr "Disc"
|
204
|
+
|
205
|
+
#: ../app/views/compute_resources_vms/show/_kubevirt.html.erb:49
|
206
|
+
msgid "Running on"
|
207
|
+
msgstr ""
|
208
|
+
|
209
|
+
#: ../app/views/images/form/_kubevirt.html.erb:1
|
210
|
+
msgid "The user that is used to ssh into the instance, normally cloud-user, ec2-user, ubuntu, root etc"
|
211
|
+
msgstr ""
|
212
|
+
|
213
|
+
#: ../app/views/images/form/_kubevirt.html.erb:2
|
214
|
+
msgid "Password to authenticate with - used for SSH finish step."
|
215
|
+
msgstr ""
|
216
|
+
|
217
|
+
#: ../app/views/images/form/_kubevirt.html.erb:3
|
218
|
+
msgid "Does this image support user data input (e.g. via cloud-init)?"
|
219
|
+
msgstr ""
|
220
|
+
|
221
|
+
#: ../app/views/images/form/_kubevirt.html.erb:4
|
222
|
+
msgid "The name of the image in the registry."
|
223
|
+
msgstr ""
|
224
|
+
|
225
|
+
#: gemspec.rb:2
|
226
|
+
msgid "Provision and manage Kubevirt Virtual Machines from Foreman."
|
227
|
+
msgstr ""
|