Sha256: 22b92716a671b25f2234cda0f000abb987690abee50844efa370895981ba1ff4

Contents?: true

Size: 561 Bytes

Versions: 3

Compression:

Stored size: 561 Bytes

Contents

module ForemanBootdisk
  module RendererMethods
    extend ActiveSupport::Concern

    class_methods do
      def format_bootdisk_chain_url(url, mac)
        u = URI.parse(url)
        ForemanBootdisk.logger.warn("Foreman or proxy is configured with HTTPS, probably not supported by iPXE: #{u}") if u.scheme == 'https'
        u.query = "#{u.query}&mac=#{mac}"
        u.fragment = nil
        u.to_s
      end
    end

    def bootdisk_chain_url(mac = '', action = 'iPXE')
      self.class.format_bootdisk_chain_url(foreman_url(action), mac)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_bootdisk-10.0.1 app/services/foreman_bootdisk/renderer_methods.rb
foreman_bootdisk-10.0.0 app/services/foreman_bootdisk/renderer_methods.rb
foreman_bootdisk-9.0.0 app/services/foreman_bootdisk/renderer_methods.rb