Class: Archlinux

Inherits:
Operatingsystem show all
Defined in:
app/models/archlinux.rb

Constant Summary collapse

PXEFILES =
{:kernel => "linux", :initrd => "initrd"}

Constants inherited from Operatingsystem

Operatingsystem::FAMILIES

Instance Method Summary collapse

Methods inherited from Operatingsystem

#as_json, #boot_filename, #bootfile, families, families_as_collection, #family, #family=, #fullname, #image_extension, #initrd, #interpolate_medium_vars, #kernel, #medium_uri, #medium_vars_to_uri, #pxe_files, #pxe_prefix, #pxe_variant, #release, #repos, #require_nfs_access_to_medium, #supports_image, #template_kind, #to_label, #to_s, #use_release_name?

Methods included from Authorization

#enforce_create_permissions, #enforce_destroy_permissions, #enforce_edit_permissions, #enforce_permissions, included, #permission_failed?

Instance Method Details

#classObject

Override the class representation, as this breaks many rails helpers


11
12
13
# File 'app/models/archlinux.rb', line 11

def class
  Operatingsystem
end

#mediumpath(host) ⇒ Object

Simple output of the media url


6
7
8
# File 'app/models/archlinux.rb', line 6

def mediumpath host
  medium_uri(host).to_s
end

#pxe_typeObject


15
16
17
# File 'app/models/archlinux.rb', line 15

def pxe_type
  "aif"
end

#pxedirObject


19
20
21
# File 'app/models/archlinux.rb', line 19

def pxedir
  "boot/$arch/loader"
end

#url_for_boot(file) ⇒ Object


23
24
25
# File 'app/models/archlinux.rb', line 23

def url_for_boot(file)
  pxedir + "/" + PXEFILES[file]
end