foreman_bootdisk 17.0.2 → 19.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/concerns/allowed_actions.rb +16 -0
  4. data/app/controllers/foreman_bootdisk/api/v2/disks_controller.rb +11 -2
  5. data/app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb +7 -0
  6. data/app/controllers/foreman_bootdisk/disks_controller.rb +71 -19
  7. data/app/controllers/foreman_bootdisk/subnet_disks_controller.rb +41 -0
  8. data/app/helpers/bootdisk_links_helper.rb +46 -0
  9. data/app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb +57 -43
  10. data/app/helpers/concerns/foreman_bootdisk/pretty_error.rb +13 -0
  11. data/app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb +45 -0
  12. data/app/helpers/disk_helper.rb +8 -0
  13. data/app/lib/foreman_bootdisk/scope/bootdisk.rb +24 -0
  14. data/app/models/concerns/foreman_bootdisk/host_ext.rb +6 -0
  15. data/app/models/concerns/foreman_bootdisk/orchestration/compute.rb +10 -3
  16. data/app/models/setting/bootdisk.rb +10 -1
  17. data/app/services/foreman_bootdisk/iso_generator.rb +23 -5
  18. data/app/views/foreman_bootdisk/disks/help.html.erb +16 -4
  19. data/app/views/foreman_bootdisk/generic_efi_host.erb +4 -0
  20. data/app/views/foreman_bootdisk/host.erb +7 -0
  21. data/app/views/subnets/_bootdisk_action_buttons.erb +1 -0
  22. data/app/views/subnets/_bootdisk_title_buttons.erb +1 -0
  23. data/config/routes.rb +2 -1
  24. data/db/migrate/20140522185700_change_templatekind_to_bootdisk.rb +3 -11
  25. data/lib/foreman_bootdisk/engine.rb +14 -2
  26. data/lib/foreman_bootdisk/version.rb +1 -1
  27. data/lib/tasks/bootdisk.rake +1 -19
  28. data/locale/action_names.rb +1 -1
  29. data/locale/ca/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  30. data/locale/ca/foreman_bootdisk.edit.po +393 -0
  31. data/locale/ca/foreman_bootdisk.po +47 -11
  32. data/locale/ca/foreman_bootdisk.po.time_stamp +0 -0
  33. data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  34. data/locale/de/foreman_bootdisk.edit.po +398 -0
  35. data/locale/de/foreman_bootdisk.po +63 -26
  36. data/locale/de/foreman_bootdisk.po.time_stamp +0 -0
  37. data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  38. data/locale/en/foreman_bootdisk.edit.po +388 -0
  39. data/locale/en/foreman_bootdisk.po +45 -9
  40. data/locale/en/foreman_bootdisk.po.time_stamp +0 -0
  41. data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  42. data/locale/en_GB/foreman_bootdisk.edit.po +394 -0
  43. data/locale/en_GB/foreman_bootdisk.po +47 -11
  44. data/locale/en_GB/foreman_bootdisk.po.time_stamp +0 -0
  45. data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  46. data/locale/es/foreman_bootdisk.edit.po +394 -0
  47. data/locale/es/foreman_bootdisk.po +69 -32
  48. data/locale/es/foreman_bootdisk.po.time_stamp +0 -0
  49. data/locale/foreman_bootdisk.pot +121 -63
  50. data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  51. data/locale/fr/foreman_bootdisk.edit.po +394 -0
  52. data/locale/fr/foreman_bootdisk.po +80 -43
  53. data/locale/fr/foreman_bootdisk.po.time_stamp +0 -0
  54. data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  55. data/locale/it/foreman_bootdisk.edit.po +391 -0
  56. data/locale/it/foreman_bootdisk.po +47 -11
  57. data/locale/it/foreman_bootdisk.po.time_stamp +0 -0
  58. data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  59. data/locale/ja/foreman_bootdisk.edit.po +393 -0
  60. data/locale/ja/foreman_bootdisk.po +70 -33
  61. data/locale/ja/foreman_bootdisk.po.time_stamp +0 -0
  62. data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  63. data/locale/ko/foreman_bootdisk.edit.po +390 -0
  64. data/locale/ko/foreman_bootdisk.po +47 -11
  65. data/locale/ko/foreman_bootdisk.po.time_stamp +0 -0
  66. data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  67. data/locale/pt_BR/foreman_bootdisk.edit.po +394 -0
  68. data/locale/pt_BR/foreman_bootdisk.po +79 -43
  69. data/locale/pt_BR/foreman_bootdisk.po.time_stamp +0 -0
  70. data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  71. data/locale/ru/foreman_bootdisk.edit.po +395 -0
  72. data/locale/ru/foreman_bootdisk.po +47 -11
  73. data/locale/ru/foreman_bootdisk.po.time_stamp +0 -0
  74. data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  75. data/locale/sv_SE/foreman_bootdisk.edit.po +392 -0
  76. data/locale/sv_SE/foreman_bootdisk.po +47 -11
  77. data/locale/sv_SE/foreman_bootdisk.po.time_stamp +0 -0
  78. data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  79. data/locale/zh_CN/foreman_bootdisk.edit.po +391 -0
  80. data/locale/zh_CN/foreman_bootdisk.po +113 -77
  81. data/locale/zh_CN/foreman_bootdisk.po.time_stamp +0 -0
  82. data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  83. data/locale/zh_TW/foreman_bootdisk.edit.po +391 -0
  84. data/locale/zh_TW/foreman_bootdisk.po +47 -11
  85. data/locale/zh_TW/foreman_bootdisk.po.time_stamp +0 -0
  86. data/package.json +42 -0
  87. data/webpack/__mocks__/foremanReact/common/HOC.js +30 -0
  88. data/webpack/__mocks__/foremanReact/common/I18n.js +7 -0
  89. data/webpack/__mocks__/foremanReact/common/helpers.js +7 -0
  90. data/webpack/__mocks__/foremanReact/common/urlHelpers.js +8 -0
  91. data/webpack/__mocks__/foremanReact/constants.js +24 -0
  92. data/webpack/__mocks__/foremanReact/redux/API/APISelectors.js +6 -0
  93. data/webpack/__mocks__/foremanReact/redux/API/index.js +10 -0
  94. data/webpack/global_index.js +12 -0
  95. data/webpack/global_test_setup.js +11 -0
  96. data/webpack/index.js +0 -0
  97. data/webpack/src/extensions/constants.js +2 -0
  98. data/webpack/src/extensions/host/HostBootdiskButtons.js +71 -0
  99. data/webpack/src/extensions/host/HostBootdiskButtonsSelectors.js +27 -0
  100. data/webpack/src/extensions/host/__tests__/HostBootdiskButtonsSelectors.test.js +66 -0
  101. data/webpack/src/extensions/host/__tests__/__snapshots__/HostBootdiskButtonsSelectors.test.js.snap +30 -0
  102. metadata +60 -66
  103. data/.tx/config +0 -8
  104. data/AUTHORS +0 -30
  105. data/release-gem +0 -84
  106. data/test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb +0 -97
  107. data/test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb +0 -37
  108. data/test/functional/foreman_bootdisk/disks_controller_test.rb +0 -107
  109. data/test/models/host/managed_test.rb +0 -26
  110. data/test/test_plugin_helper.rb +0 -72
  111. data/test/unit/access_permissions_test.rb +0 -10
  112. data/test/unit/concerns/compute_resources/vmware_test.rb +0 -83
  113. data/test/unit/concerns/host_test.rb +0 -84
  114. data/test/unit/concerns/orchestration/compute_test.rb +0 -69
  115. data/test/unit/foreman_bootdisk/renderer_test.rb +0 -36
  116. data/test/unit/foreman_bootdisk/scope/bootdisk_test.rb +0 -31
  117. data/test/unit/foreman_bootdisk/scope/full_host_bootdisk_test.rb +0 -30
  118. data/test/unit/iso_generator_test.rb +0 -74
