Skip to content

Commit

Permalink
refs #37792 - :template_name in correct scope
Browse files Browse the repository at this point in the history
The template_name method must be under the Bootdisk
scope, otherwise it overrides the method from Foreman
and all templates (like Grub2 or Kickstart PXE)
have name ForemanBootdisk.
  • Loading branch information
stejskalleos authored and nofaralfasi committed Oct 9, 2024
1 parent 8bbba4b commit 2fc50d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions app/lib/foreman_bootdisk/scope/bootdisk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
module ForemanBootdisk
module Scope
class Bootdisk < ::Foreman::Renderer::Scope::Provisioning
def template_name
"Foreman Bootdisk"
end
end
end
end
4 changes: 0 additions & 4 deletions app/lib/foreman_bootdisk/template_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,5 @@ def bootdisk_chain_url(mac = host.try(:mac), action = 'iPXE')
def bootdisk_raise(*args)
raise ::Foreman::Exception.new(*args)
end

def template_name
"Foreman Bootdisk"
end
end
end

0 comments on commit 2fc50d4

Please sign in to comment.