foreman_bootdisk 11.0.0 → 12.0.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.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/README.md +1 -0
- data/app/models/concerns/foreman_bootdisk/host_ext.rb +0 -4
- data/app/services/foreman_bootdisk/iso_generator.rb +4 -1
- data/app/services/foreman_bootdisk/renderer.rb +2 -2
- data/app/services/foreman_bootdisk/renderer_methods.rb +6 -2
- data/lib/foreman_bootdisk/engine.rb +2 -2
- data/lib/foreman_bootdisk/version.rb +1 -1
- data/locale/foreman_bootdisk.pot +2 -10
- data/test/unit/iso_generator_test.rb +2 -3
- metadata +3 -4
- data/app/controllers/concerns/foreman_bootdisk/unattended_controller_ext.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 208b518a4b2d0978e4ef072aab241305e16b327e4709f6bad1cfee39ffc7b85a
|
4
|
+
data.tar.gz: 758b6cba3dbeef8c95862aac8b4ded56c25e4d52224e15d962c538502baaec96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98b20bf6e7304aeae69d1bc5244681fea14b2d60e8d4ab32e0f6990c5f47c9985d96d1d1491188336a84ba42d25629ce3cfe74f0cbe6e6b4a0c5525fdd8e5e21
|
7
|
+
data.tar.gz: eb3b37f7b7846aeb5d4179fe5f0bb74183aa48376494c6dcf9aad05d8f8dd7767b38d5ebda1cbf7d9c2479fe8b5e4957a9df74b9d440ff46c8da4e482af535e0
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v12.0.0
|
4
|
+
* fixed subnet image token stub (#22428)
|
5
|
+
* moved MAC based identification to Foreman core (#22858)
|
6
|
+
* bootdisk_raise fixed for host context (#22482)
|
7
|
+
* fixed nil exception with PXELinux template (#23267)
|
8
|
+
|
3
9
|
## v11.0.0
|
4
10
|
* bootdisk_raise template marco works in preview mode (#22136)
|
5
11
|
* host image works with subnet without gateway (#21106)
|
data/README.md
CHANGED
@@ -10,10 +10,6 @@ module ForemanBootdisk::HostExt
|
|
10
10
|
unattended_render(bootdisk_template.template)
|
11
11
|
end
|
12
12
|
|
13
|
-
def bootdisk_chain_url(mac = self.mac, action = 'iPXE')
|
14
|
-
ForemanBootdisk::Renderer.format_bootdisk_chain_url(foreman_url(action), mac)
|
15
|
-
end
|
16
|
-
|
17
13
|
def bootdisk_build?
|
18
14
|
provision_method == 'bootdisk'
|
19
15
|
end
|
@@ -11,7 +11,10 @@ class ForemanBootdisk::ISOGenerator
|
|
11
11
|
raise ::Foreman::Exception.new(N_('Host is not in build mode, so the template cannot be rendered')) unless host.build?
|
12
12
|
|
13
13
|
tmpl = host.send(:generate_pxe_template, :PXELinux)
|
14
|
-
|
14
|
+
unless tmpl
|
15
|
+
err = host.errors.full_messages.to_sentence
|
16
|
+
raise ::Foreman::Exception.new(N_('Unable to generate disk template, PXELinux template not found or: %s'), err)
|
17
|
+
end
|
15
18
|
|
16
19
|
# pxe_files and filename conversion is utterly bizarre
|
17
20
|
# aim to convert filenames to something usable under ISO 9660, update the template to match
|
@@ -13,9 +13,9 @@ module ForemanBootdisk
|
|
13
13
|
if subnet.present?
|
14
14
|
# rendering a subnet-level bootdisk requires tricking the renderer into thinking it has a
|
15
15
|
# valid host, with a token, and with a tftp proxy
|
16
|
-
@host = Struct.new(:token, :
|
16
|
+
@host = Struct.new(:token, :provision_interface).new(
|
17
17
|
Struct.new(:value).new('faketoken'),
|
18
|
-
subnet
|
18
|
+
Struct.new(:subnet).new(subnet)
|
19
19
|
)
|
20
20
|
else
|
21
21
|
@host = Struct.new(:token, :subnet).new(nil,nil)
|
@@ -10,14 +10,18 @@ module ForemanBootdisk
|
|
10
10
|
u.fragment = nil
|
11
11
|
u.to_s
|
12
12
|
end
|
13
|
+
|
14
|
+
def bootdisk_raise(*args)
|
15
|
+
raise ::Foreman::Exception.new(*args)
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
|
-
def bootdisk_chain_url(mac =
|
19
|
+
def bootdisk_chain_url(mac = self.try(:mac), action = 'iPXE')
|
16
20
|
self.class.format_bootdisk_chain_url(foreman_url(action), mac)
|
17
21
|
end
|
18
22
|
|
19
23
|
def bootdisk_raise(*args)
|
20
|
-
|
24
|
+
self.class.bootdisk_raise(*args)
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -48,7 +48,7 @@ module ForemanBootdisk
|
|
48
48
|
|
49
49
|
initializer 'foreman_bootdisk.register_plugin', :before => :finisher_hook do |app|
|
50
50
|
Foreman::Plugin.register :foreman_bootdisk do
|
51
|
-
requires_foreman '>= 1.
|
51
|
+
requires_foreman '>= 1.18'
|
52
52
|
|
53
53
|
security_block :bootdisk do |map|
|
54
54
|
permission :download_bootdisk, {:'foreman_bootdisk/disks' => [:generic, :host, :full_host, :subnet, :help],
|
@@ -77,9 +77,9 @@ module ForemanBootdisk
|
|
77
77
|
config.to_prepare do
|
78
78
|
begin
|
79
79
|
Host::Managed.send(:prepend, ForemanBootdisk::HostExt)
|
80
|
+
Host::Managed.send(:include, ForemanBootdisk::RendererMethods)
|
80
81
|
Host::Managed.send(:include, ForemanBootdisk::Orchestration::Compute) if SETTINGS[:unattended]
|
81
82
|
HostsHelper.send(:prepend, ForemanBootdisk::HostsHelperExt)
|
82
|
-
UnattendedController.send(:prepend, ForemanBootdisk::UnattendedControllerExt)
|
83
83
|
Foreman::Model::Vmware.send(:prepend, ForemanBootdisk::ComputeResources::Vmware) if Foreman::Model::Vmware.available?
|
84
84
|
rescue => e
|
85
85
|
puts "#{ForemanBootdisk::ENGINE_NAME}: skipping engine hook (#{e.to_s})"
|
data/locale/foreman_bootdisk.pot
CHANGED
@@ -8,8 +8,8 @@ msgid ""
|
|
8
8
|
msgstr ""
|
9
9
|
"Project-Id-Version: foreman_bootdisk 1.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
|
-
"POT-Creation-Date:
|
12
|
-
"PO-Revision-Date:
|
11
|
+
"POT-Creation-Date: 2018-03-12 12:56-0400\n"
|
12
|
+
"PO-Revision-Date: 2018-03-12 12:56-0400\n"
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
15
|
"Language: \n"
|
@@ -289,14 +289,6 @@ msgstr ""
|
|
289
289
|
msgid "Host has no domain defined"
|
290
290
|
msgstr ""
|
291
291
|
|
292
|
-
#: ../app/views/foreman_bootdisk/host.erb:13
|
293
|
-
msgid "Subnet (%s) has no gateway defined"
|
294
|
-
msgstr ""
|
295
|
-
|
296
|
-
#: ../app/views/foreman_bootdisk/host.erb:14
|
297
|
-
msgid "Subnet (%s) has no primary DNS server defined"
|
298
|
-
msgstr ""
|
299
|
-
|
300
292
|
#: ../lib/foreman_bootdisk/engine.rb:65
|
301
293
|
msgid "Boot disk based"
|
302
294
|
msgstr ""
|
@@ -40,10 +40,9 @@ class ForemanBootdisk::IsoGeneratorTest < ActiveSupport::TestCase
|
|
40
40
|
end
|
41
41
|
|
42
42
|
test "full host image generation generates via PXELinux type" do
|
43
|
+
@host.expects(:generate_pxe_template).with(:PXELinux).returns("Template")
|
43
44
|
@host.operatingsystem.expects(:pxe_files).returns([])
|
44
|
-
|
45
|
-
@host.operatingsystem.expects(:initrd).returns("initrd")
|
46
|
-
ForemanBootdisk::ISOGenerator.expects(:generate).with({:isolinux => nil, :files => []}, anything)
|
45
|
+
ForemanBootdisk::ISOGenerator.expects(:generate).with({:isolinux => "Template", :files => []}, anything)
|
47
46
|
ForemanBootdisk::ISOGenerator.generate_full_host(@host)
|
48
47
|
end
|
49
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_bootdisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 12.0.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-
|
11
|
+
date: 2018-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts
|
14
14
|
without the need for PXE infrastructure.
|
@@ -25,7 +25,6 @@ files:
|
|
25
25
|
- LICENSE
|
26
26
|
- README.md
|
27
27
|
- app/assets/javascripts/foreman_bootdisk/host_edit.js
|
28
|
-
- app/controllers/concerns/foreman_bootdisk/unattended_controller_ext.rb
|
29
28
|
- app/controllers/foreman_bootdisk/api/v2/disks_controller.rb
|
30
29
|
- app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb
|
31
30
|
- app/controllers/foreman_bootdisk/disks_controller.rb
|
@@ -116,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
115
|
version: '0'
|
117
116
|
requirements: []
|
118
117
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.7.
|
118
|
+
rubygems_version: 2.7.6
|
120
119
|
signing_key:
|
121
120
|
specification_version: 4
|
122
121
|
summary: Create boot disks to provision hosts with Foreman
|