foreman_bootdisk 13.0.0 → 16.1.0

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS +29 -0
  3. data/CHANGES.md +4 -0
  4. data/README.md +19 -2
  5. data/app/controllers/foreman_bootdisk/api/v2/disks_controller.rb +11 -9
  6. data/app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb +37 -31
  7. data/app/controllers/foreman_bootdisk/disks_controller.rb +20 -19
  8. data/app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb +86 -45
  9. data/app/lib/foreman_bootdisk/scope/bootdisk.rb +2 -0
  10. data/app/lib/foreman_bootdisk/scope/full_host_bootdisk.rb +15 -0
  11. data/app/models/concerns/foreman_bootdisk/compute_resources/vmware.rb +4 -2
  12. data/app/models/concerns/foreman_bootdisk/host_ext.rb +42 -30
  13. data/app/models/concerns/foreman_bootdisk/orchestration/compute.rb +14 -10
  14. data/app/models/setting/bootdisk.rb +21 -23
  15. data/app/services/foreman_bootdisk/iso_generator.rb +144 -104
  16. data/app/services/foreman_bootdisk/renderer.rb +17 -13
  17. data/app/views/foreman_bootdisk/generic_static_host.erb +34 -0
  18. data/app/views/foreman_bootdisk/host.erb +27 -11
  19. data/config/routes.rb +15 -13
  20. data/config/routes/mount_engine.rb +3 -1
  21. data/db/migrate/20130914211030_create_host_bootdisk_template.rb +4 -4
  22. data/db/migrate/20130915104500_edit_host_bootdisk_template_multinic.rb +4 -4
  23. data/db/migrate/20130915133321_create_kickstart_bootdisk_template.rb +4 -4
  24. data/db/migrate/20130915201457_create_generic_host_bootdisk_template.rb +4 -4
  25. data/db/migrate/20131021095100_edit_host_bootdisk_template_dns_secondary.rb +4 -4
  26. data/db/migrate/20140522185700_change_templatekind_to_bootdisk.rb +16 -14
  27. data/db/migrate/20171009225200_remove_duplicate_bootdisk_templates.rb +4 -2
  28. data/db/seeds.d/50-bootdisk_templates.rb +21 -36
  29. data/lib/foreman_bootdisk.rb +2 -0
  30. data/lib/foreman_bootdisk/engine.rb +26 -37
  31. data/lib/foreman_bootdisk/version.rb +3 -1
  32. data/lib/tasks/bootdisk.rake +34 -17
  33. data/locale/ca/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  34. data/locale/ca/foreman_bootdisk.po +31 -15
  35. data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  36. data/locale/de/foreman_bootdisk.po +39 -21
  37. data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  38. data/locale/en/foreman_bootdisk.po +24 -9
  39. data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  40. data/locale/en_GB/foreman_bootdisk.po +30 -15
  41. data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  42. data/locale/es/foreman_bootdisk.po +48 -33
  43. data/locale/foreman_bootdisk.pot +80 -52
  44. data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  45. data/locale/fr/foreman_bootdisk.po +30 -15
  46. data/locale/gemspec.rb +3 -1
  47. data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  48. data/locale/it/foreman_bootdisk.po +28 -13
  49. data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  50. data/locale/ja/foreman_bootdisk.po +29 -14
  51. data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  52. data/locale/ko/foreman_bootdisk.po +28 -13
  53. data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  54. data/locale/pt_BR/foreman_bootdisk.po +42 -26
  55. data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  56. data/locale/ru/foreman_bootdisk.po +28 -13
  57. data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  58. data/locale/sv_SE/foreman_bootdisk.po +26 -11
  59. data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  60. data/locale/zh_CN/foreman_bootdisk.po +46 -31
  61. data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  62. data/locale/zh_TW/foreman_bootdisk.po +28 -13
  63. data/release-gem +84 -0
  64. data/test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb +35 -33
  65. data/test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb +9 -7
  66. data/test/functional/foreman_bootdisk/disks_controller_test.rb +27 -25
  67. data/test/models/host/managed_test.rb +17 -13
  68. data/test/test_plugin_helper.rb +11 -7
  69. data/test/unit/access_permissions_test.rb +2 -0
  70. data/test/unit/concerns/compute_resources/vmware_test.rb +67 -63
  71. data/test/unit/concerns/host_test.rb +64 -53
  72. data/test/unit/concerns/orchestration/compute_test.rb +41 -39
  73. data/test/unit/foreman_bootdisk/renderer_test.rb +3 -1
  74. data/test/unit/foreman_bootdisk/scope/bootdisk_test.rb +3 -1
  75. data/test/unit/foreman_bootdisk/scope/full_host_bootdisk_test.rb +30 -0
  76. data/test/unit/iso_generator_test.rb +67 -40
  77. metadata +65 -5
