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
- #host ⇒ Object
- #ident ⇒ 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
43 44 45 |
# File 'lib/construqt/flavour/delegates.rb', line 43 def address self.delegate.address end |
#build_config(host, my) ⇒ Object
76 77 78 79 80 81 82 |
# File 'lib/construqt/flavour/delegates.rb', line 76 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
68 69 70 |
# File 'lib/construqt/flavour/delegates.rb', line 68 def cable self.delegate.cable end |
#cable=(a) ⇒ Object
64 65 66 |
# File 'lib/construqt/flavour/delegates.rb', line 64 def cable=(a) self.delegate.cable = a end |
#clazz ⇒ Object
59 60 61 62 |
# File 'lib/construqt/flavour/delegates.rb', line 59 def clazz #binding.pry self.delegate.clazz end |
#default_name ⇒ Object
35 36 37 |
# File 'lib/construqt/flavour/delegates.rb', line 35 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 |
# File 'lib/construqt/flavour/delegates.rb', line 10 def delegate=(a) throw "delegate needs to be !nil" unless a @delegate = a end |
#description ⇒ Object
31 32 33 |
# File 'lib/construqt/flavour/delegates.rb', line 31 def description self.delegate.description end |
#host ⇒ Object
51 52 53 |
# File 'lib/construqt/flavour/delegates.rb', line 51 def host self.delegate.host end |
#ident ⇒ Object
84 85 86 |
# File 'lib/construqt/flavour/delegates.rb', line 84 def ident self._ident.gsub(/[^0-9a-zA-Z_]/, '_') end |
#name ⇒ Object
39 40 41 |
# File 'lib/construqt/flavour/delegates.rb', line 39 def name self.delegate.name end |
#priority ⇒ Object
55 56 57 |
# File 'lib/construqt/flavour/delegates.rb', line 55 def priority self.delegate.priority end |
#simple_name ⇒ Object
72 73 74 |
# File 'lib/construqt/flavour/delegates.rb', line 72 def simple_name self.class.name[self.class.name.rindex(':')+1..-1] end |
#tags ⇒ Object
15 16 17 |
# File 'lib/construqt/flavour/delegates.rb', line 15 def @tags || [] end |
#tags=(tags) ⇒ Object
19 20 21 |
# File 'lib/construqt/flavour/delegates.rb', line 19 def () @tags = end |
#template ⇒ Object
47 48 49 |
# File 'lib/construqt/flavour/delegates.rb', line 47 def template self.delegate.template end |
#vrrp ⇒ Object
27 28 29 |
# File 'lib/construqt/flavour/delegates.rb', line 27 def vrrp @vrrp end |
#vrrp=(a) ⇒ Object
23 24 25 |
# File 'lib/construqt/flavour/delegates.rb', line 23 def vrrp=(a) @vrrp = a end |