Class: Y2Network::ConnectionConfig::Bridge

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

Overview

Configuration for bridge connections

Constant Summary

Constants inherited from Base

Y2Network::ConnectionConfig::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

Constructor Details

#initializeBridge

Returns a new instance of Bridge.



37
38
39
40
41
42
# File 'src/lib/y2network/connection_config/bridge.rb', line 37

def initialize
  super()
  @ports = []
  @stp = false
  @forward_delay = 15
end

Instance Attribute Details

#forward_delayInteger

Returns:

  • (Integer)


33
34
35
# File 'src/lib/y2network/connection_config/bridge.rb', line 33

def forward_delay
  @forward_delay
end

#portsArray<String>

Returns:

  • (Array<String>)


29
30
31
# File 'src/lib/y2network/connection_config/bridge.rb', line 29

def ports
  @ports
end

#stpBoolean

Returns whether spanning tree protocol is enabled or not.

Returns:

  • (Boolean)

    whether spanning tree protocol is enabled or not



31
32
33
# File 'src/lib/y2network/connection_config/bridge.rb', line 31

def stp
  @stp
end

Instance Method Details

#eql_hashObject



44
45
46
47
48
# File 'src/lib/y2network/connection_config/bridge.rb', line 44

def eql_hash
  h = super
  h[:ports] = h[:ports].sort_by(&:hash) if h.keys.include?(:ports)
  h
end

#virtual?Boolean

Returns:

  • (Boolean)


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

def virtual?
  true
end