Module: Construqt::Flavour::Delegate

Instance Method Summary collapse

Instance Method Details

#addressObject



56
57
58
# File 'lib/construqt/flavour/delegates.rb', line 56

def address
  self.delegate.address
end

#build_config(host, my) ⇒ Object



89
90
91
92
93
94
95
# File 'lib/construqt/flavour/delegates.rb', line 89

def build_config(host, my)
  #        binding.pry if host && host.name == "ct-iar1-ham"
  #        binding.pry if self.class.name[self.class.name.rindex(':')+1..-1] == "DeviceDelegate"
  #binding.pry
  Flavour.call_aspects("#{simple_name}.build_config", host, my||self)
  self.delegate.build_config(host, my||self)
end

#cableObject



81
82
83
# File 'lib/construqt/flavour/delegates.rb', line 81

def cable
  self.delegate.cable
end

#cable=(a) ⇒ Object



77
78
79
# File 'lib/construqt/flavour/delegates.rb', line 77

def cable=(a)
  self.delegate.cable = a
end

#clazzObject



72
73
74
75
# File 'lib/construqt/flavour/delegates.rb', line 72

def clazz
  #binding.pry
  self.delegate.clazz
end

#default_nameObject



44
45
46
# File 'lib/construqt/flavour/delegates.rb', line 44

def default_name
  self.delegate.default_name
end

#delegateObject



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

def delegate
  throw "you need a delegate #{self.class.name}" unless @delegate
  @delegate
end

#delegate=(a) ⇒ Object



10
11
12
13
14
# File 'lib/construqt/flavour/delegates.rb', line 10

def delegate=(a)
  throw "delegate needs to be !nil" unless a
  a.delegate = self
  @delegate = a
end

#descriptionObject



40
41
42
# File 'lib/construqt/flavour/delegates.rb', line 40

def description
  self.delegate.description
end

#firewallsObject



36
37
38
# File 'lib/construqt/flavour/delegates.rb', line 36

def firewalls
  self.delegate.firewalls
end

#hostObject



64
65
66
# File 'lib/construqt/flavour/delegates.rb', line 64

def host
  self.delegate.host
end

#identObject



97
98
99
# File 'lib/construqt/flavour/delegates.rb', line 97

def ident
  self._ident.gsub(/[^0-9a-zA-Z_]/, '_')
end

#ipsecObject



32
33
34
# File 'lib/construqt/flavour/delegates.rb', line 32

def ipsec
  self.delegate.ipsec
end

#mtuObject



52
53
54
# File 'lib/construqt/flavour/delegates.rb', line 52

def mtu
  self.delegate.mtu
end

#nameObject



48
49
50
# File 'lib/construqt/flavour/delegates.rb', line 48

def name
  self.delegate.name
end

#priorityObject



68
69
70
# File 'lib/construqt/flavour/delegates.rb', line 68

def priority
  self.delegate.priority
end

#simple_nameObject



85
86
87
# File 'lib/construqt/flavour/delegates.rb', line 85

def simple_name
  self.class.name[self.class.name.rindex(':')+1..-1]
end

#tagsObject



16
17
18
# File 'lib/construqt/flavour/delegates.rb', line 16

def tags
  @tags || []
end

#tags=(tags) ⇒ Object



20
21
22
# File 'lib/construqt/flavour/delegates.rb', line 20

def tags=(tags)
  @tags = tags
end

#templateObject



60
61
62
# File 'lib/construqt/flavour/delegates.rb', line 60

def template
  self.delegate.template
end

#vrrpObject



28
29
30
# File 'lib/construqt/flavour/delegates.rb', line 28

def vrrp
  @vrrp
end

#vrrp=(a) ⇒ Object



24
25
26
# File 'lib/construqt/flavour/delegates.rb', line 24

def vrrp=(a)
  @vrrp = a
end