class Construqt::Templates::Template

Public Class Methods

new(cfg) click to toggle source
Calls superclass method
# File lib/construqt/templates.rb, line 10
def initialize(cfg)
  super(cfg)
end

Public Instance Methods

is_nountagged?(vlan_id) click to toggle source
# File lib/construqt/templates.rb, line 30
def is_nountagged?(vlan_id)
  self.vlans.each do |vlan|
    return vlan.nountagged? if vlan.vlan_id == vlan_id
  end

  throw "vlan with id #{vlan_id} not found in template #{self}"
end
is_tagged?(vlan_id) click to toggle source
# File lib/construqt/templates.rb, line 14
def is_tagged?(vlan_id)
  self.vlans.each do |vlan|
    return vlan.tagged? if vlan.vlan_id == vlan_id
  end

  throw "vlan with id #{vlan_id} not found in template #{self}"
end
is_untagged?(vlan_id) click to toggle source
# File lib/construqt/templates.rb, line 22
def is_untagged?(vlan_id)
  self.vlans.each do |vlan|
    return vlan.untagged? if vlan.vlan_id == vlan_id
  end

  throw "vlan with id #{vlan_id} not found in template #{self}"
end