@@ -10,6 +10,8 @@ require 'uri'
10
10
  # requires syslinux, ipxe/ipxe-bootimgs, genisoimage, isohybrid
11
11
  module ForemanBootdisk
12
12
  class ISOGenerator
13
+ extend Foreman::HTTPProxy
14
+
13
15
  def self.generate_full_host(host, opts = {}, &block)
14
16
  raise Foreman::Exception.new(N_('Host is not in build mode, so the template cannot be rendered')) unless host.build?
15
17
 
@@ -83,8 +85,8 @@ module ForemanBootdisk
83
85
  EOT
84
86
  end
85
87
 
86
- # Temporary directory cannot be cleaned inprocess due to send_file offloaded to web server
87
- wd = Dir.mktmpdir('bootdisk-iso-')
88
+ # And create new temporary directory:
89
+ wd = Dir.mktmpdir('bootdisk-iso-', Rails.root.join('tmp'))
88
90
  Dir.mkdir(File.join(wd, 'build'))
89
91
 
90
92
  if opts[:isolinux]
@@ -132,8 +134,8 @@ module ForemanBootdisk
132
134
  File.join(Setting[:bootdisk_grub2_dir], 'grubx64.efi').to_s => 'GRUBX64.EFI',
133
135
  File.join(Setting[:bootdisk_grub2_dir], 'shimx64.efi').to_s => 'BOOTX64.EFI',
134
136
  }.each do |src, dest|
