Class: Y2Network::ConnectionConfig::Qeth
- Defined in:
- src/lib/y2network/connection_config/qeth.rb
Overview
Configuration for qeth connections
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#attributes ⇒ String
Configuration extra attributes.
-
#data_channel ⇒ String
Data bus id.
-
#ipa_takeover ⇒ Boolean
Whether ipa takeover is enabled or not.
-
#layer2 ⇒ Boolean
Whether layer2 is enabled or not.
-
#port_number ⇒ Integer
Port number (0 or 1).
-
#read_channel ⇒ String
For CCW devices and CCW group devices, this device ID is the device bus-ID.
-
#write_channel ⇒ String
Write bus id.
Attributes inherited from Base
#bootproto, #description, #dhclient_set_hostname, #ethtool_options, #firewall_zone, #hostnames, #id, #interface, #ip, #ip_aliases, #lladdress, #mtu, #name, #startmode
Instance Method Summary collapse
-
#device_id ⇒ String?
Returns the complete device id which contains the read, write and data channels joined by ':'.
-
#device_id=(id) ⇒ Object
Sets the read, write and data channel from the device id.
-
#initialize ⇒ Qeth
constructor
Constructor.
Methods inherited from Base
#all_ips, #dhcp?, #find_parent, #hostname, #hostname=, #propose, #propose_startmode, #static?, #type, #virtual?
Constructor Details
#initialize ⇒ Qeth
Constructor
61 62 63 64 65 66 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 61 def initialize super() @layer2 = false @port_number = 0 @ipa_takeover = false end |
Instance Attribute Details
#attributes ⇒ String
Returns configuration extra attributes.
55 56 57 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 55 def attributes @attributes end |
#data_channel ⇒ String
Returns data bus id.
47 48 49 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 47 def data_channel @data_channel end |
#ipa_takeover ⇒ Boolean
Returns whether ipa takeover is enabled or not.
51 52 53 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 51 def ipa_takeover @ipa_takeover end |
#layer2 ⇒ Boolean
Returns whether layer2 is enabled or not.
49 50 51 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 49 def layer2 @layer2 end |
#port_number ⇒ Integer
Returns port number (0 or 1).
53 54 55 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 53 def port_number @port_number end |
#read_channel ⇒ String
For CCW devices and CCW group devices, this device ID is the device bus-ID.
The device bus-ID is of the format 0.
The qeth device driver requires three I/O subchannels for each HiperSockets CHPID or OSA-ExpressCHPID in QDIO mode.
One subchannel is for control reads, one for control writes, and the third is for data.
43 44 45 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 43 def read_channel @read_channel end |
#write_channel ⇒ String
Returns write bus id.
45 46 47 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 45 def write_channel @write_channel end |
Instance Method Details
#device_id ⇒ String?
Returns the complete device id which contains the read, write and data channels joined by ':'
72 73 74 75 76 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 72 def device_id return if read_channel.to_s.empty? [read_channel, write_channel, data_channel].join(":") end |
#device_id=(id) ⇒ Object
Sets the read, write and data channel from the device id
81 82 83 |
# File 'src/lib/y2network/connection_config/qeth.rb', line 81 def device_id=(id) @read_channel, @write_channel, @data_channel = id.split(":") end |