Class: Y2Network::AutoinstProfile::S390DeviceSection
- Inherits:
-
SectionWithAttributes
- Object
- SectionWithAttributes
- Y2Network::AutoinstProfile::S390DeviceSection
- Defined in:
- src/lib/y2network/autoinst_profile/s390_device_section.rb
Overview
This class represents an AutoYaST <device> section under <s390-devices>
<device>
<chanids>0.0.0700 0.0.0701 0.0.0702</chanids>
<layer2 config:type="boolean>true</layer2>
<type>qeth</type>
</device>
Instance Attribute Summary collapse
-
#chanids ⇒ String
Channel device id separated by spaces.
-
#layer2 ⇒ Boolean
Whether layer2 is enabler or not.
-
#portname ⇒ String
QETH portname (deprecated).
- #protocol ⇒ String
-
#router ⇒ String
IUCV router/user.
-
#type ⇒ String
S390 device type (qeth, ctc, iucv).
Attributes inherited from SectionWithAttributes
Class Method Summary collapse
- .attributes ⇒ Object
-
.new_from_network(connection_config) ⇒ S390DeviceSection
Clones a network s390 connection config into an AutoYaST s390 device section.
Instance Method Summary collapse
-
#init_from_config(config) ⇒ Boolean
Method used by S390DeviceSection.new_from_network to populate the attributes when cloning a network s390 device.
Methods inherited from SectionWithAttributes
#init_from_hashes, #initialize, new_from_hashes, #section_name, #to_hashes
Constructor Details
This class inherits a constructor from Y2Network::AutoinstProfile::SectionWithAttributes
Instance Attribute Details
#chanids ⇒ String
Returns channel device id separated by spaces.
|
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 46
|
#layer2 ⇒ Boolean
Returns Whether layer2 is enabler or not.
|
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 49
|
#portname ⇒ String
Returns QETH portname (deprecated).
|
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 55
|
#protocol ⇒ String
|
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 58
|
#router ⇒ String
Returns IUCV router/user.
|
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 61
|
#type ⇒ String
Returns S390 device type (qeth, ctc, iucv).
|
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 52
|
Class Method Details
.attributes ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 33 def self.attributes [ { name: :chanids }, { name: :layer2 }, { name: :type }, { name: :portname }, # deprecated { name: :protocol }, { name: :router } ] end |
.new_from_network(connection_config) ⇒ S390DeviceSection
Clones a network s390 connection config into an AutoYaST s390 device section
68 69 70 71 72 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 68 def self.new_from_network(connection_config) result = new result.init_from_config(connection_config) result end |
Instance Method Details
#init_from_config(config) ⇒ Boolean
Method used by new_from_network to populate the attributes when cloning a network s390 device
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 79 def init_from_config(config) @type = config.type.short_name case config when ConnectionConfig::Qeth @chanids = config.device_id @layer2 = config.layer2 when ConnectionConfig::Ctc @chanids = config.device_id @protocol = config.protocol when ConnectionConfig::Lcs @chanids = config.device_id end true end |