@@ -1,73 +1,84 @@
1
- require 'test_plugin_helper'
1
+ # frozen_string_literal: true
2
2
 
3
- class ForemanBootdisk::HostTest < ActiveSupport::TestCase
4
- test "#bootdisk_build? must be true when provision_method is bootdisk" do
5
- host = FactoryBot.build(:host, :managed)
6
- host.provision_method = 'bootdisk'
7
- assert host.bootdisk_build?
8
- refute host.image_build?
9
- refute host.pxe_build?
10
- end
3
+ require 'test_plugin_helper'
11
4
 
12
- test "#validate_media? must be true when provision_method is bootdisk" do
13
- host = FactoryBot.build(:host, :managed,
14
- :provision_method => "bootdisk",
15
- :build => true,
16
- )
17
- assert host.validate_media?
18
- end
5
+ module ForemanBootdisk
6
+ class HostTest < ActiveSupport::TestCase
7
+ test '#bootdisk_build? must be true when provision_method is bootdisk' do
8
+ host = FactoryBot.build(:host, :managed)
9
+ host.provision_method = 'bootdisk'
10
+ assert host.bootdisk_build?
11
+ assert_not host.image_build?
12
+ assert_not host.pxe_build?
13
+ end
19
14
 
20
- test "#can_be_built? must be true when provision_method is bootdisk" do
21
- host = FactoryBot.build(:host, :managed,
22
- :provision_method => "bootdisk"
23
- )
24
- assert host.can_be_built?
25
- end
15
+ test '#validate_media? must be true when provision_method is bootdisk' do
16
+ host = FactoryBot.build(:host, :managed,
17
+ provision_method: 'bootdisk',
18
+ build: true)
19
+ assert host.validate_media?
20
+ end
26
21
 
22
+ test '#can_be_built? must be true when provision_method is bootdisk' do
23
+ host = FactoryBot.build(:host, :managed,
24
+ provision_method: 'bootdisk')
25
+ assert host.can_be_built?
26
+ end
27
27
 
28
- test "host should have bootdisk" do
29
- if unattended?
30
- h = FactoryBot.build(:host, :managed,
31
- :provision_method => "bootdisk"
32
- )
33
- assert h.bootdisk?
28
+ test 'host should have bootdisk' do
29
+ if unattended?
30
+ h = FactoryBot.build(:host, :managed,
31
+ provision_method: 'bootdisk')
32
+ assert h.bootdisk?
33
+ end
34
34
  end
35
- end
36
35
 
37
- test "host should not have bootdisk" do
38
- if unattended?
39
- h = FactoryBot.create(:host)
40
- assert_equal false, h.bootdisk?
36
+ test 'host should not have bootdisk' do
37
+ if unattended?
38
+ h = FactoryBot.create(:host)
39
+ assert_equal false, h.bootdisk?
40
+ end
41
41
  end
42
- end
43
42
 
44
- context "#bootdisk_downloadable?" do
45
- test "should be true for 64 bit architecture" do
46
- architecture = Architecture.where(:name => 'x86_64').first
47
- host = FactoryBot.build(:host, :managed, :architecture => architecture)
43
+ context '#bootdisk_downloadable?' do
44
+ test 'should be true for 64 bit architecture' do
45
+ architecture = Architecture.where(name: 'x86_64').first
46
+ host = FactoryBot.build(:host, :managed, architecture: architecture)
48
47
 
49
- assert host.bootdisk_downloadable?
50
- end
48
+ assert host.bootdisk_downloadable?
49
+ end
51
50
 
52
- test "should be true for 32 bit architecture" do
53
- architecture = FactoryBot.create(:architecture, :name => 'i386')
54
- host = FactoryBot.build(:host, :managed, :architecture => architecture)
51
+ test 'should be true for 32 bit architecture' do
52
+ architecture = FactoryBot.create(:architecture, name: 'i386')
53
+ host = FactoryBot.build(:host, :managed, architecture: architecture)
55
54
 
