foreman_bootdisk 21.2.3 → 22.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_bootdisk/locale/ca/foreman_bootdisk.js +108 -120
  3. data/app/assets/javascripts/foreman_bootdisk/locale/cs_CZ/foreman_bootdisk.js +105 -117
  4. data/app/assets/javascripts/foreman_bootdisk/locale/de/foreman_bootdisk.js +158 -170
  5. data/app/assets/javascripts/foreman_bootdisk/locale/en/foreman_bootdisk.js +85 -97
  6. data/app/assets/javascripts/foreman_bootdisk/locale/en_GB/foreman_bootdisk.js +157 -169
  7. data/app/assets/javascripts/foreman_bootdisk/locale/es/foreman_bootdisk.js +158 -170
  8. data/app/assets/javascripts/foreman_bootdisk/locale/fr/foreman_bootdisk.js +158 -170
  9. data/app/assets/javascripts/foreman_bootdisk/locale/it/foreman_bootdisk.js +118 -130
  10. data/app/assets/javascripts/foreman_bootdisk/locale/ja/foreman_bootdisk.js +157 -169
  11. data/app/assets/javascripts/foreman_bootdisk/locale/ka/foreman_bootdisk.js +157 -169
  12. data/app/assets/javascripts/foreman_bootdisk/locale/ko/foreman_bootdisk.js +158 -170
  13. data/app/assets/javascripts/foreman_bootdisk/locale/pt_BR/foreman_bootdisk.js +157 -169
  14. data/app/assets/javascripts/foreman_bootdisk/locale/ru/foreman_bootdisk.js +131 -143
  15. data/app/assets/javascripts/foreman_bootdisk/locale/sv_SE/foreman_bootdisk.js +103 -115
  16. data/app/assets/javascripts/foreman_bootdisk/locale/zh_CN/foreman_bootdisk.js +156 -168
  17. data/app/assets/javascripts/foreman_bootdisk/locale/zh_TW/foreman_bootdisk.js +129 -141
  18. data/app/lib/foreman_bootdisk/scope/bootdisk.rb +0 -42
  19. data/app/lib/foreman_bootdisk/template_helpers.rb +48 -0
  20. data/app/services/foreman_bootdisk/iso_generator.rb +1 -1
  21. data/config/initializers/inflections.rb +5 -0
  22. data/db/migrate/20131021095100_edit_host_bootdisk_template_dns_secondary.rb +1 -1
  23. data/lib/foreman_bootdisk/engine.rb +102 -107
  24. data/lib/foreman_bootdisk/engine.rb.orig +106 -109
  25. data/lib/foreman_bootdisk/version.rb +1 -1
  26. data/locale/Makefile +12 -2
  27. data/locale/ca/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  28. data/locale/ca/foreman_bootdisk.edit.po +1 -1
  29. data/locale/ca/foreman_bootdisk.po +1 -13
  30. data/locale/cs_CZ/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  31. data/locale/cs_CZ/foreman_bootdisk.edit.po +32 -34
  32. data/locale/cs_CZ/foreman_bootdisk.po +30 -40
  33. data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  34. data/locale/de/foreman_bootdisk.edit.po +3 -3
  35. data/locale/de/foreman_bootdisk.po +3 -15
  36. data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  37. data/locale/en/foreman_bootdisk.edit.po +1 -1
  38. data/locale/en/foreman_bootdisk.po +9 -19
  39. data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  40. data/locale/en_GB/foreman_bootdisk.edit.po +1 -1
  41. data/locale/en_GB/foreman_bootdisk.po +1 -13
  42. data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  43. data/locale/es/foreman_bootdisk.edit.po +1 -1
  44. data/locale/es/foreman_bootdisk.po +6 -16
  45. data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  46. data/locale/fr/foreman_bootdisk.edit.po +3 -3
  47. data/locale/fr/foreman_bootdisk.po +6 -16
  48. data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  49. data/locale/it/foreman_bootdisk.edit.po +1 -1
  50. data/locale/it/foreman_bootdisk.po +1 -13
  51. data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  52. data/locale/ja/foreman_bootdisk.edit.po +14 -15
  53. data/locale/ja/foreman_bootdisk.po +7 -18
  54. data/locale/ka/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  55. data/locale/ka/foreman_bootdisk.edit.po +1 -1
  56. data/locale/ka/foreman_bootdisk.po +1 -13
  57. data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  58. data/locale/ko/foreman_bootdisk.edit.po +1 -1
  59. data/locale/ko/foreman_bootdisk.po +47 -59
  60. data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  61. data/locale/pt_BR/foreman_bootdisk.edit.po +1 -1
  62. data/locale/pt_BR/foreman_bootdisk.po +1 -13
  63. data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  64. data/locale/ru/foreman_bootdisk.edit.po +1 -1
  65. data/locale/ru/foreman_bootdisk.po +1 -13
  66. data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  67. data/locale/sv_SE/foreman_bootdisk.edit.po +1 -1
  68. data/locale/sv_SE/foreman_bootdisk.po +1 -13
  69. data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  70. data/locale/zh_CN/foreman_bootdisk.edit.po +2 -2
  71. data/locale/zh_CN/foreman_bootdisk.po +2 -14
  72. data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  73. data/locale/zh_TW/foreman_bootdisk.edit.po +1 -1
  74. data/locale/zh_TW/foreman_bootdisk.po +1 -13
  75. metadata +5 -4
  76. data/locale/action_names.rb +0 -5
