class Construqt::Flavour::Ubuntu::Vlan
Public Class Methods
new(cfg)
click to toggle source
Calls superclass method
# File lib/construqt/flavour/ubuntu/flavour_ubuntu.rb, line 123 def initialize(cfg) super(cfg) end
Public Instance Methods
build_config(host, iface)
click to toggle source
# File lib/construqt/flavour/ubuntu/flavour_ubuntu.rb, line 127 def build_config(host, iface) vlan = iface.name.split('.') throw "vlan name not valid if.# => #{iface.name}" if vlan.length != 2 || !vlan.first.match(/^[0-9a-zA-Z]+$/) || !vlan.last.match(/^[0-9]+/) || !(1 <= vlan.last.to_i && vlan.last.to_i < 4096) Device.build_config(host, iface) end