Class: Y2Network::Widgets::IPoIBMode

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

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ IPoIBMode


26
27
28
29
30
# File 'src/lib/y2network/widgets/ipoib_mode.rb', line 26

def initialize(config)
  textdomain "network"

  @config = config
end

Instance Method Details

#initObject


51
52
53
# File 'src/lib/y2network/widgets/ipoib_mode.rb', line 51

def init
  self.value = @config.ipoib_mode
end

#itemsObject


32
33
34
35
36
37
38
39
40
41
# File 'src/lib/y2network/widgets/ipoib_mode.rb', line 32

def items
  # ipoib_modes contains known IPoIB modes, "default" is place holder for
  # "do not set anything explicitly -> driver will choose"
  # translators: a possible value for: IPoIB device mode
  [
    ["default", _("default")],
    ["connected", _("connected")],
    ["datagram", _("datagram")]
  ]
end

#labelObject


43
44
45
# File 'src/lib/y2network/widgets/ipoib_mode.rb', line 43

def label
  _("IPoIB Device Mode")
end

#optObject


47
48
49
# File 'src/lib/y2network/widgets/ipoib_mode.rb', line 47

def opt
  [:hstretch]
end

#storeObject


55
56
57
# File 'src/lib/y2network/widgets/ipoib_mode.rb', line 55

def store
  @config.ipoib_mode = value
end