@@ -9,11 +9,6 @@ module ForemanBootdisk
9
9
  engine_name 'foreman_bootdisk'
10
10
  isolate_namespace ForemanBootdisk
11
11
 
12
- config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
13
- config.autoload_paths += Dir["#{config.root}/app/helpers"]
14
- config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
15
- config.autoload_paths += Dir["#{config.root}/app/lib"]
16
-
17
12
  initializer 'foreman_bootdisk.mount_engine' do |app|
18
13
  app.routes_reloader.paths << "#{ForemanBootdisk::Engine.root}/config/routes/mount_engine.rb"
19
14
  end
@@ -28,113 +23,111 @@ module ForemanBootdisk
28
23
  Apipie.configuration.checksum_path += ['/bootdisk/api/']
29
24
  end
30
25
 
31
- # Temporary workaround fix for helpers
32
- initializer 'foreman_bootdisk.rails_loading_workaround' do
33
- HostsHelper.prepend ForemanBootdisk::HostsHelperExt
34
- SubnetsHelper.include ForemanBootdisk::SubnetsHelperExt
35
- end
26
+ initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |app|
27
+ app.reloader.to_prepare do
28
+ Foreman::Plugin.register :foreman_bootdisk do
29
+ requires_foreman '>= 3.13'
30
+ # Add Global files for extending foreman-core components and routes
31
+ register_global_js_file 'global'
32
+ register_gettext
33
+
34
+ security_block :bootdisk do |_map|
35
+ permission :download_bootdisk, 'foreman_bootdisk/disks': %i[generic host full_host help bootdisk_options],
36
+ 'foreman_bootdisk/subnet_disks': [:subnet],
37
+ 'foreman_bootdisk/api/v2/disks': %i[generic host],
38
+ 'foreman_bootdisk/api/v2/subnet_disks': [:subnet]
39
+ end
36
40
 
37
- initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |_app|
38
- Foreman::Plugin.register :foreman_bootdisk do
39
- requires_foreman '>= 3.7'
40
- # Add Global files for extending foreman-core components and routes
41
- register_global_js_file 'global'
42
- register_gettext
43
-
44
- security_block :bootdisk do |_map|
45
- permission :download_bootdisk, 'foreman_bootdisk/disks': %i[generic host full_host help bootdisk_options],
46
- 'foreman_bootdisk/subnet_disks': [:subnet],
47
- 'foreman_bootdisk/api/v2/disks': %i[generic host],
48
- 'foreman_bootdisk/api/v2/subnet_disks': [:subnet]
49
- end
41
+ role 'Boot disk access', [:download_bootdisk], 'Role granting permissions to download bootdisks'
42
+ add_all_permissions_to_default_roles
50
43
 
