module Construqt::Flavour::Ciscian
Public Class Methods
add_dialect(dialect)
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 17 def self.add_dialect(dialect) @dialects[dialect.name] = dialect end
clazz(name)
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 697 def self.clazz(name) ret = self.clazzes[name] throw "class not found #{name}" unless ret ret end
clazzes()
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 682 def self.clazzes { "opvn" => NotImplemented, "bond" => Bond, "bridge" => NotImplemented, "gre" => NotImplemented, "vrrp" => NotImplemented, "template" => NotImplemented, "vlan" => Vlan, "host" => Host, "device"=> Device, "result" => Result } end
create_host(name, cfg)
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 703 def self.create_host(name, cfg) cfg['name'] = name cfg['result'] = nil host = Host.new(cfg) host.result = Result.new(host) host end
create_interface(name, cfg)
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 711 def self.create_interface(name, cfg) cfg['name'] = name clazz(cfg['clazz']).new(cfg) #cfg['name'] = name #Interface.new(cfg) end
dialects()
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 13 def self.dialects @dialects end
name()
click to toggle source
# File lib/construqt/flavour/ciscian/ciscian.rb, line 6 def self.name 'ciscian' end