Class: Y2Network::AutoinstProfile::S390DevicesSection
- Inherits:
-
SectionWithAttributes
- Object
- SectionWithAttributes
- Y2Network::AutoinstProfile::S390DevicesSection
- Includes:
- Yast::Logger
- Defined in:
- src/lib/y2network/autoinst_profile/s390_devices_section.rb
Overview
This class represents an AutoYaST <s390-devices> section under <networking>
<s390-devices config:type="list">
<device>
<chanids>0.0.0700 0.0.0701 0.0.0702</chanids>
<type>qeth</type>
</device>
</s390-devices>
Constant Summary collapse
- SUPPORTED_TYPES =
["qeth", "ctc", "lcs"].freeze
Instance Attribute Summary collapse
Attributes inherited from SectionWithAttributes
Class Method Summary collapse
- .attributes ⇒ Object
-
.new_from_network(config) ⇒ S390DevicesSection
Clones network s390 devices settings into an AutoYaST s390-devices section.
Instance Method Summary collapse
-
#init_from_hashes(hash) ⇒ Object
Method used by Y2Network::AutoinstProfile::SectionWithAttributes.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.
Methods inherited from SectionWithAttributes
new_from_hashes, #section_name, #to_hashes
Constructor Details
#initialize(*_args) ⇒ S390DevicesSection
Constructor
63 64 65 66 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 63 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) ⇒ S390DevicesSection
Clones network s390 devices settings into an AutoYaST s390-devices section
56 57 58 59 60 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 56 def self.new_from_network(config) result = new initialized = result.init_from_network(config) initialized ? result : nil end |
Instance Method Details
#init_from_hashes(hash) ⇒ Object
Method used by Y2Network::AutoinstProfile::SectionWithAttributes.new_from_hashes to populate the attributes when importing a profile
71 72 73 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 71 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
79 80 81 82 |
# File 'src/lib/y2network/autoinst_profile/s390_devices_section.rb', line 79 def init_from_network(connection_configs) @devices = s390_devices_section(connection_configs) true end |