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



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

def self.bgp
  Bgp
end

.clazz(name) ⇒ Object



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

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

.clazzesObject



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

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



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

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

.create_host(name, cfg) ⇒ Object



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

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



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

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

.create_ipsec(cfg) ⇒ Object



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

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

.ipsecObject



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

def self.ipsec
  Ipsec
end

.nameObject



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

def self.name
  'ubuntu'
end