Class: Bootloader::AutoinstProfile::BootloaderSection
- Inherits:
-
Installation::AutoinstProfile::SectionWithAttributes
- Object
- Installation::AutoinstProfile::SectionWithAttributes
- Bootloader::AutoinstProfile::BootloaderSection
- Defined in:
- src/lib/bootloader/autoinst_profile/bootloader_section.rb
Overview
This class represents an AutoYaST <bootloader>
section
Instance Attribute Summary collapse
- #activate ⇒ Object deprecated Deprecated.
-
#device_map ⇒ Array<DeviceMapEntrySection>
'device_map' list.
-
#global ⇒ GlobalSection
'global' section.
-
#loader_device ⇒ Object
deprecated
Deprecated.
Replaced by
<boot_*>
elements in the<global>
section. -
#loader_type ⇒ String
Which boot loader to use (default, grub2, grub2-efi and none).
-
#sections ⇒ Object
deprecated
Deprecated.
It still exists just to log a warning in AutoyastConverter.
Class Method Summary collapse
- .attributes ⇒ Object
-
.new_from_hashes(hash) ⇒ Bootloader
Creates an instance based on the profile representation used by the AutoYaST modules (hash with nested hashes and arrays).
Instance Method Summary collapse
-
#init_from_hashes(hash) ⇒ Object
Method used by BootloaderSection.new_from_hashes to populate the attributes.
-
#initialize ⇒ BootloaderSection
constructor
Constructor.
Constructor Details
#initialize ⇒ BootloaderSection
Constructor
73 74 75 76 77 |
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 73 def initialize super @device_map = [] end |
Instance Attribute Details
#activate ⇒ Object
|
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 49
|
#device_map ⇒ Array<DeviceMapEntrySection>
Returns 'device_map' list.
59 60 61 |
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 59 def device_map @device_map end |
#global ⇒ GlobalSection
Returns 'global' section.
57 58 59 |
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 57 def global @global end |
#loader_device ⇒ Object
Replaced by <boot_*>
elements in the <global>
section.
|
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 46
|
#loader_type ⇒ String
Returns which boot loader to use (default, grub2, grub2-efi and none).
|
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 42
|
#sections ⇒ Object
It still exists just to log a warning in AutoyastConverter.
|
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 53
|
Class Method Details
.attributes ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 31 def self.attributes [ { name: :loader_type }, { name: :loader_device }, # deprecated { name: :activate }, # deprecated { name: :sections } # deprecated ] end |
.new_from_hashes(hash) ⇒ Bootloader
Creates an instance based on the profile representation used by the AutoYaST modules (hash with nested hashes and arrays).
66 67 68 69 70 |
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 66 def self.new_from_hashes(hash) result = new result.init_from_hashes(hash) result end |
Instance Method Details
#init_from_hashes(hash) ⇒ Object
Method used by new_from_hashes to populate the attributes.
82 83 84 85 86 87 88 |
# File 'src/lib/bootloader/autoinst_profile/bootloader_section.rb', line 82 def init_from_hashes(hash) super @device_map = hash.fetch("device_map", []).map do |entry| DeviceMapEntrySection.new_from_hashes(entry, self) end @global = GlobalSection.new_from_hashes(hash["global"] || {}, self) end |