Class: Y2Network::ConnectionConfig::Qeth

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

Overview

Configuration for qeth 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

#initializeQeth

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

#attributesString

Returns configuration extra attributes.

Returns:

  • (String)

    configuration extra attributes



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

def attributes
  @attributes
end

#data_channelString

Returns data bus id.

Returns:

  • (String)

    data bus id



47
48
49
# File 'src/lib/y2network/connection_config/qeth.rb', line 47

def data_channel
  @data_channel
end

#ipa_takeoverBoolean

Returns whether ipa takeover is enabled or not.

Returns:

  • (Boolean)

    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

#layer2Boolean

Returns whether layer2 is enabled or not.

Returns:

  • (Boolean)

    whether layer2 is enabled or not



49
50
51
# File 'src/lib/y2network/connection_config/qeth.rb', line 49

def layer2
  @layer2
end

#port_numberInteger

Returns port number (0 or 1).

Returns:

  • (Integer)

    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_channelString

For CCW devices and CCW group devices, this device ID is the device bus-ID.

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

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.

Examples:

enable a qeth interface (persistently)

chzdev --enable qeth 0.0.a000:0.0.a001:0.0.a002

Returns:

  • (String)

    read bus id

See Also:



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

def read_channel
  @read_channel
end

#write_channelString

Returns write bus id.

Returns:

  • (String)

    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_idString?

Returns the complete device id which contains the read, write and data channels joined by ':'

Returns:

  • (String, nil)


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

Parameters:

  • id (String)

    s390 group 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