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, #ethtool_options, #firewall_zone, #hostname, #id, #interface, #ip, #ip_aliases, #lladdress, #mtu, #name, #startmode

Instance Method Summary collapse

Methods inherited from Base

#all_ips, #find_master, #propose, #propose_startmode, #type, #virtual?

Constructor Details

#initializeQeth

Constructor


58
59
60
61
62
63
# File 'src/lib/y2network/connection_config/qeth.rb', line 58

def initialize
  super()
  @layer2 = false
  @port_number = 0
  @ipa_takeover = false
end

Instance Attribute Details

#attributesString


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

def attributes
  @attributes
end

#data_channelString


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

def data_channel
  @data_channel
end

#ipa_takeoverBoolean


51
52
53
# File 'src/lib/y2network/connection_config/qeth.rb', line 51

def ipa_takeover
  @ipa_takeover
end

#layer2Boolean


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

def layer2
  @layer2
end

#port_numberInteger


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

See Also:


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

def read_channel
  @read_channel
end

#write_channelString


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

def write_channel
  @write_channel
end

Instance Method Details

#==(other) ⇒ Object


65
66
67
68
69
70
71
72
# File 'src/lib/y2network/connection_config/qeth.rb', line 65

def ==(other)
  return false unless super

  [:read_channel, :write_channel, :data_channel, :layer2,
   :port_number, :ipa_takeover, :attributes].all? do |method|
    public_send(method) == other.public_send(method)
  end
end

#device_idString?

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


78
79
80
81
82
# File 'src/lib/y2network/connection_config/qeth.rb', line 78

def device_id
  return if read_channel.to_s.empty?

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