Class: ForemanBootdisk::Scope::Bootdisk

Inherits:
Foreman::Renderer::Scope::Provisioning
  • Object
show all
Extended by:
ApipieDSL::Class
Defined in:
app/lib/foreman_bootdisk/scope/bootdisk.rb

Direct Known Subclasses

FullHostBootdisk, FullHostBootdiskEfi

Instance Method Summary collapse

Instance Method Details

#bootdisk_chain_url(mac = host.try(:mac), action = 'iPXE') ⇒ Object



20
21
22
23
24
25
26
27
28
29
# File 'app/lib/foreman_bootdisk/scope/bootdisk.rb', line 20

def bootdisk_chain_url(mac = host.try(:mac), action = 'iPXE')
  url = foreman_url(action)
  u = URI.parse(url)
  new_query_data = URI.decode_www_form(u.query || '') << ['mac', mac || '']
  new_querystring = URI.encode_www_form(new_query_data)
  u.query = nil
  u.query = new_querystring if new_querystring.present?
  u.fragment = nil
  u.to_s
end

#bootdisk_raise(*args) ⇒ Object

Raises:

  • (::Foreman::Exception)


41
42
43
# File 'app/lib/foreman_bootdisk/scope/bootdisk.rb', line 41

def bootdisk_raise(*args)
  raise ::Foreman::Exception.new(*args)
end

#template_nameObject



45
46
47
# File 'app/lib/foreman_bootdisk/scope/bootdisk.rb', line 45

def template_name
  "Foreman Bootdisk"
end