Class: Y2Network::Widgets::BondOptions

Inherits:
CWM::ComboBox
  • Object
show all
Defined in:
src/lib/y2network/widgets/bond_options.rb

Constant Summary collapse

PRESET_ITEMS =
[
  ["mode=balance-rr miimon=100", "mode=balance-rr miimon=100"],
  ["mode=active-backup miimon=100", "mode=active-backup miimon=100"],
  ["mode=balance-xor miimon=100", "mode=balance-xor miimon=100"],
  ["mode=broadcast miimon=100", "mode=broadcast miimon=100"],
  ["mode=802.3ad miimon=100", "mode=802.3ad miimon=100"],
  ["mode=balance-tlb miimon=100", "mode=balance-tlb miimon=100"],
  ["mode=balance-alb miimon=100", "mode=balance-alb miimon=100"]
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ BondOptions


25
26
27
28
# File 'src/lib/y2network/widgets/bond_options.rb', line 25

def initialize(settings)
  textdomain "network"
  @settings = settings
end

Instance Method Details

#helpObject


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

def help
  _(
    "<p>Select the bond driver options and edit them if necessary. </p>"
  )
end

#initObject


58
59
60
# File 'src/lib/y2network/widgets/bond_options.rb', line 58

def init
  self.value = @settings.bond_options
end

#itemsObject


40
41
42
# File 'src/lib/y2network/widgets/bond_options.rb', line 40

def items
  PRESET_ITEMS
end

#labelObject


50
51
52
# File 'src/lib/y2network/widgets/bond_options.rb', line 50

def label
  _("&Bond Driver Options")
end

#optObject


54
55
56
# File 'src/lib/y2network/widgets/bond_options.rb', line 54

def opt
  [:hstretch, :editable]
end

#storeObject


62
63
64
# File 'src/lib/y2network/widgets/bond_options.rb', line 62

def store
  @settings.bond_options = value
end