foreman_bootdisk 7.0.1 → 8.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 +2 -3
- data/README.md +1 -0
- data/app/assets/javascripts/foreman_bootdisk/host_edit.js +0 -6
- data/app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb +6 -6
- data/app/views/foreman_bootdisk/generic_host.erb +0 -2
- data/app/views/foreman_bootdisk/host.erb +2 -5
- data/lib/foreman_bootdisk/engine.rb +2 -2
- data/lib/foreman_bootdisk/version.rb +1 -1
- data/lib/tasks/bootdisk.rake +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc62297d4d1bc9080a8e9aebe25d02eb185ab357
|
4
|
+
data.tar.gz: f09c9610aae17af4185be4577f671ac4546ad669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61fa71708a3cdd5ee6152197c4cbd8a13011c4c733c821a453e6d9320677463820c624f57224c65d3ec43cd258167ac68cb8bda3829d0d0093fea3fc527bbbd0
|
7
|
+
data.tar.gz: a8415772ff0aa0ead2e4e5cb6baead0931c315ab131203cb7917df33e290c60fd0f9eaedfd4f93d9a3254ebe7007bf4a923e26fd150e2e5c539da855f15aac8a
|
data/CHANGES.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
4
|
-
*
|
5
|
-
* show bootdisk fields after new host page reload (#14796)
|
3
|
+
## v8.0.0
|
4
|
+
* fix button and compute resource loading compatibility with Foreman 1.12
|
6
5
|
|
7
6
|
## v7.0.0
|
8
7
|
* add automated "bootdisk" provisioning method when creating hosts on VMware
|
data/README.md
CHANGED
@@ -5,9 +5,3 @@ function bootdisk_provision_method_selected() {
|
|
5
5
|
$('#image_selection select').attr('disabled', true);
|
6
6
|
}
|
7
7
|
$(document).on('change', '#host_provision_method_bootdisk', bootdisk_provision_method_selected);
|
8
|
-
|
9
|
-
$(document).on('ContentLoad', function() {
|
10
|
-
if($('#host_provision_method_bootdisk').is(':checked')) {
|
11
|
-
bootdisk_provision_method_selected();
|
12
|
-
}
|
13
|
-
});
|
@@ -8,14 +8,14 @@ module ForemanBootdisk::HostsHelperExt
|
|
8
8
|
def host_title_actions_with_bootdisk(*args)
|
9
9
|
title_actions(
|
10
10
|
button_group(
|
11
|
-
select_action_button(_('Boot disk'), {},
|
12
|
-
display_bootdisk_link_if_authorized(_("Host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'host', :id => @host}, :class=>'
|
13
|
-
display_bootdisk_link_if_authorized(_("Full host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'full_host', :id => @host}, :class=>'
|
11
|
+
select_action_button(_('Boot disk'), {:class => 'btn btn-group'},
|
12
|
+
display_bootdisk_link_if_authorized(_("Host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'host', :id => @host}, :class=>'la'),
|
13
|
+
display_bootdisk_link_if_authorized(_("Full host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'full_host', :id => @host}, :class=>'la'),
|
14
14
|
content_tag(:li, "", :class => "divider"),
|
15
|
-
display_bootdisk_link_if_authorized(_("Generic image"), {:controller => 'foreman_bootdisk/disks', :action => 'generic'}, :class=>'
|
15
|
+
display_bootdisk_link_if_authorized(_("Generic image"), {:controller => 'foreman_bootdisk/disks', :action => 'generic'}, :class=>'la'),
|
16
16
|
display_bootdisk_for_subnet,
|
17
17
|
content_tag(:li, "", :class => "divider"),
|
18
|
-
display_bootdisk_link_if_authorized(_("Help"), {:controller => 'foreman_bootdisk/disks', :action => 'help'}, :class=>'
|
18
|
+
display_bootdisk_link_if_authorized(_("Help"), {:controller => 'foreman_bootdisk/disks', :action => 'help'}, :class=>'la')
|
19
19
|
)
|
20
20
|
)
|
21
21
|
)
|
@@ -25,7 +25,7 @@ module ForemanBootdisk::HostsHelperExt
|
|
25
25
|
# need to wrap this one in a test for template proxy presence
|
26
26
|
def display_bootdisk_for_subnet
|
27
27
|
if (proxy = @host.try(:subnet).try(:tftp)) && proxy.has_feature?('Templates')
|
28
|
-
display_bootdisk_link_if_authorized(_("Subnet '%s' generic image") % @host.subnet.name, {:controller => 'foreman_bootdisk/disks', :action => 'subnet', :id => @host}, :class=>'
|
28
|
+
display_bootdisk_link_if_authorized(_("Subnet '%s' generic image") % @host.subnet.name, {:controller => 'foreman_bootdisk/disks', :action => 'subnet', :id => @host}, :class=>'la')
|
29
29
|
else
|
30
30
|
""
|
31
31
|
end
|
@@ -14,29 +14,26 @@ bootdisk_raise(N_('Subnet (%s) has no gateway defined'), interface.subnet) if in
|
|
14
14
|
bootdisk_raise(N_('Subnet (%s) has no primary DNS server defined'), interface.subnet) if interface.subnet.dns_primary.nil? || interface.subnet.dns_primary.empty?
|
15
15
|
%>
|
16
16
|
|
17
|
-
echo Foreman Bootdisk: Host image (<%= @host.name %>)
|
18
|
-
|
19
17
|
# loop over net* until the host's MAC matches
|
20
18
|
<% (0..32).each do |i| -%>
|
21
19
|
:net<%= i %>
|
22
20
|
isset ${net<%= i -%>/mac} || goto no_nic
|
23
21
|
echo net<%= i -%> is a ${net<%= i -%>/chip} with MAC ${net<%= i -%>/mac}
|
24
22
|
iseq ${net<%= i -%>/mac} <%= interface.mac -%> || goto net<%= i+1 %>
|
23
|
+
ifopen net<%= i %>
|
25
24
|
set idx:int32 <%= i %>
|
26
25
|
goto loop_success
|
27
26
|
<% end -%>
|
28
27
|
|
29
28
|
:loop_success
|
30
|
-
echo Configuring net${idx} for static IP address
|
29
|
+
echo Configuring net${idx} for static IP address
|
31
30
|
ifopen net${idx}
|
32
31
|
set netX/ip <%= interface.ip %>
|
33
32
|
set netX/netmask <%= interface.subnet.mask %>
|
34
33
|
set netX/gateway <%= interface.subnet.gateway %>
|
35
|
-
ifstat net${idx}
|
36
34
|
route
|
37
35
|
|
38
36
|
# Note, iPXE can only use one DNS server
|
39
|
-
echo Using DNS <%= interface.subnet.dns_primary %>
|
40
37
|
set dns <%= interface.subnet.dns_primary %>
|
41
38
|
set domain <%= interface.domain.to_s %>
|
42
39
|
|
@@ -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.12'
|
52
52
|
|
53
53
|
security_block :bootdisk do |map|
|
54
54
|
permission :download_bootdisk, {:'foreman_bootdisk/disks' => [:generic, :host, :full_host, :subnet, :help],
|
@@ -75,7 +75,7 @@ module ForemanBootdisk
|
|
75
75
|
Host::Managed.send(:include, ForemanBootdisk::Orchestration::Compute) if SETTINGS[:unattended]
|
76
76
|
HostsHelper.send(:include, ForemanBootdisk::HostsHelperExt)
|
77
77
|
UnattendedController.send(:include, ForemanBootdisk::UnattendedControllerExt)
|
78
|
-
Foreman::Model::Vmware.send(:include, ForemanBootdisk::ComputeResources::Vmware) if
|
78
|
+
Foreman::Model::Vmware.send(:include, ForemanBootdisk::ComputeResources::Vmware) if Foreman::Model::Vmware.available?
|
79
79
|
rescue => e
|
80
80
|
puts "#{ForemanBootdisk::ENGINE_NAME}: skipping engine hook (#{e.to_s})"
|
81
81
|
end
|
data/lib/tasks/bootdisk.rake
CHANGED
@@ -71,9 +71,13 @@ namespace :test do
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
-
Rake::Task[:test].enhance
|
74
|
+
Rake::Task[:test].enhance do
|
75
|
+
Rake::Task['test:foreman_bootdisk'].invoke
|
76
|
+
end
|
75
77
|
|
76
78
|
load 'tasks/jenkins.rake'
|
77
79
|
if Rake::Task.task_defined?(:'jenkins:unit')
|
78
|
-
Rake::Task["jenkins:unit"].enhance
|
80
|
+
Rake::Task["jenkins:unit"].enhance do
|
81
|
+
Rake::Task['test:foreman_bootdisk'].invoke
|
82
|
+
end
|
79
83
|
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: 8.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: 2016-
|
11
|
+
date: 2016-04-12 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.
|