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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6fa4ade5bfd81ecd392c0d54a2e86e4e7940ea07
4
- data.tar.gz: a473a7b359b679b62fb24c7eb0e3664e349e15f5
3
+ metadata.gz: fc62297d4d1bc9080a8e9aebe25d02eb185ab357
4
+ data.tar.gz: f09c9610aae17af4185be4577f671ac4546ad669
5
5
  SHA512:
6
- metadata.gz: 7fe4aff48600235205c953564df151641e0582cb8fc7cac7c30e783f3691c6f7a630ad49daa9f740bb1550496119d3d04373dc0468008ab253fba3632a288efa
7
- data.tar.gz: 5ac55cb0066f4c5ecf475e6e838af5ec8a2eef04fed4cbcb3e8a6992675cd73515004ea7807279fdf800937d200abde5515a023a59b40c35c81408c3231c6927
6
+ metadata.gz: 61fa71708a3cdd5ee6152197c4cbd8a13011c4c733c821a453e6d9320677463820c624f57224c65d3ec43cd258167ac68cb8bda3829d0d0093fea3fc527bbbd0
7
+ data.tar.gz: a8415772ff0aa0ead2e4e5cb6baead0931c315ab131203cb7917df33e290c60fd0f9eaedfd4f93d9a3254ebe7007bf4a923e26fd150e2e5c539da855f15aac8a
data/CHANGES.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Changelog
2
2
 
3
- ## v7.0.1
4
- * added extra information during iPXE boot (#14794)
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
@@ -42,6 +42,7 @@ gPXE images are unsupported due to lack of initrd support.
42
42
  | >= 1.8 | ~> 5.0 |
43
43
  | >= 1.9 | ~> 6.0 |
44
44
  | >= 1.11 | >= 6.1, < 8.0 |
45
+ | >= 1.12 | ~> 8.0 |
45
46
 
46
47
  # Usage
47
48
 
@@ -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=>'btn'),
13
- display_bootdisk_link_if_authorized(_("Full host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'full_host', :id => @host}, :class=>'btn'),
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=>'btn'),
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=>'btn')
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=>'btn')
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
@@ -9,8 +9,6 @@
9
9
  #
10
10
  # Copy this template to customize it, the original is read-only.
11
11
 
12
- echo Foreman Bootdisk: Generic image
13
-
14
12
  # loop over net* until we can get a template
15
13
  <% url = bootdisk_chain_url %>
16
14
  <% (0..32).each do |i| -%>
@@ -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 <%= interface.ip %>
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.11'
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 SETTINGS[:vmware]
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
@@ -1,3 +1,3 @@
1
1
  module ForemanBootdisk
2
- VERSION = '7.0.1'
2
+ VERSION = '8.0.0'
3
3
  end
@@ -71,9 +71,13 @@ namespace :test do
71
71
  end
72
72
  end
73
73
 
74
- Rake::Task[:test].enhance ['test:foreman_bootdisk']
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 ['test:foreman_bootdisk']
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: 7.0.1
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-05-16 00:00:00.000000000 Z
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.