Module: Construqt::Flavour::Ubuntu

Defined in:
lib/construqt/flavour/ubuntu/flavour_ubuntu.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_bgp.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_dns.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_opvn.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_vrrp.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_ipsec.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_result.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_firewall.rb,
lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb

Defined Under Namespace

Modules: Dns, Firewall, Services Classes: Bgp, Bond, Bridge, Device, EtcConntrackdConntrackd, EtcNetworkInterfaces, EtcNetworkIptables, EtcNetworkVrrp, Gre, Host, Ipsec, Opvn, Result, Template, Vlan, Vrrp

Class Method Summary collapse

Class Method Details

.bgpObject



339
340
341
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 339

def self.bgp
  Bgp
end

.clazz(name) ⇒ Object



360
361
362
363
364
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 360

def self.clazz(name)
  ret = self.clazzes[name]
  throw "class not found #{name}" unless ret
  ret
end

.clazzesObject



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 343

def self.clazzes
  {
    "opvn" => Opvn,
    "gre" => Gre,
    "host" => Host,
    "device"=> Device,
    "vrrp" => Vrrp,
    "bridge" => Bridge,
    "bond" => Bond,
    "vlan" => Vlan,
    #"result" => Result,
    #"ipsec" => Ipsec,
    #"bgp" => Bgp,
    "template" => Template
  }
end

.create_bgp(cfg) ⇒ Object



379
380
381
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 379

def self.create_bgp(cfg)
  Bgp.new(cfg)
end

.create_host(name, cfg) ⇒ Object



366
367
368
369
370
371
372
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 366

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



374
375
376
377
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 374

def self.create_interface(name, cfg)
  cfg['name'] = name
  clazz(cfg['clazz']).new(cfg)
end

.create_ipsec(cfg) ⇒ Object



383
384
385
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 383

def self.create_ipsec(cfg)
  Ipsec.new(cfg)
end

.ipsecObject



336
337
338
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 336

def self.ipsec
  Ipsec
end

.nameObject



14
15
16
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu.rb', line 14

def self.name
  'ubuntu'
end