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

Constructor

Parameters:



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

def initialize(config)
  super()
  textdomain "network"

  @config = config
end

Instance Method Details

#helpObject



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

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

#initObject



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

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

#itemsObject



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

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

#labelObject



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

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

#storeObject



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

def store
  @config.etherdevice = value
end