56
- assert host.bootdisk_downloadable?
57
- end
55
+ assert host.bootdisk_downloadable?
56
+ end
57
+
58
+ test 'should be false for non-intel architecture' do
59
+ architecture = Architecture.where(name: 's390').first
60
+ host = FactoryBot.build(:host, :managed, architecture: architecture)
61
+
62
+ assert_not host.bootdisk_downloadable?
63
+ end
58
64
 
59
- test "should be false for non-intel architecture" do
60
- architecture = Architecture.where(:name => 's390').first
61
- host = FactoryBot.build(:host, :managed, :architecture => architecture)
65
+ test 'should be true if architecture is absent' do
66
+ host = FactoryBot.build(:host, :managed, architecture: nil)
62
67
 
63
- assert_not host.bootdisk_downloadable?
68
+ assert_nil host.architecture
69
+ assert host.bootdisk_downloadable?
70
+ end
64
71
  end
65
72
 
66
- test 'should be true if architecture is absent' do
67
- host = FactoryBot.build(:host, :managed, :architecture => nil)
73
+ context '#bootdisk_build?' do
74
+ test 'should be false for hosts without bootdisk' do
75
+ host = FactoryBot.create(:host)
76
+ assert_not host.bootdisk_build?
77
+ end
68
78
 
69
- assert_nil host.architecture
70
- assert host.bootdisk_downloadable?
79
+ test 'should be available in safe mode' do
80
+ assert Host::Managed::Jail.allowed?(:bootdisk_build?)
81
+ end
71
82
  end
72
83
  end
73
84
  end
@@ -1,48 +1,50 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
 
3
- class ForemanBootdisk::OrchestrationComputeTest < ActiveSupport::TestCase
4
- setup do
5
- disable_orchestration
6
- @cr = FactoryBot.build(:vmware_cr)
7
- @host = FactoryBot.build(:host, :managed,
8
- :compute_resource => @cr,
9
- :provision_method => "bootdisk",
10
- )
11
- end
5
+ module ForemanBootdisk
6
+ class OrchestrationComputeTest < ActiveSupport::TestCase
7
+ setup do
8
+ disable_orchestration
9
+ @cr = FactoryBot.build(:vmware_cr)
10
+ @host = FactoryBot.build(:host, :managed,
11
+ compute_resource: @cr,
12
+ provision_method: 'bootdisk')
13
+ end
12
14
 
13
- test "provisioning a host with provision method bootdisk should upload iso" do
14
- @cr.expects(:iso_upload)
15
- @host.send(:setIsoImage)
16
- end
15
+ test 'provisioning a host with provision method bootdisk should upload iso' do
16
+ @cr.expects(:iso_upload)
17
+ @host.send(:setIsoImage)
18
+ end
17
19
 
18
- test "provisioning a host with provision method bootdisk should attach iso" do
19
- @cr.expects(:iso_attach)
20
- @host.send(:setAttachIsoImage)
21
- end
20
+ test 'provisioning a host with provision method bootdisk should attach iso' do
21
+ @cr.expects(:iso_attach)
22
+ @host.send(:setAttachIsoImage)
23
+ end
22
24
 
23
- test "provisioning a host with provision method bootdisk should queue bootdisk tasks" do
24
- @host.stubs(:compute?).returns(true)
25
- @host.send(:queue_bootdisk_compute)
26
- tasks = @host.queue.all.map { |t| t.name }
27
- assert_includes tasks, "Generating ISO image for #{@host.name}"
28
- assert_includes tasks, "Upload ISO image to datastore for #{@host.name}"
29
- assert_includes tasks, "Attach ISO image to CDROM drive for #{@host.name}"
30
- end
25
+ test 'provisioning a host with provision method bootdisk should queue bootdisk tasks' do
26
+ @host.stubs(:compute?).returns(true)
27
+ @host.send(:queue_bootdisk_compute)
28
+ tasks = @host.queue.all.map(&:name)
29
+ assert_includes tasks, "Generating ISO image for #{@host.name}"
30
+ assert_includes tasks, "Upload ISO image to datastore for #{@host.name}"
31
+ assert_includes tasks, "Attach ISO image to CDROM drive for #{@host.name}"
32
+ end
31
33
 
32
- test "should rebuild bootdisk" do
33
- @host.expects(:bootdisk_generate_iso_image).returns(true)
34
- @host.expects(:bootdisk_upload_iso).returns(true)
35
- @host.expects(:bootdisk_attach_iso).returns(true)
36
- assert @host.rebuild_with_bootdisk
37
- end
34
+ test 'should rebuild bootdisk' do
35
+ @host.expects(:bootdisk_generate_iso_image).returns(true)
36
+ @host.expects(:bootdisk_upload_iso).returns(true)
37
+ @host.expects(:bootdisk_attach_iso).returns(true)
38
+ assert @host.rebuild_with_bootdisk
39
+ end
38
40
 