51
- role 'Boot disk access', [:download_bootdisk], 'Role granting permissions to download bootdisks'
52
- add_all_permissions_to_default_roles
44
+ apipie_documented_controllers ["#{ForemanBootdisk::Engine.root}/app/controllers/foreman_bootdisk/api/v2/*.rb"]
45
+ ApipieDSL.configuration.dsl_classes_matchers += [
46
+ "#{ForemanBootdisk::Engine.root}/app/lib/foreman_bootdisk/scope/*.rb"
47
+ ]
53
48
 
54
- apipie_documented_controllers ["#{ForemanBootdisk::Engine.root}/app/controllers/foreman_bootdisk/api/v2/*.rb"]
55
- ApipieDSL.configuration.dsl_classes_matchers += [
56
- "#{ForemanBootdisk::Engine.root}/app/lib/foreman_bootdisk/scope/*.rb"
57
- ]
58
- provision_method 'bootdisk', N_('Boot disk based')
59
- allowed_template_helpers :bootdisk_chain_url, :bootdisk_raise
49
+ provision_method 'bootdisk', N_('Boot disk based')
60
50
 
61
- extend_page "subnets/index" do |cx|
62
- cx.add_pagelet :subnet_index_action_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_action_buttons'
63
- cx.add_pagelet :subnet_index_title_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_title_buttons'
64
- end
51
+ extend_template_helpers ForemanBootdisk::TemplateHelpers
52
+
53
+ extend_page "subnets/index" do |cx|
54
+ cx.add_pagelet :subnet_index_action_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_action_buttons'
55
+ cx.add_pagelet :subnet_index_title_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_title_buttons'
56
+ end
65
57
 
