Class: Construqt::Flavour::HostDelegate
- Inherits:
-
Object
- Object
- Construqt::Flavour::HostDelegate
show all
- Includes:
- Delegate
- Defined in:
- lib/construqt/flavour/delegates.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Delegate
#address, #build_config, #cable, #cable=, #clazz, #default_name, #delegate, #delegate=, #description, #firewalls, #host, #ident, #ipsec, #mtu, #name, #priority, #simple_name, #tags, #tags=, #template, #vrrp, #vrrp=
Constructor Details
Returns a new instance of HostDelegate.
135
136
137
138
139
140
141
142
143
|
# File 'lib/construqt/flavour/delegates.rb', line 135
def initialize(host)
self.delegate = host
@ipsecs = []
@bgps = []
@users = host.users || host.region.users
end
|
Instance Attribute Details
#bgps ⇒ Object
Returns the value of attribute bgps.
134
135
136
|
# File 'lib/construqt/flavour/delegates.rb', line 134
def bgps
@bgps
end
|
#ipsecs ⇒ Object
Returns the value of attribute ipsecs.
134
135
136
|
# File 'lib/construqt/flavour/delegates.rb', line 134
def ipsecs
@ipsecs
end
|
#users ⇒ Object
Returns the value of attribute users.
134
135
136
|
# File 'lib/construqt/flavour/delegates.rb', line 134
def users
@users
end
|
Instance Method Details
#_ident ⇒ Object
145
146
147
148
|
# File 'lib/construqt/flavour/delegates.rb', line 145
def _ident
"Host_#{self.name}"
end
|
#add_bgp(bgp) ⇒ Object
186
187
188
|
# File 'lib/construqt/flavour/delegates.rb', line 186
def add_bgp(bgp)
@bgps << bgp
end
|
#add_ipsec(ipsec) ⇒ Object
182
183
184
|
# File 'lib/construqt/flavour/delegates.rb', line 182
def add_ipsec(ipsec)
@ipsecs << ipsec
end
|
#commit ⇒ Object
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
# File 'lib/construqt/flavour/delegates.rb', line 190
def commit
self.flavour.pre_clazzes do |key, clazz|
Flavour.call_aspects("#{key}.header", self, nil)
clazz.(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.(self) if clazz.respond_to? :footer
end
end
|
#configip ⇒ Object
178
179
180
|
# File 'lib/construqt/flavour/delegates.rb', line 178
def configip
self.delegate.configip
end
|
#configip=(id) ⇒ Object
174
175
176
|
# File 'lib/construqt/flavour/delegates.rb', line 174
def configip=(id)
self.delegate.configip = id
end
|
#flavour ⇒ Object
158
159
160
|
# File 'lib/construqt/flavour/delegates.rb', line 158
def flavour
self.delegate.flavour
end
|
#id ⇒ Object
170
171
172
|
# File 'lib/construqt/flavour/delegates.rb', line 170
def id
self.delegate.id
end
|
#id=(id) ⇒ Object
166
167
168
|
# File 'lib/construqt/flavour/delegates.rb', line 166
def id=(id)
self.delegate.id = id
end
|
#interfaces ⇒ Object
162
163
164
|
# File 'lib/construqt/flavour/delegates.rb', line 162
def interfaces
self.delegate.interfaces
end
|
#region ⇒ Object
150
151
152
|
# File 'lib/construqt/flavour/delegates.rb', line 150
def region
self.delegate.region
end
|
#result ⇒ Object
154
155
156
|
# File 'lib/construqt/flavour/delegates.rb', line 154
def result
self.delegate.result
end
|