Class: Y2Network::AutoinstProfile::S390DeviceSection
- Inherits:
-
Installation::AutoinstProfile::SectionWithAttributes
- Object
- Installation::AutoinstProfile::SectionWithAttributes
- Y2Network::AutoinstProfile::S390DeviceSection
- Defined in:
- src/lib/y2network/autoinst_profile/s390_device_section.rb
Overview
This class represents an AutoYaST
See Also:
Instance Attribute Summary collapse
-
#chanids ⇒ String
Channel device id separated by spaces or colons.
-
#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).
Class Method Summary collapse
- .attributes ⇒ Object
-
.new_from_network(connection_config, parent = nil) ⇒ S390DeviceSection
Clones a network s390 connection config into an AutoYaST s390 device section.
Instance Method Summary collapse
-
#collection_name ⇒ String
Returns the collection name.
-
#init_from_config(config) ⇒ Boolean
Method used by S390DeviceSection.new_from_network to populate the attributes when cloning a network s390 device.
-
#init_from_hashes(hash) ⇒ Object
Method used by new_from_hashes to populate the attributes when importing a profile.
-
#section_path ⇒ Installation::AutoinstProfile::ElementPath?
Returns the section path.
Instance Attribute Details
#chanids ⇒ String
Returns channel device id separated by spaces or colons.
|
# 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, parent = nil) ⇒ S390DeviceSection
Clones a network s390 connection config into an AutoYaST s390 device section
69 70 71 72 73 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 69 def self.new_from_network(connection_config, parent = nil) result = new(parent) result.init_from_config(connection_config) result end |
Instance Method Details
#collection_name ⇒ String
Returns the collection name
107 108 109 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 107 def collection_name "devices" end |
#init_from_config(config) ⇒ Boolean
Method used by new_from_network to populate the attributes when cloning a network s390 device
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 80 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 |
#init_from_hashes(hash) ⇒ Object
Method used by new_from_hashes to populate the attributes when importing a profile
99 100 101 102 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 99 def init_from_hashes(hash) super self.chanids = normalized_chanids(hash["chanids"]) if hash["chanids"] end |
#section_path ⇒ Installation::AutoinstProfile::ElementPath?
Returns the section path
115 116 117 118 119 |
# File 'src/lib/y2network/autoinst_profile/s390_device_section.rb', line 115 def section_path return nil unless parent parent.section_path.join(index) end |