Module: Construqt::Flavour::Delegate
- Included in:
- BgpDelegate, BondDelegate, BridgeDelegate, DeviceDelegate, GreDelegate, HostDelegate, InterfaceDelegate, IpsecDelegate, OpvnDelegate, TemplateDelegate, VlanDelegate, VrrpDelegate
- Defined in:
- lib/construqt/flavour/delegates.rb
Instance Method Summary collapse
- #address ⇒ Object
- #build_config(host, my) ⇒ Object
- #cable ⇒ Object
- #cable=(a) ⇒ Object
- #clazz ⇒ Object
- #default_name ⇒ Object
- #delegate ⇒ Object
- #delegate=(a) ⇒ Object
- #description ⇒ Object
- #firewalls ⇒ Object
- #host ⇒ Object
- #ident ⇒ Object
- #ipsec ⇒ Object
- #mtu ⇒ Object
- #name ⇒ Object
- #priority ⇒ Object
- #simple_name ⇒ Object
- #tags ⇒ Object
- #tags=(tags) ⇒ Object
- #template ⇒ Object
- #vrrp ⇒ Object
- #vrrp=(a) ⇒ Object
Instance Method Details
#address ⇒ Object
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 |
#cable ⇒ Object
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 |
#clazz ⇒ Object
72 73 74 75 |
# File 'lib/construqt/flavour/delegates.rb', line 72 def clazz #binding.pry self.delegate.clazz end |
#default_name ⇒ Object
44 45 46 |
# File 'lib/construqt/flavour/delegates.rb', line 44 def default_name self.delegate.default_name end |
#delegate ⇒ Object
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 |
#description ⇒ Object
40 41 42 |
# File 'lib/construqt/flavour/delegates.rb', line 40 def description self.delegate.description end |
#firewalls ⇒ Object
36 37 38 |
# File 'lib/construqt/flavour/delegates.rb', line 36 def firewalls self.delegate.firewalls end |
#host ⇒ Object
64 65 66 |
# File 'lib/construqt/flavour/delegates.rb', line 64 def host self.delegate.host end |
#ident ⇒ Object
97 98 99 |
# File 'lib/construqt/flavour/delegates.rb', line 97 def ident self._ident.gsub(/[^0-9a-zA-Z_]/, '_') end |
#ipsec ⇒ Object
32 33 34 |
# File 'lib/construqt/flavour/delegates.rb', line 32 def ipsec self.delegate.ipsec end |
#mtu ⇒ Object
52 53 54 |
# File 'lib/construqt/flavour/delegates.rb', line 52 def mtu self.delegate.mtu end |
#name ⇒ Object
48 49 50 |
# File 'lib/construqt/flavour/delegates.rb', line 48 def name self.delegate.name end |
#priority ⇒ Object
68 69 70 |
# File 'lib/construqt/flavour/delegates.rb', line 68 def priority self.delegate.priority end |
#simple_name ⇒ Object
85 86 87 |
# File 'lib/construqt/flavour/delegates.rb', line 85 def simple_name self.class.name[self.class.name.rindex(':')+1..-1] end |
#tags ⇒ Object
16 17 18 |
# File 'lib/construqt/flavour/delegates.rb', line 16 def @tags || [] end |
#tags=(tags) ⇒ Object
20 21 22 |
# File 'lib/construqt/flavour/delegates.rb', line 20 def () @tags = end |
#template ⇒ Object
60 61 62 |
# File 'lib/construqt/flavour/delegates.rb', line 60 def template self.delegate.template end |
#vrrp ⇒ Object
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 |