Class: Y2Network::Widgets::VlanInterface

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

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ VlanInterface


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

def initialize(config)
  textdomain "network"

  @config = config
end

Instance Method Details

#helpObject


35
36
37
38
# File 'src/lib/y2network/widgets/vlan_interface.rb', line 35

def help
  # TODO: previously not exist, so write it
  ""
end

#initObject


46
47
48
# File 'src/lib/y2network/widgets/vlan_interface.rb', line 46

def init
  self.value = @config.etherdevice if @config.etherdevice
end

#itemsObject


40
41
42
43
44
# File 'src/lib/y2network/widgets/vlan_interface.rb', line 40

def items
  @config.possible_vlans.map do |key, value|
    [key, value]
  end
end

#labelObject


31
32
33
# File 'src/lib/y2network/widgets/vlan_interface.rb', line 31

def label
  _("Real Interface for &VLAN")
end

#storeObject


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

def store
  @config.etherdevice = value
end