Class: Y2Network::Autoinst::S390DevicesReader
- Inherits:
-
Object
- Object
- Y2Network::Autoinst::S390DevicesReader
- Defined in:
- src/lib/y2network/autoinst/s390_devices_reader.rb
Overview
This class is responsible of importing the AutoYast S390 devices section
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#config ⇒ ConnectionConfigsCollection
The imported connections configs.
-
#initialize(section) ⇒ S390DevicesReader
constructor
A new instance of S390DevicesReader.
Constructor Details
#initialize(section) ⇒ S390DevicesReader
Returns a new instance of S390DevicesReader.
33 34 35 |
# File 'src/lib/y2network/autoinst/s390_devices_reader.rb', line 33 def initialize(section) @section = section end |
Instance Attribute Details
#section ⇒ AutoinstProfile::S390DevicesSection (readonly)
30 31 32 |
# File 'src/lib/y2network/autoinst/s390_devices_reader.rb', line 30 def section @section end |
Instance Method Details
#config ⇒ ConnectionConfigsCollection
Returns the imported connections configs.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'src/lib/y2network/autoinst/s390_devices_reader.rb', line 38 def config connections = ConnectionConfigsCollection.new([]) @section.devices.each do |device_section| config = create_config(device_section) next unless config case config when ConnectionConfig::Qeth load_qeth(config, device_section) when ConnectionConfig::Lcs load_lcs(config, device_section) when ConnectionConfig::Ctc load_ctc(config, device_section) end connections << config end connections end |