39
- test "should skip rebuild bootdisk" do
40
- host = FactoryBot.build(:host,
41
- :compute_resource => @cr
42
- )
43
- host.expects(:bootdisk_generate_iso_image).never
44
- host.expects(:bootdisk_upload_iso).never
45
- host.expects(:bootdisk_attach_iso).never
46
- assert host.rebuild_with_bootdisk
41
+ test 'should skip rebuild bootdisk' do
42
+ host = FactoryBot.build(:host,
43
+ compute_resource: @cr)
44
+ host.expects(:bootdisk_generate_iso_image).never
45
+ host.expects(:bootdisk_upload_iso).never
46
+ host.expects(:bootdisk_attach_iso).never
47
+ assert host.rebuild_with_bootdisk
48
+ end
47
49
  end
48
50
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
 
3
5
  module ForemanBootdisk
@@ -20,7 +22,7 @@ module ForemanBootdisk
20
22
  test 'does not include a host token' do
21
23
  rendered_template = renderer.generic_template_render
22
24
  assert_includes rendered_template, 'http://foreman.some.host.fqdn/unattended/iPXE?mac=${net0/mac}'
23
- refute_includes rendered_template, 'token'
25
+ assert_not_includes rendered_template, 'token'
24
26
  end
25
27
  end
26
28
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
 
3
5
  module ForemanBootdisk
@@ -13,7 +15,7 @@ module ForemanBootdisk
13
15
  end
14
16
 
15
17
  test 'should render bootdisk chain url with custom mac' do
16
- assert_equal "http://foreman.some.host.fqdn/unattended/iPXE?mac=00%3A11%3A22%3A33%3A44%3A55", scope.bootdisk_chain_url('00:11:22:33:44:55')
18
+ assert_equal 'http://foreman.some.host.fqdn/unattended/iPXE?mac=00%3A11%3A22%3A33%3A44%3A55', scope.bootdisk_chain_url('00:11:22:33:44:55')
17
19
  end
18
20
  end
19
21
 
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_plugin_helper'
4
+
5
+ module ForemanBootdisk
6
+ module Scope
7
+ class BootdiskTest < ActiveSupport::TestCase
8
+ let(:operatingsystem) { FactoryBot.create(:ubuntu14_10, :with_media, :with_archs) }
9
+ let(:host) { FactoryBot.build(:host, :managed, operatingsystem: operatingsystem) }
10
+ let(:source) { Foreman::Renderer::Source::String.new(content: 'Test') }
11
+ let(:scope) { ForemanBootdisk::Scope::FullHostBootdisk.new(host: host, source: source) }
12
+
13
+ setup do
14
+ MediumProviders::Default.any_instance.stubs(:unique_id).returns('MyMedium01-ZYHBD6OPET')
15
+ end
16
+
17
+ describe '@kernel' do
18
+ test 'should match filename on bootdisk' do
19
+ assert_equal 'BOOT/MYMEDIUM01_ZYHBD6OPET_LINUX', scope.instance_variable_get('@kernel')
20
+ end
21
+ end
22
+
23
+ describe '@initrd' do
24
+ test 'should match filename on bootdisk' do
25
+ assert_equal 'BOOT/EDIUM01_ZYHBD6OPET_INITRD_GZ', scope.instance_variable_get('@initrd')
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,48 +1,75 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
 
3
- class ForemanBootdisk::IsoGeneratorTest < ActiveSupport::TestCase
4
- include ForemanBootdiskTestHelper
5
- setup :setup_bootdisk
6
- setup :setup_org_loc
7
- setup :setup_subnet
8
- setup :setup_host
5
+ module ForemanBootdisk
6
+ class IsoGeneratorTest < ActiveSupport::TestCase
7
+ include ForemanBootdiskTestHelper
8
+ setup :setup_bootdisk
9
9
 
10
- setup do
11
- @host.build = true
12
- end
10
+ describe '#generate_full_host' do
11
+ let(:medium) { FactoryBot.create(:medium, name: 'Red Hat Enterprise Linux Atomic Mirror') }
12
+ let(:operatingsystem) { FactoryBot.create(:ubuntu14_10, :with_archs, :with_ptables, media: [medium]) }
13
+ let(:host) { FactoryBot.create(:host, :managed, operatingsystem: operatingsystem, build: true) }
14
+ let(:template) { FactoryBot.create(:provisioning_template, template: 'Fake kernel line <%= @kernel %> - <%= @initrd %>') }
13
15
 