66
- settings do
67
- category :bootdisk, N_("Boot disk") do
68
- ipxe = ['/usr/lib/ipxe'].find { |p| File.exist?(p) } || '/usr/share/ipxe'
69
- isolinux = ['/usr/lib/ISOLINUX'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
70
- syslinux = ['/usr/lib/syslinux/modules/bios', '/usr/lib/syslinux'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
71
- grub2 = ['/var/lib/tftpboot/grub2'].find { |p| File.exist?(p) } || '/var/lib/foreman/bootdisk'
72
- templates = -> {
73
- Hash[ProvisioningTemplate.where(template_kind: TemplateKind.where(name: 'Bootdisk')).map { |temp| [temp[:name], temp[:name]] }]
74
- }
75
-
76
- setting "bootdisk_ipxe_dir",
77
- type: :string,
78
- default: ipxe,
79
- full_name: N_("iPXE directory"),
80
- description: N_("Path to directory containing iPXE images")
81
-
82
- setting "bootdisk_isolinux_dir",
83
- type: :string,
84
- default: isolinux,
85
- full_name: N_("ISOLINUX directory"),
86
- description: N_("Path to directory containing isolinux images")
87
-
88
- setting "bootdisk_syslinux_dir",
89
- type: :string,
90
- default: syslinux,
91
- full_name: N_("SYSLINUX directory"),
92
- description: N_("Path to directory containing syslinux images")
93
-
94
- setting "bootdisk_grub2_dir",
95
- type: :string,
96
- default: grub2,
97
- full_name: N_("Grub2 directory"),
98
- description: N_("Path to directory containing grubx64.efi and shimx64.efi")
99
-
100
- setting "bootdisk_host_template",
101
- type: :string,
102
- collection: templates,
103
- default: "Boot disk iPXE - host",
104
- full_name: N_("Host image template"),
105
- description: N_("iPXE template to use for host-specific boot disks")
106
-
107
- setting "bootdisk_generic_host_template",
108
- type: :string,
109
- collection: templates,
110
- default: "Boot disk iPXE - generic host",
111
- full_name: N_("Generic image template"),
112
- description: N_("iPXE template to use for generic host boot disks")
113
-
114
- setting "bootdisk_generic_efi_host_template",
115
- type: :string,
116
- collection: templates,
117
- default: "Boot disk Grub2 EFI - generic host",
118
- full_name: N_("Generic Grub2 EFI image template"),
119
- description: N_("iPXE template to use for generic EFI host boot disks")
120
-
121
- setting "bootdisk_mkiso_command",
122
- type: :string,
123
- default: "genisoimage",
124
- full_name: N_("ISO generation command"),
125
- description: N_("Command to generate ISO image, use genisoimage or mkisofs")
126
-
127
- setting "bootdisk_cache_media",
128
- type: :boolean,
129
- default: true,
130
- full_name: N_("Installation media caching"),
131
- description: N_("Installation media files will be cached for full host images")
132
-
133
- setting "bootdisk_allowed_types",
134
- type: :array,
135
- default: Setting::Bootdisk.bootdisk_types,
136
- full_name: N_("Allowed bootdisk types"),
137
- description: N_("List of allowed bootdisk types, remove type to disable it")
58
+ settings do
59
+ category :bootdisk, N_("Boot disk") do
60
+ ipxe = ['/usr/lib/ipxe'].find { |p| File.exist?(p) } || '/usr/share/ipxe'
61
+ isolinux = ['/usr/lib/ISOLINUX'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
62
+ syslinux = ['/usr/lib/syslinux/modules/bios', '/usr/lib/syslinux'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
63
+ grub2 = ['/var/lib/tftpboot/grub2'].find { |p| File.exist?(p) } || '/var/lib/foreman/bootdisk'
64
+ templates = -> {
65
+ Hash[ProvisioningTemplate.where(template_kind: TemplateKind.where(name: 'Bootdisk')).map { |temp| [temp[:name], temp[:name]] }]
66
+ }
67
+
68
+ setting "bootdisk_ipxe_dir",
69
+ type: :string,
70
+ default: ipxe,
71
+ full_name: N_("iPXE directory"),
72
+ description: N_("Path to directory containing iPXE images")
73
+
74
+ setting "bootdisk_isolinux_dir",
75
+ type: :string,
76
+ default: isolinux,
77
+ full_name: N_("ISOLINUX directory"),
78
+ description: N_("Path to directory containing isolinux images")
79
+
80
+ setting "bootdisk_syslinux_dir",
81
+ type: :string,
82
+ default: syslinux,
83
+ full_name: N_("SYSLINUX directory"),
84
+ description: N_("Path to directory containing syslinux images")
85
+
86
+ setting "bootdisk_grub2_dir",
87
+ type: :string,
88
+ default: grub2,
89
+ full_name: N_("Grub2 directory"),
90
+ description: N_("Path to directory containing grubx64.efi and shimx64.efi")
91
+
92
+ setting "bootdisk_host_template",
93
+ type: :string,
94
+ collection: templates,
95
+ default: "Boot disk iPXE - host",
96
+ full_name: N_("Host image template"),
97
+ description: N_("iPXE template to use for host-specific boot disks")
98
+
99
+ setting "bootdisk_generic_host_template",
100
+ type: :string,
101
+ collection: templates,
102
+ default: "Boot disk iPXE - generic host",
103
+ full_name: N_("Generic image template"),
104
+ description: N_("iPXE template to use for generic host boot disks")
105
+
106
+ setting "bootdisk_generic_efi_host_template",
107
+ type: :string,
108
+ collection: templates,
109
+ default: "Boot disk Grub2 EFI - generic host",
110
+ full_name: N_("Generic Grub2 EFI image template"),
111
+ description: N_("iPXE template to use for generic EFI host boot disks")
112
+
113
+ setting "bootdisk_mkiso_command",
114
+ type: :string,
115
+ default: "genisoimage",
116
+ full_name: N_("ISO generation command"),
117
+ description: N_("Command to generate ISO image, use genisoimage or mkisofs")
118
+
119
+ setting "bootdisk_cache_media",
120
+ type: :boolean,
121
+ default: true,
122
+ full_name: N_("Installation media caching"),
123
+ description: N_("Installation media files will be cached for full host images")
124
+
125
+ setting "bootdisk_allowed_types",
126
+ type: :array,
127
+ default: Setting::Bootdisk.bootdisk_types,
128
+ full_name: N_("Allowed bootdisk types"),
129
+ description: N_("List of allowed bootdisk types, remove type to disable it")
130
+ end
138
131
  end
139
132
  end
140
133
  end
@@ -142,6 +135,8 @@ module ForemanBootdisk
142
135
 
143
136
  config.to_prepare do
144
137
  begin
138
+ ::HostsHelper.prepend ForemanBootdisk::HostsHelperExt
139
+ ::SubnetsHelper.include ForemanBootdisk::SubnetsHelperExt
145
140
  Host::Managed.prepend ForemanBootdisk::HostExt
146
141
  Host::Managed.include ForemanBootdisk::Orchestration::Compute
147
142
  Foreman::Model::Vmware.prepend ForemanBootdisk::ComputeResources::Vmware if Foreman::Model::Vmware.available?
@@ -9,11 +9,6 @@ module ForemanBootdisk
9
9
  engine_name 'foreman_bootdisk'
10
10
  isolate_namespace ForemanBootdisk
11
11
 
12
- config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
13
- config.autoload_paths += Dir["#{config.root}/app/helpers"]
14
- config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
15
- config.autoload_paths += Dir["#{config.root}/app/lib"]
16
-
17
12
  initializer 'foreman_bootdisk.mount_engine' do |app|
18
13
  app.routes_reloader.paths << "#{ForemanBootdisk::Engine.root}/config/routes/mount_engine.rb"
19
14
  end
@@ -28,118 +23,118 @@ module ForemanBootdisk
28
23
  Apipie.configuration.checksum_path += ['/bootdisk/api/']
29
24
  end
30
25
 
31
- # Temporary workaround fix for helpers
32
- initializer 'foreman_bootdisk.rails_loading_workaround' do
33
- HostsHelper.prepend ForemanBootdisk::HostsHelperExt
34
- SubnetsHelper.include ForemanBootdisk::SubnetsHelperExt
35
- end
26
+ initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |app|
27
+ app.reloader.to_prepare do
28
+ Foreman::Plugin.register :foreman_bootdisk do
29
+ requires_foreman '>= 3.13'
30
+ # Add Global files for extending foreman-core components and routes
31
+ register_global_js_file 'global'
32
+ register_gettext
33
+
34
+ security_block :bootdisk do |_map|
35
+ permission :download_bootdisk, 'foreman_bootdisk/disks': %i[generic host full_host help bootdisk_options],
36
+ 'foreman_bootdisk/subnet_disks': [:subnet],
37
+ 'foreman_bootdisk/api/v2/disks': %i[generic host],
38
+ 'foreman_bootdisk/api/v2/subnet_disks': [:subnet]
39
+ end
36
40
 
37
- initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |_app|
38
- Foreman::Plugin.register :foreman_bootdisk do
39
- requires_foreman '>= 3.7'
40
- <<<<<<< HEAD
41
- =======
42
- register_gettext
43
-
44
- >>>>>>> 4665a6a (Translation improvements)
45
- # Add Global files for extending foreman-core components and routes
46
- register_global_js_file 'global'
47
- register_gettext
48
-
49
- security_block :bootdisk do |_map|
50
- permission :download_bootdisk, 'foreman_bootdisk/disks': %i[generic host full_host help bootdisk_options],
51
- 'foreman_bootdisk/subnet_disks': [:subnet],
52
- 'foreman_bootdisk/api/v2/disks': %i[generic host],
53
- 'foreman_bootdisk/api/v2/subnet_disks': [:subnet]
54
- end
41
+ role 'Boot disk access', [:download_bootdisk], 'Role granting permissions to download bootdisks'
42
+ add_all_permissions_to_default_roles
55
43
 
56
- role 'Boot disk access', [:download_bootdisk], 'Role granting permissions to download bootdisks'
57
- add_all_permissions_to_default_roles
44
+ apipie_documented_controllers ["#{ForemanBootdisk::Engine.root}/app/controllers/foreman_bootdisk/api/v2/*.rb"]
45
+ ApipieDSL.configuration.dsl_classes_matchers += [
46
+ "#{ForemanBootdisk::Engine.root}/app/lib/foreman_bootdisk/scope/*.rb"
47
+ ]
48
+ provision_method 'bootdisk', N_('Boot disk based')
49
+ allowed_template_helpers :bootdisk_chain_url, :bootdisk_raise
58
50
 
51
+ <<<<<<< HEAD
52
+ extend_page "subnets/index" do |cx|
53
+ cx.add_pagelet :subnet_index_action_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_action_buttons'
54
+ cx.add_pagelet :subnet_index_title_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_title_buttons'
55
+ end
56
+ =======
59
57
  apipie_documented_controllers ["#{ForemanBootdisk::Engine.root}/app/controllers/foreman_bootdisk/api/v2/*.rb"]
60
58
  ApipieDSL.configuration.dsl_classes_matchers += [
61
59
  "#{ForemanBootdisk::Engine.root}/app/lib/foreman_bootdisk/scope/*.rb"
62
60
  ]
63
61
  provision_method 'bootdisk', N_('Boot disk based')
64
- allowed_template_helpers :bootdisk_chain_url, :bootdisk_raise
65
-
66
- extend_page "subnets/index" do |cx|
67
- cx.add_pagelet :subnet_index_action_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_action_buttons'
68
- cx.add_pagelet :subnet_index_title_buttons, name: 'Bootdisk', partial: 'subnets/bootdisk_title_buttons'
69
- end
70
-
71
- settings do
72
- category :bootdisk, N_("Boot disk") do
73
- ipxe = ['/usr/lib/ipxe'].find { |p| File.exist?(p) } || '/usr/share/ipxe'
74
- isolinux = ['/usr/lib/ISOLINUX'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
75
- syslinux = ['/usr/lib/syslinux/modules/bios', '/usr/lib/syslinux'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
76
- grub2 = ['/var/lib/tftpboot/grub2'].find { |p| File.exist?(p) } || '/var/lib/foreman/bootdisk'
77
- templates = -> {
78
- Hash[ProvisioningTemplate.where(template_kind: TemplateKind.where(name: 'Bootdisk')).map { |temp| [temp[:name], temp[:name]] }]
79
- }
80
-
81
- setting "bootdisk_ipxe_dir",
82
- type: :string,
83
- default: ipxe,
84
- full_name: N_("iPXE directory"),
85
- description: N_("Path to directory containing iPXE images")
86
-
87
- setting "bootdisk_isolinux_dir",
88
- type: :string,
89
- default: isolinux,
90
- full_name: N_("ISOLINUX directory"),
91
- description: N_("Path to directory containing isolinux images")
92
-
93
- setting "bootdisk_syslinux_dir",
94
- type: :string,
95
- default: syslinux,
96
- full_name: N_("SYSLINUX directory"),
97
- description: N_("Path to directory containing syslinux images")
98
-
99
- setting "bootdisk_grub2_dir",
100
- type: :string,
101
- default: grub2,
102
- full_name: N_("Grub2 directory"),
103
- description: N_("Path to directory containing grubx64.efi and shimx64.efi")
104
-
105
- setting "bootdisk_host_template",
106
- type: :string,
107
- collection: templates,
108
- default: "Boot disk iPXE - host",
109
- full_name: N_("Host image template"),
110
- description: N_("iPXE template to use for host-specific boot disks")
111
-
112
- setting "bootdisk_generic_host_template",
113
- type: :string,
114
- collection: templates,
115
- default: "Boot disk iPXE - generic host",
116
- full_name: N_("Generic image template"),
117
- description: N_("iPXE template to use for generic host boot disks")
118
-
119
- setting "bootdisk_generic_efi_host_template",
120
- type: :string,
121
- collection: templates,
122
- default: "Boot disk Grub2 EFI - generic host",
123
- full_name: N_("Generic Grub2 EFI image template"),
124
- description: N_("iPXE template to use for generic EFI host boot disks")
125
-
126
- setting "bootdisk_mkiso_command",
127
- type: :string,
128
- default: "genisoimage",
129
- full_name: N_("ISO generation command"),
130
- description: N_("Command to generate ISO image, use genisoimage or mkisofs")
131
-
132
- setting "bootdisk_cache_media",
133
- type: :boolean,
134
- default: true,
135
- full_name: N_("Installation media caching"),
136
- description: N_("Installation media files will be cached for full host images")
137
-
138
- setting "bootdisk_allowed_types",
139
- type: :array,
140
- default: Setting::Bootdisk.bootdisk_types,
141
- full_name: N_("Allowed bootdisk types"),
142
- description: N_("List of allowed bootdisk types, remove type to disable it")
62
+ extend_template_helpers ForemanBootdisk::TemplateHelpers
63
+ >>>>>>> 968ca20 (Fixes #37792 - Safe mode and bootdisk_* template helpers)
64
+
65
+ settings do
66
+ category :bootdisk, N_("Boot disk") do
67
+ ipxe = ['/usr/lib/ipxe'].find { |p| File.exist?(p) } || '/usr/share/ipxe'
68
+ isolinux = ['/usr/lib/ISOLINUX'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
69
+ syslinux = ['/usr/lib/syslinux/modules/bios', '/usr/lib/syslinux'].find { |p| File.exist?(p) } || '/usr/share/syslinux'
70
+ grub2 = ['/var/lib/tftpboot/grub2'].find { |p| File.exist?(p) } || '/var/lib/foreman/bootdisk'
71
+ templates = -> {
72
+ Hash[ProvisioningTemplate.where(template_kind: TemplateKind.where(name: 'Bootdisk')).map { |temp| [temp[:name], temp[:name]] }]
73
+ }
74
+
75
+ setting "bootdisk_ipxe_dir",
76
+ type: :string,
77
+ default: ipxe,
78
+ full_name: N_("iPXE directory"),
79
+ description: N_("Path to directory containing iPXE images")
80
+
81
+ setting "bootdisk_isolinux_dir",
82
+ type: :string,
83
+ default: isolinux,
84
+ full_name: N_("ISOLINUX directory"),
85
+ description: N_("Path to directory containing isolinux images")
86
+
87
+ setting "bootdisk_syslinux_dir",
88
+ type: :string,
89
+ default: syslinux,
90
+ full_name: N_("SYSLINUX directory"),
91
+ description: N_("Path to directory containing syslinux images")
92
+
93
+ setting "bootdisk_grub2_dir",
94
+ type: :string,
95
+ default: grub2,
96
+ full_name: N_("Grub2 directory"),
97
+ description: N_("Path to directory containing grubx64.efi and shimx64.efi")
98
+
99
+ setting "bootdisk_host_template",
100
+ type: :string,
101
+ collection: templates,
102
+ default: "Boot disk iPXE - host",
103
+ full_name: N_("Host image template"),
104
+ description: N_("iPXE template to use for host-specific boot disks")
105
+
106
+ setting "bootdisk_generic_host_template",
107
+ type: :string,
108
+ collection: templates,
109
+ default: "Boot disk iPXE - generic host",
110
+ full_name: N_("Generic image template"),
111
+ description: N_("iPXE template to use for generic host boot disks")
112
+
113
+ setting "bootdisk_generic_efi_host_template",
114
+ type: :string,
115
+ collection: templates,
116
+ default: "Boot disk Grub2 EFI - generic host",
117
+ full_name: N_("Generic Grub2 EFI image template"),
118
+ description: N_("iPXE template to use for generic EFI host boot disks")
119
+
120
+ setting "bootdisk_mkiso_command",
121
+ type: :string,
122
+ default: "genisoimage",
123
+ full_name: N_("ISO generation command"),
124
+ description: N_("Command to generate ISO image, use genisoimage or mkisofs")
125
+
126
+ setting "bootdisk_cache_media",
127
+ type: :boolean,
128
+ default: true,
129
+ full_name: N_("Installation media caching"),
130
+ description: N_("Installation media files will be cached for full host images")
131
+
132
+ setting "bootdisk_allowed_types",
133
+ type: :array,
134
+ default: Setting::Bootdisk.bootdisk_types,
135
+ full_name: N_("Allowed bootdisk types"),
136
+ description: N_("List of allowed bootdisk types, remove type to disable it")
137
+ end
143
138
  end
144
139
  end
145
140
  end
@@ -147,6 +142,8 @@ module ForemanBootdisk
147
142
 
148
143
  config.to_prepare do
149
144
  begin
145
+ ::HostsHelper.prepend ForemanBootdisk::HostsHelperExt
146
+ ::SubnetsHelper.include ForemanBootdisk::SubnetsHelperExt
150
147
  Host::Managed.prepend ForemanBootdisk::HostExt
151
148
  Host::Managed.include ForemanBootdisk::Orchestration::Compute
152
149
  Foreman::Model::Vmware.prepend ForemanBootdisk::ComputeResources::Vmware if Foreman::Model::Vmware.available?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanBootdisk
4
- VERSION = '21.2.3'
4
+ VERSION = '22.0.1'
5
5
  end
data/locale/Makefile CHANGED
@@ -31,9 +31,16 @@ all-mo: $(MOFILES)
31
31
  cat $@
32
32
  ! grep -q msgid $@
33
33
 
34
- %.edit.po:
34
+ %.edit.po: %.po.time_stamp
35
35
  touch $@
36
36
 
37
+ # gettext will trash the .edit.po file if the time stamp doesn't exist or is older than the po file
38
+ %.po.time_stamp: %.po
39
+ touch --reference $< $@
40
+
41
+ # Prevent make from treating this as an intermediate file to be cleaned up
42
+ .PRECIOUS: %.po.time_stamp
43
+
37
44
  check: $(POXFILES)
38
45
 
39
46
  # Unify duplicate translations
@@ -43,7 +50,10 @@ uniq-po:
43
50
  done
44
51
 
45
52
  tx-pull: $(EDITFILES)
46
- cd .. && tx pull -f --all
53
+ # Initialize new languages
54
+ cd .. && tx pull -f --all --minimum-perc 50
55
+ # Force update all existing languages
56
+ cd .. && tx pull -f --minimum-perc 0
47
57
  for f in $(EDITFILES) ; do \
48
58
  sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
49
59
  done
@@ -7,7 +7,7 @@
7
7
  # Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2015-2016
8
8
  msgid ""
9
9
  msgstr ""
10
- "Project-Id-Version: foreman_bootdisk 21.1.0\n"
10
+ "Project-Id-Version: foreman_bootdisk 21.0.4\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
12
  "PO-Revision-Date: 2014-02-13 12:12+0000\n"
13
13
  "Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2017\n"
@@ -7,7 +7,7 @@
7
7
  # Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2015-2016
8
8
  msgid ""
9
9
  msgstr ""
10
- "Project-Id-Version: foreman_bootdisk 21.0.4\n"
10
+ "Project-Id-Version: foreman_bootdisk 22.0.0\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
12
  "PO-Revision-Date: 2014-02-13 12:12+0000\n"
13
13
  "Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2017\n"
@@ -25,9 +25,6 @@ msgstr ""
25
25
  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."
26
26
  msgstr ""
27
27
 
28
- msgid "Action with sub plans"
29
- msgstr ""
30
-
31
28
  msgid "All images are usable as either ISOs or as disk images, including being written to a USB disk with `dd`."
32
29
  msgstr ""
33
30
 
@@ -160,12 +157,6 @@ msgstr ""
160
157
  msgid "ISOLINUX directory"
161
158
  msgstr ""
162
159
 
163
- msgid "Import Puppet classes"
164
- msgstr ""
165
-
166
- msgid "Import facts"
167
- msgstr ""
168
-
169
160
  msgid "Installation media caching"
170
161
  msgstr ""
171
162
 
@@ -205,9 +196,6 @@ msgstr ""
205
196
  msgid "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure."
206
197
  msgstr ""
207
198
 
208
- msgid "Remote action:"
209
- msgstr ""
210
-
211
199
  msgid "SYSLINUX directory"
212
200
  msgstr ""
213
201