Class: Y2Network::ConnectionConfig::Ctc

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

Overview

Note:

The use of this connection is deprecated or not recommended as it will not be officially supported in future SLE versions.

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

#initializeCtc

Returns a new instance of Ctc.



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

def initialize
  super()
  @protocol = 0
end

Instance Attribute Details

#protocolInteger

Returns connection protocol (0, 1, 3, or 4) 0 Compatibility with peers other than OS/390®. (default) 1 Enhanced package checking for Linux peers. 3 For compatibility with OS/390 or z/OS peers. 4 For MPC connections to VTAM on traditional mainframe operating systems.

Returns:

  • (Integer)

    connection protocol (0, 1, 3, or 4) 0 Compatibility with peers other than OS/390®. (default) 1 Enhanced package checking for Linux peers. 3 For compatibility with OS/390 or z/OS peers. 4 For MPC connections to VTAM on traditional mainframe operating systems.

See Also:



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

def protocol
  @protocol
end

#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 CTCM device driver requires two I/O subchannels for each interface, a read subchannel and a write subchannel

Returns:

  • (String)

    read device bus id

See Also:



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

def read_channel
  @read_channel
end

#write_channelString

Returns write device bus id.

Returns:

  • (String)

    write device bus id



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

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)


68
69
70
71
72
# File 'src/lib/y2network/connection_config/ctc.rb', line 68

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



77
78
79
# File 'src/lib/y2network/connection_config/ctc.rb', line 77

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