14
- test "generate_full_host creates with ISO-compatible file names" do
15
- @host.expects(:generate_pxe_template).with(:PXELinux).returns("Fake kernel line boot/Debian-8.1-x86_64-vmlinuz")
16
- boot_files = [
17
- {:"boot/Debian-8.1-x86_64"=>"/tmp/pxeboot/vmlinuz"},
18
- {:"boot/Debian-8.1-x86_64"=>"/tmp/pxeboot/initrd.img"}
19
- ]
20
- @host.operatingsystem.expects(:pxe_files).returns(boot_files)
21
- ForemanBootdisk::ISOGenerator.expects(:generate).with({
22
- :isolinux => 'Fake kernel line BOOT/DEBIAN_8_1_X86_64_VMLINUZ',
23
- :files => [[['BOOT/DEBIAN_8_1_X86_64_VMLINUZ', '/tmp/pxeboot/vmlinuz']],
24
- [['BOOT/DEBIAN_8_1_X86_64_INITRD_IMG', '/tmp/pxeboot/initrd.img']]] }, anything)
25
- ForemanBootdisk::ISOGenerator.generate_full_host(@host)
26
- end
16
+ setup do
17
+ host.stubs(:provisioning_template).with(kind: :PXELinux).returns(template)
18
+ end
27
19
 
28
- test "generate_full_host creates with ISO-compatible long file names" do
29
- @host.expects(:generate_pxe_template).with(:PXELinux).returns("Fake kernel line boot/RedHatEnterpriseLinuxAtomic-7.3-x86_64-vmlinuz")
30
- boot_files = [
31
- {:"boot/RedHatEnterpriseLinuxAtomic-7.3-x86_64"=>"/tmp/pxeboot/vmlinuz"},
32
- {:"boot/RedHatEnterpriseLinuxAtomic-7.3-x86_64"=>"/tmp/pxeboot/initrd.img"}
33
- ]
34
- @host.operatingsystem.expects(:pxe_files).returns(boot_files)
35
- ForemanBootdisk::ISOGenerator.expects(:generate).with({
36
- :isolinux => 'Fake kernel line BOOT/NUXATOMIC_7_3_X86_64_VMLINUZ',
37
- :files => [[['BOOT/NUXATOMIC_7_3_X86_64_VMLINUZ', '/tmp/pxeboot/vmlinuz']],
38
- [['BOOT/ATOMIC_7_3_X86_64_INITRD_IMG', '/tmp/pxeboot/initrd.img']]]}, anything)
39
- ForemanBootdisk::ISOGenerator.generate_full_host(@host)
40
- end
20
+ test 'fetch handles redirect' do
21
+ Dir.mktmpdir do |dir|
22
+ url = 'http://example.com/request'
23
+ redirection = 'http://example.com/redirect'
24
+ stub_request(:get, url).to_return(status: 301, headers: { 'Location' => redirection })
25
+ stub_request(:get, redirection)
26
+ ForemanBootdisk::ISOGenerator.fetch(File.join(dir, 'test'), url)
27
+ end
28
+ end
29
+
30
+ test 'generate_full_host creates with ISO-compatible file names' do
31
+ urls = host.operatingsystem.boot_file_sources(host.medium_provider)
32
+
33
+ kernel = ForemanBootdisk::ISOGenerator.iso9660_filename(
34
+ host.operatingsystem.kernel(host.medium_provider)
35
+ )
36
+ kernel_url = urls[:kernel]
37
+
38
+ initrd = ForemanBootdisk::ISOGenerator.iso9660_filename(
39
+ host.operatingsystem.initrd(host.medium_provider)
40
+ )
41
+ initrd_url = urls[:initrd]
42
+
43
+ ForemanBootdisk::ISOGenerator.expects(:generate).with({
44
+ isolinux: "Fake kernel line #{kernel} - #{initrd}",
45
+ files: { kernel => kernel_url,
46
+ initrd => initrd_url }
47
+ }, anything)
48
+
49
+ ForemanBootdisk::ISOGenerator.generate_full_host(host)
50
+ end
51
+ end
52
+
53
+ describe '#generate' do
54
+ test 'generates an iso image' do
55
+ ForemanBootdisk::ISOGenerator.expects(:system).with(
56
+ regexp_matches(/genisoimage -o .*output.iso -iso-level 2 -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .*build/)
57
+ ).returns(true)
58
+ ForemanBootdisk::ISOGenerator.expects(:system).with('isohybrid', anything).returns(true)
59
+ ForemanBootdisk::ISOGenerator.generate do |iso|
60
+ assert_not_nil iso
61
+ end
62
+ end
63
+ end
64
+
65
+ describe '#iso9660_filename' do
66
+ test 'converts path to iso9660' do
67
+ assert_equal 'BOOT/SOME_FILE_N_A_M_E123_', ForemanBootdisk::ISOGenerator.iso9660_filename('boot/some-File-n_a_m_e123Ä')
68
+ end
41
69
 
