foreman_bootdisk 16.0.0 → 18.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rubocop.yaml +19 -0
  3. data/.tx/config +1 -1
  4. data/AUTHORS +9 -1
  5. data/README.md +11 -3
  6. data/app/controllers/concerns/allowed_actions.rb +16 -0
  7. data/app/controllers/foreman_bootdisk/api/v2/disks_controller.rb +15 -8
  8. data/app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb +16 -4
  9. data/app/controllers/foreman_bootdisk/disks_controller.rb +29 -23
  10. data/app/controllers/foreman_bootdisk/subnet_disks_controller.rb +41 -0
  11. data/app/helpers/bootdisk_links_helper.rb +46 -0
  12. data/app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb +58 -44
  13. data/app/helpers/concerns/foreman_bootdisk/pretty_error.rb +13 -0
  14. data/app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb +45 -0
  15. data/app/helpers/disk_helper.rb +8 -0
  16. data/app/lib/foreman_bootdisk/scope/bootdisk.rb +28 -1
  17. data/app/lib/foreman_bootdisk/scope/full_host_bootdisk_efi.rb +15 -0
  18. data/app/models/concerns/foreman_bootdisk/compute_resources/vmware.rb +10 -1
  19. data/app/models/concerns/foreman_bootdisk/host_ext.rb +13 -6
  20. data/app/models/concerns/foreman_bootdisk/orchestration/compute.rb +38 -22
  21. data/app/models/setting/bootdisk.rb +14 -1
  22. data/app/services/foreman_bootdisk/iso_generator.rb +134 -56
  23. data/app/services/foreman_bootdisk/renderer.rb +36 -19
  24. data/app/views/foreman_bootdisk/disks/help.html.erb +16 -4
  25. data/app/views/foreman_bootdisk/generic_efi_host.erb +68 -0
  26. data/app/views/foreman_bootdisk/host.erb +7 -0
  27. data/app/views/subnets/_bootdisk_action_buttons.erb +1 -0
  28. data/app/views/subnets/_bootdisk_title_buttons.erb +1 -0
  29. data/config/routes.rb +1 -1
  30. data/db/seeds.d/50-bootdisk_templates.rb +1 -0
  31. data/lib/foreman_bootdisk/engine.rb +18 -8
  32. data/lib/foreman_bootdisk/version.rb +1 -1
  33. data/lib/tasks/bootdisk.rake +10 -24
  34. data/locale/action_names.rb +5 -0
  35. data/locale/ca/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  36. data/locale/ca/foreman_bootdisk.po +76 -13
  37. data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  38. data/locale/de/foreman_bootdisk.po +81 -18
  39. data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  40. data/locale/en/foreman_bootdisk.po +71 -8
  41. data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  42. data/locale/en_GB/foreman_bootdisk.po +79 -16
  43. data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  44. data/locale/es/foreman_bootdisk.po +92 -28
  45. data/locale/foreman_bootdisk.pot +164 -71
  46. data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  47. data/locale/fr/foreman_bootdisk.po +100 -36
  48. data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  49. data/locale/it/foreman_bootdisk.po +78 -15
  50. data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  51. data/locale/ja/foreman_bootdisk.po +90 -26
  52. data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  53. data/locale/ko/foreman_bootdisk.po +79 -16
  54. data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  55. data/locale/pt_BR/foreman_bootdisk.po +99 -36
  56. data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  57. data/locale/ru/foreman_bootdisk.po +79 -16
  58. data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  59. data/locale/sv_SE/foreman_bootdisk.po +75 -12
  60. data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  61. data/locale/zh_CN/foreman_bootdisk.po +131 -68
  62. data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  63. data/locale/zh_TW/foreman_bootdisk.po +79 -16
  64. data/test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb +51 -17
  65. data/test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb +23 -10
  66. data/test/functional/foreman_bootdisk/disks_controller_test.rb +60 -30
  67. data/test/functional/foreman_bootdisk/subnet_disks_controller_test.rb +51 -0
  68. data/test/test_plugin_helper.rb +21 -3
  69. data/test/unit/concerns/host_test.rb +12 -1
  70. data/test/unit/concerns/orchestration/compute_test.rb +32 -13
  71. data/test/unit/foreman_bootdisk/renderer_test.rb +1 -1
  72. data/test/unit/iso_generator_test.rb +6 -7
  73. metadata +21 -37
@@ -11,10 +11,12 @@ module ForemanBootdisk
11
11
  let(:medium) { FactoryBot.create(:medium, name: 'Red Hat Enterprise Linux Atomic Mirror') }
12
12
  let(:operatingsystem) { FactoryBot.create(:ubuntu14_10, :with_archs, :with_ptables, media: [medium]) }
13
13
  let(:host) { FactoryBot.create(:host, :managed, operatingsystem: operatingsystem, build: true) }
14
- let(:template) { FactoryBot.create(:provisioning_template, template: 'Fake kernel line <%= @kernel %> - <%= @initrd %>') }
14
+ let(:pxelinux_template) { FactoryBot.create(:provisioning_template, template: 'Fake kernel line <%= @kernel %> - <%= @initrd %>') }
15
+ let(:pxegrub2_template) { FactoryBot.create(:provisioning_template, template: 'Fake kernel line <%= @kernel %> - <%= @initrd %>') }
15
16
 
16
17
  setup do
17
- host.stubs(:provisioning_template).with(kind: :PXELinux).returns(template)
18
+ host.stubs(:provisioning_template).with(kind: :PXELinux).returns(pxelinux_template)
19
+ host.stubs(:provisioning_template).with(kind: :PXEGrub2).returns(pxegrub2_template)
18
20
  end
