class Construqt::Flavour::HostDelegate
Attributes
bgps[R]
ipsecs[R]
users[R]
Public Class Methods
new(host)
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 135 def initialize(host) #binding.pry #Construqt.logger.debug "HostDelegate.new(#{host.name})" self.delegate = host @ipsecs = [] @bgps = [] @users = host.users || host.region.users end
Public Instance Methods
_ident()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 145 def _ident #binding.pry "Host_#{self.name}" end
add_bgp(bgp)
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 186 def add_bgp(bgp) @bgps << bgp end
add_ipsec(ipsec)
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 182 def add_ipsec(ipsec) @ipsecs << ipsec end
commit()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 190 def commit #header_clazzes = {:host => self } # host class need also a header call #footer_clazzes = {:host => self } # host class need also a header call #self.interfaces.values.each do |iface| # header_clazzes[iface.class.name] ||= iface if iface.delegate.respond_to? :header # footer_clazzes[iface.class.name] ||= iface if iface.delegate.respond_to? :footer #end #binding.pry self.flavour.pre_clazzes do |key, clazz| Flavour.call_aspects("#{key}.header", self, nil) clazz.header(self) if clazz.respond_to? :header end Flavour.call_aspects("host.commit", self, nil) self.result.commit self.flavour.pre_clazzes do |key, clazz| Flavour.call_aspects("#{key}.footer", self, nil) clazz.footer(self) if clazz.respond_to? :footer end end
configip()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 178 def configip self.delegate.configip end
configip=(id)
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 174 def configip=(id) self.delegate.configip = id end
flavour()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 158 def flavour self.delegate.flavour end
id()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 170 def id self.delegate.id end
id=(id)
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 166 def id=(id) self.delegate.id = id end
interfaces()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 162 def interfaces self.delegate.interfaces end
region()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 150 def region self.delegate.region end
result()
click to toggle source
# File lib/construqt/flavour/delegates.rb, line 154 def result self.delegate.result end