42
- test "full host image generation generates via PXELinux type" do
43
- @host.expects(:generate_pxe_template).with(:PXELinux).returns("Template")
44
- @host.operatingsystem.expects(:pxe_files).returns([])
45
- ForemanBootdisk::ISOGenerator.expects(:generate).with({:isolinux => "Template", :files => []}, anything)
46
- ForemanBootdisk::ISOGenerator.generate_full_host(@host)
70
+ test 'shortens long filenames' do
71
+ assert_equal 'BOOT/RPRISELINUXATOMIC_7_3_X86_64', ForemanBootdisk::ISOGenerator.iso9660_filename('boot/RedHatEnterpriseLinuxAtomic-7.3-x86_64')
72
+ end
73
+ end
47
74
  end
48
75
  end
metadata CHANGED
@@ -1,15 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_bootdisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.0.0
4
+ version: 16.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-04 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
+ dependencies:
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
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
13
69
  description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts
14
70
  without the need for PXE infrastructure.
15
71
  email: dcleal@redhat.com
@@ -21,6 +77,7 @@ extra_rdoc_files:
21
77
  - README.md
22
78
  files:
23
79
  - ".tx/config"
80
+ - AUTHORS
24
81
  - CHANGES.md
25
82
  - LICENSE
26
83
  - README.md
@@ -30,6 +87,7 @@ files:
30
87
  - app/controllers/foreman_bootdisk/disks_controller.rb
31
88
  - app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb
32
89
  - app/lib/foreman_bootdisk/scope/bootdisk.rb
90
+ - app/lib/foreman_bootdisk/scope/full_host_bootdisk.rb
33
91
  - app/models/concerns/foreman_bootdisk/compute_resources/vmware.rb
34
92
  - app/models/concerns/foreman_bootdisk/host_ext.rb
35
93
  - app/models/concerns/foreman_bootdisk/orchestration/compute.rb
@@ -38,6 +96,7 @@ files:
38
96
  - app/services/foreman_bootdisk/renderer.rb
39
97
  - app/views/foreman_bootdisk/disks/help.html.erb
40
98
  - app/views/foreman_bootdisk/generic_host.erb
99
+ - app/views/foreman_bootdisk/generic_static_host.erb
41
100
  - app/views/foreman_bootdisk/host.erb
42
101
  - app/views/hosts/provision_method/bootdisk/_form.html.erb
43
102
  - config/routes.rb
@@ -86,6 +145,7 @@ files:
86
145
  - locale/zh_CN/foreman_bootdisk.po
87
146
  - locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo
88
147
  - locale/zh_TW/foreman_bootdisk.po
148
+ - release-gem
89
149
  - test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb
90
150
  - test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb
91
151
  - test/functional/foreman_bootdisk/disks_controller_test.rb
@@ -97,6 +157,7 @@ files:
97
157
  - test/unit/concerns/orchestration/compute_test.rb
98
158
  - test/unit/foreman_bootdisk/renderer_test.rb
99
159
  - test/unit/foreman_bootdisk/scope/bootdisk_test.rb
160
+ - test/unit/foreman_bootdisk/scope/full_host_bootdisk_test.rb
100
161
  - test/unit/iso_generator_test.rb
101
162
  homepage: http://github.com/theforeman/foreman_bootdisk
102
163
  licenses:
@@ -117,8 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
178
  - !ruby/object:Gem::Version
118
179
  version: '0'
119
180
  requirements: []
120
- rubyforge_project:
121
- rubygems_version: 2.7.6
181
+ rubygems_version: 3.0.3
122
182
  signing_key:
123
183
  specification_version: 4
124
184
  summary: Create boot disks to provision hosts with Foreman