Class: Y2Network::AutoinstProfile::S390DevicesSection
- Inherits:
-
Installation::AutoinstProfile::SectionWithAttributes
- Object
- Installation::AutoinstProfile::SectionWithAttributes
- Y2Network::AutoinstProfile::S390DevicesSection
- Includes:
- Yast::Logger
- Defined in:
- src/lib/y2network/autoinst_profile/s390_devices_section.rb
Overview
This class represents an AutoYaST
Constant Summary collapse
- SUPPORTED_TYPES =
["qeth", "ctc", "lcs"].freeze
Instance Attribute Summary collapse
Class Method Summary collapse
- .attributes ⇒ Object
-
.new_from_network(config, parent = nil) ⇒ S390DevicesSection
Clones network s390 devices settings into an AutoYaST s390-devices section.
Instance Method Summary collapse
-
#init_from_hashes(hash) ⇒ Object
Method used by new_from_hashes to populate the attributes when importing a profile.
-
#init_from_network(connection_configs) ⇒ Boolean
Method used by S390DevicesSection.new_from_network to populate the attributes when cloning routing settings.
-
#initialize(*_args) ⇒ S390DevicesSection
constructor
Constructor.
-
#section_name ⇒ String
Returns the collection name.
Constructor Details
#initialize(*_args) ⇒ S390DevicesSection
Constructor
64 65 66 67 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 64 def initialize(*_args) super @devices = [] end |
Instance Attribute Details
#devices ⇒ Array<S390DeviceSection>
|
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 48
|
Class Method Details
.attributes ⇒ Object
40 41 42 43 44 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 40 def self.attributes [ { name: :devices } ] end |
.new_from_network(config, parent = nil) ⇒ S390DevicesSection
Clones network s390 devices settings into an AutoYaST s390-devices section
57 58 59 60 61 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 57 def self.new_from_network(config, parent = nil) result = new(parent) initialized = result.init_from_network(config) initialized ? result : nil end |
Instance Method Details
#init_from_hashes(hash) ⇒ Object
Method used by new_from_hashes to populate the attributes when importing a profile
72 73 74 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 72 def init_from_hashes(hash) @devices = devices_from_hash(hash) end |
#init_from_network(connection_configs) ⇒ Boolean
Method used by new_from_network to populate the attributes when cloning routing settings
80 81 82 83 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 80 def init_from_network(connection_configs) @devices = s390_devices_section(connection_configs) true end |
#section_name ⇒ String
Returns the collection name
88 89 90 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 88 def section_name "s390-devices" end |