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
# File 'src/lib/y2network/widgets/vlan_interface.rb', line 28

def initialize(config)
  textdomain "network"

  @config = config
end

Instance Method Details

#helpObject


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

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

#initObject


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

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

#itemsObject


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

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

#labelObject


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

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

#storeObject


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

def store
  @config.etherdevice = value
end