Sha256: ca3c9be82016dcdc77a92c7764efc13f6a14bde322ac921cf35c50adc3d93d96

Contents?: true

Size: 690 Bytes

Versions: 3

Compression:

Stored size: 690 Bytes

Contents

module Bootdisk
  class Renderer
    include ::Foreman::Renderer
    include Rails.application.routes.url_helpers

    def generic_template_render
      # Waiting on additional whitelisted items, #2948
      Setting[:safemode_render] && raise(::Foreman::Exception.new(N_('Bootdisk is not supported with safemode rendering, please disable safemode_render under Adminster>Settings')))

      tmpl = ConfigTemplate.find_by_name(Setting[:bootdisk_generic_host_template]) || raise(::Foreman::Exception.new(N_('Unable to find template specified by %s setting'), 'bootdisk_generic_host_template'))
      @host = Struct.new(:token).new(nil)
      unattended_render(tmpl.template)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_bootdisk-2.0.4 app/services/bootdisk/renderer.rb
foreman_bootdisk-2.0.3 app/services/bootdisk/renderer.rb
foreman_bootdisk-2.0.2 app/services/bootdisk/renderer.rb