19
21
 
20
22
  test 'fetch handles redirect' do
@@ -40,11 +42,8 @@ module ForemanBootdisk
40
42
  )
41
43
  initrd_url = urls[:initrd]
42
44
 
43
- ForemanBootdisk::ISOGenerator.expects(:generate).with({
44
- isolinux: "Fake kernel line #{kernel} - #{initrd}",
45
- files: { kernel => kernel_url,
46
- initrd => initrd_url }
47
- }, anything)
45
+ ForemanBootdisk::ISOGenerator.expects(:generate)
46
+ .with({ isolinux: "Fake kernel line #{kernel} - #{initrd}", grub: "Fake kernel line /#{kernel} - /#{initrd}", files: { kernel => kernel_url, initrd => initrd_url } }, anything)
48
47
 
49
48
  ForemanBootdisk::ISOGenerator.generate_full_host(host)
50
49
  end
metadata CHANGED
@@ -1,45 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_bootdisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.0
4
+ version: 18.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-04 00:00:00.000000000 Z
11
+ date: 2021-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rubocop
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rubocop-performance
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop-rails
14
+ name: theforeman-rubocop
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - ">="
@@ -76,18 +48,26 @@ extra_rdoc_files:
76
48
  - LICENSE
77
49
  - README.md
78
50
  files:
51
+ - ".github/workflows/rubocop.yaml"
79
52
  - ".tx/config"
80
53
  - AUTHORS
81
54
  - CHANGES.md
82
55
  - LICENSE
83
56
  - README.md
84
57
  - app/assets/javascripts/foreman_bootdisk/host_edit.js
58
+ - app/controllers/concerns/allowed_actions.rb
85
59
  - app/controllers/foreman_bootdisk/api/v2/disks_controller.rb
86
60
  - app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb
87
61
  - app/controllers/foreman_bootdisk/disks_controller.rb
62
+ - app/controllers/foreman_bootdisk/subnet_disks_controller.rb
63
+ - app/helpers/bootdisk_links_helper.rb
88
64
  - app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb
65
+ - app/helpers/concerns/foreman_bootdisk/pretty_error.rb
66
+ - app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb
67
+ - app/helpers/disk_helper.rb
89
68
  - app/lib/foreman_bootdisk/scope/bootdisk.rb
90
69
  - app/lib/foreman_bootdisk/scope/full_host_bootdisk.rb
70
+ - app/lib/foreman_bootdisk/scope/full_host_bootdisk_efi.rb
91
71
  - app/models/concerns/foreman_bootdisk/compute_resources/vmware.rb
92
72
  - app/models/concerns/foreman_bootdisk/host_ext.rb
93
73
  - app/models/concerns/foreman_bootdisk/orchestration/compute.rb
@@ -95,10 +75,13 @@ files:
95
75
  - app/services/foreman_bootdisk/iso_generator.rb
96
76
  - app/services/foreman_bootdisk/renderer.rb
97
77
  - app/views/foreman_bootdisk/disks/help.html.erb
78
+ - app/views/foreman_bootdisk/generic_efi_host.erb
98
79
  - app/views/foreman_bootdisk/generic_host.erb
99
80
  - app/views/foreman_bootdisk/generic_static_host.erb
100
81
  - app/views/foreman_bootdisk/host.erb
101
82
  - app/views/hosts/provision_method/bootdisk/_form.html.erb
83
+ - app/views/subnets/_bootdisk_action_buttons.erb
84
+ - app/views/subnets/_bootdisk_title_buttons.erb
102
85
  - config/routes.rb
103
86
  - config/routes/mount_engine.rb
104
87
  - db/migrate/20130914211030_create_host_bootdisk_template.rb
@@ -114,6 +97,7 @@ files:
114
97
  - lib/foreman_bootdisk/version.rb
115
98
  - lib/tasks/bootdisk.rake
116
99
  - locale/Makefile
100
+ - locale/action_names.rb
117
101
  - locale/ca/LC_MESSAGES/foreman_bootdisk.mo
118
102
  - locale/ca/foreman_bootdisk.po
119
103
  - locale/de/LC_MESSAGES/foreman_bootdisk.mo
@@ -149,6 +133,7 @@ files:
149
133
  - test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb
150
134
  - test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb
151
135
  - test/functional/foreman_bootdisk/disks_controller_test.rb
136
+ - test/functional/foreman_bootdisk/subnet_disks_controller_test.rb
152
137
  - test/models/host/managed_test.rb
153
138
  - test/test_plugin_helper.rb
154
139
  - test/unit/access_permissions_test.rb
@@ -163,7 +148,7 @@ homepage: http://github.com/theforeman/foreman_bootdisk
163
148
  licenses:
164
149
  - GPL-3.0
165
150
  metadata: {}
166
- post_install_message:
151
+ post_install_message:
167
152
  rdoc_options: []
168
153
  require_paths:
169
154
  - lib
@@ -171,16 +156,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
156
  requirements:
172
157
  - - ">="
173
158
  - !ruby/object:Gem::Version
174
- version: '0'
159
+ version: '2.5'
175
160
  required_rubygems_version: !ruby/object:Gem::Requirement
176
161
  requirements:
177
162
  - - ">="
178
163
  - !ruby/object:Gem::Version
179
164
  version: '0'
180
165
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.7.6.2
183
- signing_key:
166
+ rubygems_version: 3.1.4
167
+ signing_key:
184
168
  specification_version: 4
185
169
  summary: Create boot disks to provision hosts with Foreman
186
170
  test_files: []