135
- raise(Foreman::Exception.new(N_('Ensure %{path} contains grubx64.efi and shimx64.efi: install TFTP module or copy those files into /var/lib/foreman/bootdisk (Grub2 directory setting)'), path: src)) unless File.exist?(src)
136
- raise(Foreman::Exception.new(N_('Unable to mcopy %{path}'), path: src)) unless system("mcopy -m -i #{efibootimg} '#{src}' '#{"::/EFI/BOOT/#{dest}"}'")
137
+ raise(Foreman::Exception.new(N_('Ensure %{file} is readable (or update "Grub2 directory" setting)'), file: src)) unless File.exist?(src)
138
+ raise(Foreman::Exception.new(N_('Unable to mcopy %{file}'), file: src)) unless system("mcopy -m -i #{efibootimg} '#{src}' '#{"::/EFI/BOOT/#{dest}"}'")
137
139
  end
138
140
  mkiso_args = "-eltorito-alt-boot -e efiboot.img -no-emul-boot"
139
141
  isohybrod_args = ["--uefi"]
@@ -161,6 +163,15 @@ module ForemanBootdisk
161
163
  raise Foreman::Exception.new(N_('ISO hybrid conversion failed: %s'), $?) unless system(*["isohybrid", isohybrod_args, iso].flatten.compact)
162
164
 
163
165
  yield iso
166
+ ensure
167
+ # Clean the working directory (not the ISO file itself)
168
+ FileUtils.rm_f(File.join(wd, 'build'))
169
+ # Temporary directory cannot be cleaned in-process due to asynchronous send_file call.
170
+ # Also we cannot rely on systemd-tmpfiles-clean as private temporary files are not subject
171
+ # of scheduled cleanups. Let's clean bootdisks from prevous requests manually by finding
172
+ # and deleting all directories created 30 minutes ago.
173
+ delete_older_than = Time.now.to_i - (60 * 30)
174
+ Rails.root.glob('tmp/bootdisk-iso-*').select { |f| File.ctime(f) < delete_older_than }.each { |f| FileUtils.rm_f(f) }
164
175
  end
165
176
 
166
177
  def self.build_mkiso_command(output_file:, source_directory:, extra_commands:)
@@ -200,7 +211,14 @@ module ForemanBootdisk
200
211
  ForemanBootdisk.logger.info("Fetching #{uri}")
201
212
  write_cache = use_cache
202
213
  uri = URI(uri)
203
- Net::HTTP.start(uri.host, uri.port) do |http|
214
+
215
+ if proxy_http_request?(nil, uri.host, uri.scheme)
216
+ proxy_uri = URI.parse(http_proxy)
217
+ http_object = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password)
218
+ else
219
+ http_object = Net::HTTP
220
+ end
221
+ http_object.start(uri.host, uri.port) do |http|
204
222
  request = Net::HTTP::Get.new(uri.request_uri, 'Accept-Encoding' => 'plain')
205
223
 
206
224
  http.request(request) do |response|
@@ -9,7 +9,12 @@
9
9
  <%= _('All images are usable as either ISOs or as disk images, including being written to a USB disk with `dd`.') %>
10
10
  </p>
11
11
 
12
- <h2><%= _('Host image') %></h2>
12
+ <h2><%= _('Host images') %></h2>
13
+ <p>
14
+ <%= _('These images are used for host. You can find them at host detail page.') %>
15
+ </p>
16
+
17
+ <h3><%= _('Host image') %><%= mark_disabled_bootdisk_type('host') %></h3>
13
18
  <p>
14
19
  <%= _("Per-host images contain data about a particular host registered in Foreman and set up fully static networking, avoiding the requirement for DHCP. After networking is configured, they chainload from Foreman, picking up the current OS configuration and build state from the server.") %>
15
20
  </p>
@@ -17,12 +22,17 @@
17
22
  <%= _("Once chainloaded, the OS bootloader and installer are downloaded directly from the installation media configured in Foreman, and the provisioning script (kickstart/preseed) is downloaded from Foreman.") %>
18
23
  </p>
19
24
 
20
- <h2><%= _('Full host image') %></h2>
25
+ <h3><%= _('Full host image') %><%= mark_disabled_bootdisk_type('full_host') %></h3>
21
26
  <p>
22
27
  <%= _('A variant of the per-host image which contains the OS bootloader embedded inside the disk. This may be useful if chainloading fails on certain hardware, but has the downside that the image must be regenerated for any change in the OS, bootloader or PXELinux templates.') %>
23
28
  </p>
24
29
 
25
- <h2><%= _('Generic image') %></h2>
30
+ <h2><%= _('Generic images') %></h2>
31
+ <p>
32
+ <%= _('These images are more generic than previous images. You can find them at subnet index page.') %>
33
+ </p>
34
+
35
+ <h3><%= _('Generic image') %><%= mark_disabled_bootdisk_type('generic') %></h3>
26
36
  <p>
27
37
  <%= _('Generic images are a reusable disk image that works for any host registered in Foreman. It requires a basic DHCP and DNS service to function and contact the server, but does not require DHCP reservations or static IP addresses.') %>
28
38
  </p>
@@ -30,11 +40,13 @@
30
40
  <%= _('The OS install continues using the installation media configured in Foreman, and it will typically configure static networking, depending on how the OS iPXE template is configured.') %>
31
41
  </p>
32
42
 
33
- <h2><%= _('Subnet image') %></h2>
43
+ <h3><%= _('Subnet image') %><%= mark_disabled_bootdisk_type('subnet') %></h3>
34
44
  <p>
35
45
  <%= _('Subnet images are similar to generic images, but chain-loading is done via the TFTP Smart Proxy assigned to the Subnet of the host. The smart proxy must have the "Templates" module enabled and configured.') %>
36
46
  </p>
37
47
  <p>
38
48
  <%= _('This image is generic for all hosts with a provisioning NIC on that subnet.') %>
39
49
  </p>
50
+
51
+ <p><%= _('* - These bootdisk types were disabled, you can enable them in Administer - Settings.') %></p>
40
52
  </div>
@@ -44,6 +44,10 @@ net_bootp
44
44
  net_ls_addr
45
45
  net_ls_routes
46
46
  net_ls_dns
47
+ echo Trying to ping proxy_httpboot_host: <%= proxy_httpboot_host %>
48
+ ping --count 1 <%= proxy_httpboot_host %> || echo Ping to proxy_httpboot_host failed or ping command not available.
49
+ echo Trying to ping proxy_template_host: <%= proxy_template_host %>
50
+ ping --count 1 <%= proxy_template_host %> || echo Ping to proxy_template_host failed or ping command not available.
47
51
  sleep 5
48
52
  set root=(<%= proxy_proto %>,<%= proxy_httpboot_host %>:<%= proxy_port %>)
49
53
  # The variable will not survive configfile fetch, therefore absolute path
@@ -58,6 +58,13 @@ set dns <%= dns %>
58
58
  set domain <%= interface.domain.to_s %>
59
59
  <% end %>
60
60
 
61
+ echo Trying to ping Gateway: ${netX/gateway}
62
+ ping --count 1 ${netX/gateway} || echo Ping to Gateway failed or ping command not available.
63
+ <% if dns.present? -%>
64
+ echo Trying to ping DNS: ${netX/dns}
65
+ ping --count 1 ${netX/dns} || echo Ping to DNS failed or ping command not available.
66
+ <% end %>
67
+
61
68
  # Chainload from Foreman rather than embedding OS info here, so the behaviour
62
69
  # is entirely dynamic.
63
70
  chain <%= bootdisk_chain_url %>
@@ -0,0 +1 @@
1
+ <%= display_bootdisk_for_subnet(subject) %>
@@ -0,0 +1 @@
1
+ <%= display_bootdisk_title_buttons %>
data/config/routes.rb CHANGED
@@ -7,7 +7,8 @@ ForemanBootdisk::Engine.routes.draw do
7
7
  constraints(id: %r{[^/]+}) do
8
8
  get 'hosts/:id', on: :collection, to: 'disks#host'
9
9
  get 'full_hosts/:id', on: :collection, to: 'disks#full_host'
10
- get 'subnet/:id', on: :collection, to: 'disks#subnet'
10
+ get 'subnet/:id', on: :collection, to: 'subnet_disks#subnet'
11
+ get 'bootdisk_options/:id', on: :collection, to: 'disks#bootdisk_options'
11
12
  end
12
13
  end
13
14
 
@@ -1,22 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ChangeTemplatekindToBootdisk < ActiveRecord::Migration[4.2]
4
- class FakeConfigTemplate < ApplicationRecord
5
- self.table_name = if ActiveRecord::Base.connection.migration_context.get_all_versions.include?(20_150_514_072_626)
6
- 'templates'
7
- else
8
- 'config_templates'
9
- end
10
- end
11
-
12
4
  def self.up
13
5
  kind = TemplateKind.where(name: 'Bootdisk').first_or_create
14
6
 
15
7
  tmpl_h = Setting.find_by(name: 'bootdisk_host_template').try(:value)
16
8
  tmpl_g = Setting.find_by(name: 'bootdisk_generic_host_template').try(:value)
17
9
 
18
- (FakeConfigTemplate.unscoped.where('name LIKE ?', '%Boot disk%') |
19
- FakeConfigTemplate.unscoped.where(name: [tmpl_h, tmpl_g].compact)).each do |tmpl|
10
+ (Template.unscoped.where('name LIKE ?', '%Boot disk%') |
11
+ Template.unscoped.where(name: [tmpl_h, tmpl_g].compact)).each do |tmpl|
20
12
  tmpl.update_attribute(:template_kind_id, kind.id)
21
13
  end
22
14
  end
@@ -26,6 +18,6 @@ class ChangeTemplatekindToBootdisk < ActiveRecord::Migration[4.2]
26
18
  new_kind = TemplateKind.find_by(name: 'iPXE')
27
19
  return unless old_kind.present? && new_kind.present?
28
20
 
29
- FakeConfigTemplate.unscoped.where(template_kind_id: old_kind.id).update_all(template_kind_id: new_kind.id)
21
+ Template.unscoped.where(template_kind_id: old_kind.id).update_all(template_kind_id: new_kind.id)
30
22
  end
31
23
  end
@@ -38,10 +38,13 @@ module ForemanBootdisk
38
38
 
39
39
  initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |_app|
40
40
  Foreman::Plugin.register :foreman_bootdisk do
41
- requires_foreman '>= 2.1'
41
+ requires_foreman '>= 3.1'
42
+ # Add Global files for extending foreman-core components and routes
43
+ register_global_js_file 'global'
42
44
 
43
45
  security_block :bootdisk do |_map|
44
- permission :download_bootdisk, 'foreman_bootdisk/disks': %i[generic host full_host subnet help],
46
+ permission :download_bootdisk, 'foreman_bootdisk/disks': %i[generic host full_host help bootdisk_options],
47
+ 'foreman_bootdisk/subnet_disks': [:subnet],
45
48
  'foreman_bootdisk/api/v2/disks': %i[generic host],
46
49
  'foreman_bootdisk/api/v2/subnet_disks': [:subnet]
47
50
  end
@@ -51,9 +54,17 @@ module ForemanBootdisk
51
54
  add_all_permissions_to_default_roles
52
55
 
53
56
  apipie_documented_controllers ["#{ForemanBootdisk::Engine.root}/app/controllers/foreman_bootdisk/api/v2/*.rb"]
57
+ ApipieDSL.configuration.dsl_classes_matchers += [
58
+ "#{ForemanBootdisk::Engine.root}/app/lib/foreman_bootdisk/scope/*.rb"
59
+ ]
54
60
  provision_method 'bootdisk', N_('Boot disk based')
55
61
  template_labels 'Bootdisk' => N_('Boot disk embedded template')
56
62
  allowed_template_helpers :bootdisk_chain_url, :bootdisk_raise
63
+
64
+ extend_page "subnets/index" do |cx|
65
+ cx.add_pagelet :subnet_index_action_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_action_buttons'
66
+ cx.add_pagelet :subnet_index_title_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_title_buttons'
67
+ end
57
68
  end
58
69
  end
59
70
 
@@ -68,6 +79,7 @@ module ForemanBootdisk
68
79
  Host::Managed.prepend ForemanBootdisk::HostExt
69
80
  Host::Managed.include ForemanBootdisk::Orchestration::Compute if SETTINGS[:unattended]
70
81
  HostsHelper.prepend ForemanBootdisk::HostsHelperExt
82
+ SubnetsHelper.prepend ForemanBootdisk::SubnetsHelperExt
71
83
  Foreman::Model::Vmware.prepend ForemanBootdisk::ComputeResources::Vmware if Foreman::Model::Vmware.available?
72
84
  rescue StandardError => e
73
85
  Rails.logger.warn "#{ForemanBootdisk::ENGINE_NAME}: skipping engine hook (#{e})"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanBootdisk
4
- VERSION = '17.0.2'
4
+ VERSION = '19.0.0'
5
5
  end
@@ -88,23 +88,5 @@ end
88
88
 
89
89
  Rake::Task[:test].enhance ['test:foreman_bootdisk']
90
90
 
91
- namespace :foreman_bootdisk do
92
- task :rubocop do
93
- begin
94
- require 'rubocop/rake_task'
95
- RuboCop::RakeTask.new(:rubocop_foreman_bootdisk) do |task|
96
- task.patterns = ["#{ForemanBootdisk::Engine.root}/app/**/*.rb",
97
- "#{ForemanBootdisk::Engine.root}/lib/**/*.rb",
98
- "#{ForemanBootdisk::Engine.root}/test/**/*.rb"]
99
- task.options << '--auto-correct' if ENV['RUBOCOP_AUTOCORRECT']
100
- end
101
- rescue StandardError
102
- puts 'Rubocop not loaded.'
103
- end
104
-
105
- Rake::Task['rubocop_foreman_bootdisk'].invoke
106
- end
107
- end
108
-
109
91
  load 'tasks/jenkins.rake'
110
- Rake::Task['jenkins:unit'].enhance ['test:foreman_bootdisk', 'foreman_bootdisk:rubocop'] if Rake::Task.task_defined?(:'jenkins:unit')
92
+ Rake::Task['jenkins:unit'].enhance ['test:foreman_bootdisk'] if Rake::Task.task_defined?(:'jenkins:unit')
@@ -1,5 +1,5 @@
1
1
  # Autogenerated!
2
2
  _("Remote action:")
3
- _("Import facts")
4
3
  _("Import Puppet classes")
4
+ _("Import facts")
5
5
  _("Action with sub plans")
@@ -0,0 +1,393 @@
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_bootdisk package.
4
+ #
5
+ # Translators:
6
+ # Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2017
7
+ # Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2015-2016
8
+ msgid ""
9
+ msgstr ""
10
+ "Project-Id-Version: foreman_bootdisk 18.1.0\n"
11
+ "Report-Msgid-Bugs-To: \n"
12
+ "POT-Creation-Date: 2021-11-30 18:05+0100\n"
13
+ "PO-Revision-Date: 2021-09-24 07:25+0000\n"
14
+ "Last-Translator: Transifex Bot <>\n"
15
+ "Language-Team: Catalan (http://www.transifex.com/foreman/foreman/language/ca/)"
16
+ "\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/concerns/allowed_actions.rb:7
24
+ msgid "This type of bootdisk is not allowed. Please contact administrator."
25
+ msgstr ""
26
+
27
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:21 ../app/views/foreman_bootdisk/disks/help.html.erb:1
28
+ msgid "Boot disks"
29
+ msgstr "Discs d'arrencada"
30
+
31
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:24
32
+ msgid "Download generic image"
33
+ msgstr "Baixa la imatge genèrica"
34
+
35
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:33
36
+ msgid "Download host image"
37
+ msgstr "Baixa la imatge d'amfitrió"
38
+
39
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:34
40
+ msgid "True for full, false for basic reusable image"
41
+ msgstr ""
42
+
43
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:46 ../app/controllers/foreman_bootdisk/disks_controller.rb:126 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:90
44
+ msgid "Host is not in build mode"
45
+ msgstr ""
46
+
47
+ #: ../app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb:23
48
+ msgid "Subnet boot disks"
49
+ msgstr "Discs d'arrencada de subxarxa"
50
+
51
+ #: ../app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb:26
52
+ msgid "Download subnet generic image"
53
+ msgstr "Baixa la imatge genèrica de subxarxa"
54
+
55
+ #: ../app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb:30 ../app/controllers/foreman_bootdisk/subnet_disks_controller.rb:15
56
+ msgid "TFTP feature not enabled for subnet %s"
57
+ msgstr "La funcionalitat TFTP no està habilitada per a la subxarxa %s"
58
+
59
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:63
60
+ msgid "Host is not in build mode."
61
+ msgstr ""
62
+
63
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:95 ../app/helpers/concerns/foreman_bootdisk/pretty_error.rb:8
64
+ msgid "Failed to render boot disk template"
65
+ msgstr ""
66
+
67
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:120 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:66
68
+ msgid "Host '%s' image"
69
+ msgstr ""
70
+
71
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:120 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:76 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:86
72
+ msgid "Full host '%s' image"
73
+ msgstr ""
74
+
75
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:132
76
+ msgid "Boot disk help"
77
+ msgstr ""
78
+
79
+ #: ../app/helpers/bootdisk_links_helper.rb:27
80
+ msgid "Boot disk Help"
81
+ msgstr ""
82
+
83
+ #: ../app/helpers/bootdisk_links_helper.rb:40 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:20 ../app/models/setting/bootdisk.rb:30 ../webpack/src/extensions/host/HostBootdiskButtons.js:65
84
+ msgid "Boot disk"
85
+ msgstr "Disc d'arrencada"
86
+
87
+ #: ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:21 ../webpack/src/extensions/host/HostBootdiskButtons.js:54
88
+ msgid "Boot disk download not available for %s architecture"
89
+ msgstr ""
90
+
91
+ #: ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:30
92
+ msgid "Subnet '%s' generic image"
93
+ msgstr ""
94
+
95
+ #: ../app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb:10
96
+ msgid "Subnet generic image"
97
+ msgstr ""
98
+
99
+ #: ../app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb:27 ../app/views/foreman_bootdisk/disks/help.html.erb:35
100
+ msgid "Generic image"
101
+ msgstr "Imatge genèrica"
102
+
103
+ #: ../app/models/concerns/foreman_bootdisk/host_ext.rb:12 ../app/services/foreman_bootdisk/renderer.rb:53 ../app/services/foreman_bootdisk/renderer.rb:60
104
+ msgid "Unable to find template specified by %s setting"
105
+ msgstr "No es pot trobar la plantilla especificada per l'ajust %s"
106
+
107
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:30
108
+ msgid "Generating ISO image for %s"
109
+ msgstr ""
110
+
111
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:32
112
+ msgid "Upload ISO image to datastore for %s"
113
+ msgstr ""
114
+
115
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:34
116
+ msgid "Attach ISO image to CDROM drive for %s"
117
+ msgstr ""
118
+
119
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:38
120
+ msgid "Detach ISO image from CDROM drive for %s"
121
+ msgstr ""
122
+
123
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:73
124
+ msgid "Failed to generate ISO image for instance %{name}: %{message}"
125
+ msgstr ""
126
+
127
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:82
128
+ msgid "Failed to upload ISO image for instance %{name}: %{message}"
129
+ msgstr ""
130
+
131
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:91
132
+ msgid "Failed to attach ISO image to CDROM drive of instance %{name}: %{message}"
133
+ msgstr ""
134
+
135
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:100
136
+ msgid "Failed to detach ISO image from CDROM drive of instance %{name}: %{message}"
137
+ msgstr ""
138
+
139
+ #: ../app/models/setting/bootdisk.rb:13
140
+ msgid "Path to directory containing iPXE images"
141
+ msgstr "El camí al directori que conté les imatges iPXE"
142
+
143
+ #: ../app/models/setting/bootdisk.rb:13
144
+ msgid "iPXE directory"
145
+ msgstr "Directori iPXE"
146
+
147
+ #: ../app/models/setting/bootdisk.rb:14
148
+ msgid "Path to directory containing isolinux images"
149
+ msgstr "El camí al directori que conté les imatges isolinux"
150
+
151
+ #: ../app/models/setting/bootdisk.rb:14
152
+ msgid "ISOLINUX directory"
153
+ msgstr ""
154
+
155
+ #: ../app/models/setting/bootdisk.rb:15
156
+ msgid "Path to directory containing syslinux images"
157
+ msgstr "El camí al directori que conté les imatges syslinux"
158
+
159
+ #: ../app/models/setting/bootdisk.rb:15
160
+ msgid "SYSLINUX directory"
161
+ msgstr ""
162
+
163
+ #: ../app/models/setting/bootdisk.rb:16
164
+ msgid "Path to directory containing grubx64.efi and shimx64.efi"
165
+ msgstr ""
166
+
167
+ #: ../app/models/setting/bootdisk.rb:16
168
+ msgid "Grub2 directory"
169
+ msgstr ""
170
+
171
+ #: ../app/models/setting/bootdisk.rb:17
172
+ msgid "iPXE template to use for host-specific boot disks"
173
+ msgstr ""
174
+
175
+ #: ../app/models/setting/bootdisk.rb:18
176
+ msgid "Host image template"
177
+ msgstr ""
178
+
179
+ #: ../app/models/setting/bootdisk.rb:19
180
+ msgid "iPXE template to use for generic host boot disks"
181
+ msgstr ""
182
+
183
+ #: ../app/models/setting/bootdisk.rb:20
184
+ msgid "Generic image template"
185
+ msgstr ""
186
+
187
+ #: ../app/models/setting/bootdisk.rb:21
188
+ msgid "Grub2 template to use for generic EFI host boot disks"
189
+ msgstr ""
190
+
191
+ #: ../app/models/setting/bootdisk.rb:22
192
+ msgid "Generic Grub2 EFI image template"
193
+ msgstr ""
194
+
195
+ #: ../app/models/setting/bootdisk.rb:23
196
+ msgid "Command to generate ISO image, use genisoimage or mkisofs"
197
+ msgstr "L'ordre per generar la imatge ISO, utilitzeu genisoimage o mkisofs"
198
+
199
+ #: ../app/models/setting/bootdisk.rb:23
200
+ msgid "ISO generation command"
201
+ msgstr ""
202
+
203
+ #: ../app/models/setting/bootdisk.rb:24
204
+ msgid "Installation media files will be cached for full host images"
205
+ msgstr "Els fitxers dels mitjans d'instal·lació s'emmagatzemaran en memòria cau per a les imatges completes dels amfitrions"
206
+
207
+ #: ../app/models/setting/bootdisk.rb:24
208
+ msgid "Installation media caching"
209
+ msgstr ""
210
+
211
+ #: ../app/models/setting/bootdisk.rb:25
212
+ msgid "List of allowed bootdisk types, remove type to disable it"
213
+ msgstr ""
214
+
215
+ #: ../app/models/setting/bootdisk.rb:25
216
+ msgid "Allowed bootdisk types"
217
+ msgstr ""
218
+
219
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:16
220
+ msgid "Host is not in build mode, so the template cannot be rendered"
221
+ msgstr ""
222
+
223
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:42
224
+ msgid "Unable to generate disk template, %{kind} template not found."
225
+ msgstr ""
226
+
227
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:52
228
+ msgid "Unable to generate disk %{kind} template: %{error}"
229
+ msgstr ""
230
+
231
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:94
232
+ msgid "Please ensure the isolinux/syslinux package(s) are installed."
233
+ msgstr ""
234
+
235
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:111
236
+ msgid "Please ensure the ipxe-bootimgs package is installed."
237
+ msgstr ""
238
+
239
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:128
240
+ msgid "Creating new image failed, install truncate utility"
241
+ msgstr ""
242
+
243
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:129
244
+ msgid "Failed to format the ESP image via mkfs.msdos"
245
+ msgstr ""
246
+
247
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:130 ../app/services/foreman_bootdisk/iso_generator.rb:131
248
+ msgid "Failed to create a directory within the ESP image"
249
+ msgstr ""
250
+
251
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:137
252
+ msgid "Ensure %{file} is readable (or update \"Grub2 directory\" setting)"
253
+ msgstr ""
254
+
255
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:138
256
+ msgid "Unable to mcopy %{file}"
257
+ msgstr ""
258
+
259
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:160
260
+ msgid "ISO build failed"
261
+ msgstr "No s'ha pogut construir l'ISO"
262
+
263
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:163
264
+ msgid "ISO hybrid conversion failed: %s"
265
+ msgstr ""
266
+
267
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:2
268
+ msgid "Back"
269
+ msgstr "Enrere"
270
+
271
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:6
272
+ msgid "Various types of boot disks can be created to provision hosts without the need for PXE services. Boot disks can be attached to the host (physical or virtual) which boots from the disk, contacts Foreman and begins the OS installation."
273
+ msgstr ""
274
+
275
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:9
276
+ msgid "All images are usable as either ISOs or as disk images, including being written to a USB disk with `dd`."
277
+ msgstr ""
278
+
279
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:12
280
+ msgid "Host images"
281
+ msgstr ""
282
+
283
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:14
284
+ msgid "These images are used for host. You can find them at host detail page."
285
+ msgstr ""
286
+
287
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:17
288
+ msgid "Host image"
289
+ msgstr "Imatge d'amfitrió"
290
+
291
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:19
292
+ msgid "Per-host images contain data about a particular host registered in Foreman and set up fully static networking, avoiding the requirement for DHCP. After networking is configured, they chainload from Foreman, picking up the current OS configuration and build state from the server."
293
+ msgstr ""
294
+
295
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:22
296
+ msgid "Once chainloaded, the OS bootloader and installer are downloaded directly from the installation media configured in Foreman, and the provisioning script (kickstart/preseed) is downloaded from Foreman."
297
+ msgstr ""
298
+
299
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:25
300
+ msgid "Full host image"
301
+ msgstr "Imatge completa d'amfitrió"
302
+
303
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:27
304
+ msgid "A variant of the per-host image which contains the OS bootloader embedded inside the disk. This may be useful if chainloading fails on certain hardware, but has the downside that the image must be regenerated for any change in the OS, bootloader or PXELinux templates."
305
+ msgstr ""
306
+
307
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:30
308
+ msgid "Generic images"
309
+ msgstr ""
310
+
311
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:32
312
+ msgid "These images are more generic than previous images. You can find them at subnet index page."
313
+ msgstr ""
314
+
315
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:37
316
+ msgid "Generic images are a reusable disk image that works for any host registered in Foreman. It requires a basic DHCP and DNS service to function and contact the server, but does not require DHCP reservations or static IP addresses."
317
+ msgstr ""
318
+
319
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:40
320
+ msgid "The OS install continues using the installation media configured in Foreman, and it will typically configure static networking, depending on how the OS iPXE template is configured."
321
+ msgstr ""
322
+
323
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:43
324
+ msgid "Subnet image"
325
+ msgstr "Imatge de subxarxa"
326
+
327
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:45
328
+ msgid "Subnet images are similar to generic images, but chain-loading is done via the TFTP Smart Proxy assigned to the Subnet of the host. The smart proxy must have the \"Templates\" module enabled and configured."
329
+ msgstr ""
330
+
331
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:48
332
+ msgid "This image is generic for all hosts with a provisioning NIC on that subnet."
333
+ msgstr ""
334
+
335
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:51
336
+ msgid "* - These bootdisk types were disabled, you can enable them in Administer - Settings."
337
+ msgstr ""
338
+
339
+ #: ../app/views/foreman_bootdisk/host.erb:9
340
+ msgid "Host has no provisioning interface defined"
341
+ msgstr "L'amfitrió no té definida cap interfície d'aprovisionament"
342
+
343
+ #: ../app/views/foreman_bootdisk/host.erb:10
344
+ msgid "Host has no IPv4 or IPv6 address defined"
345
+ msgstr ""
346
+
347
+ #: ../app/views/foreman_bootdisk/host.erb:11
348
+ msgid "Host has no subnet defined"
349
+ msgstr "L'amfitrió no té definida cap subxarxa"
350
+
351
+ #: ../app/views/foreman_bootdisk/host.erb:12
352
+ msgid "Host has no domain defined"
353
+ msgstr "L'amfitrió no té definit cap domini"
354
+
355
+ #: ../app/views/foreman_bootdisk/host.erb:19
356
+ msgid "Host bootdisk does not work with static IPv6"
357
+ msgstr ""
358
+
359
+ #: ../app/views/foreman_bootdisk/host.erb:21
360
+ msgid "Both IP and Subnet must be set"
361
+ msgstr ""
362
+
363
+ #: ../lib/foreman_bootdisk/engine.rb:60
364
+ msgid "Boot disk based"
365
+ msgstr ""
366
+
367
+ #: ../lib/foreman_bootdisk/engine.rb:61
368
+ msgid "Boot disk embedded template"
369
+ msgstr ""
370
+
371
+ #: ../webpack/src/extensions/host/HostBootdiskButtons.js:59
372
+ msgid "Not available"
373
+ msgstr ""
374
+
375
+ #: action_names.rb:2
376
+ msgid "Remote action:"
377
+ msgstr ""
378
+
379
+ #: action_names.rb:3
380
+ msgid "Import Puppet classes"
381
+ msgstr ""
382
+
383
+ #: action_names.rb:4
384
+ msgid "Import facts"
385
+ msgstr ""
386
+
387
+ #: action_names.rb:5
388
+ msgid "Action with sub plans"
389
+ msgstr ""
390
+
391
+ #: gemspec.rb:4
392
+ msgid "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure."
393
+ msgstr ""