Module: Construqt::Flavour::Ciscian

Defined in:
lib/construqt/flavour/ciscian/ciscian.rb,
lib/construqt/flavour/ciscian/deploy_template.rb,
lib/construqt/flavour/ciscian/dialect_hp-2510g.rb,
lib/construqt/flavour/ciscian/dialect_dlink-dgs15xx.rb

Defined Under Namespace

Modules: DlinkDgs15xx Classes: Bond, DeployTemplate, Device, Host, Hp2510g, NestedSection, NotImplemented, PatternBasedVerb, RangeVerb, Result, SingleValueVerb, Vlan

Class Method Summary collapse

Class Method Details

.add_dialect(dialect) ⇒ Object



17
18
19
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 17

def self.add_dialect(dialect)
  @dialects[dialect.name] = dialect
end

.clazz(name) ⇒ Object



697
698
699
700
701
# 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

.clazzesObject



682
683
684
685
686
687
688
689
690
691
692
693
694
695
# 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) ⇒ Object



703
704
705
706
707
708
709
# 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) ⇒ Object



711
712
713
714
715
716
# 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

.dialectsObject



13
14
15
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 13

def self.dialects
  @dialects
end

.nameObject



6
7
8
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 6

def self.name
  'ciscian'
end