Class: Y2Network::ConnectionConfig::Lcs

Inherits:
Base
  • Object
show all
Defined in:
src/lib/y2network/connection_config/lcs.rb

Overview

Configuration for lcs connections

Constant Summary

Constants inherited from Base

Base::PROPOSED_PPPOE_MTU

Instance Attribute Summary collapse

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

Methods inherited from Base

#all_ips, #dhcp?, #find_parent, #hostname, #hostname=, #propose, #propose_startmode, #static?, #type, #virtual?

Constructor Details

#initializeLcs

Constructor



55
56
57
58
# File 'src/lib/y2network/connection_config/lcs.rb', line 55

def initialize
  super()
  @timeout = 5
end

Instance Attribute Details

#read_channelString

Most I/O devices on a s390 system are typically driven through the channel I/O mechanism.

The s390-tools provides a set of commands for working with CCW devices and CCW group devices, these commands use a device ID which is the device bus-ID

The device bus-ID is of the format 0.., for example, 0.0.8000.

The LCS devices drivers requires two I/O subchannels for each interface, a read subchannel and a write subchannel and is very similar to the S390 CTC interface.

Returns:

  • (String)

    read device bus id

See Also:



43
44
45
# File 'src/lib/y2network/connection_config/lcs.rb', line 43

def read_channel
  @read_channel
end

#timeoutInteger

The time the driver wait for a reply issuing a LAN command.



50
51
52
# File 'src/lib/y2network/connection_config/lcs.rb', line 50

def timeout
  @timeout
end

#write_channelString

Returns write device bus id.

Returns:

  • (String)

    write device bus id



45
46
47
# File 'src/lib/y2network/connection_config/lcs.rb', line 45

def write_channel
  @write_channel
end

Instance Method Details

#device_idString?

Returns the complete device id which contains the read ad write channels joined by ':'

Returns:

  • (String, nil)


64
65
66
67
68
# File 'src/lib/y2network/connection_config/lcs.rb', line 64

def device_id
  return if read_channel.to_s.empty?

  [read_channel, write_channel].join(":")
end

#device_id=(id) ⇒ Object

Sets the read and write channel from the s390 group device id

Parameters:

  • id (String)

    s390 group device id



73
74
75
# File 'src/lib/y2network/connection_config/lcs.rb', line 73

def device_id=(id)
  @read_channel, @write_channel = id.to_s.split(":")
end