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, #host, #ident, #name, #priority, #simple_name, #tags, #tags=, #template, #vrrp, #vrrp=
Constructor Details
Returns a new instance of HostDelegate.
122
123
124
125
126
127
128
129
130
|
# File 'lib/construqt/flavour/delegates.rb', line 122
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.
121
122
123
|
# File 'lib/construqt/flavour/delegates.rb', line 121
def bgps
@bgps
end
|
#ipsecs ⇒ Object
Returns the value of attribute ipsecs.
121
122
123
|
# File 'lib/construqt/flavour/delegates.rb', line 121
def ipsecs
@ipsecs
end
|
#users ⇒ Object
Returns the value of attribute users.
121
122
123
|
# File 'lib/construqt/flavour/delegates.rb', line 121
def users
@users
end
|
Instance Method Details
#_ident ⇒ Object
132
133
134
135
|
# File 'lib/construqt/flavour/delegates.rb', line 132
def _ident
"Host_#{self.name}"
end
|
#add_bgp(bgp) ⇒ Object
173
174
175
|
# File 'lib/construqt/flavour/delegates.rb', line 173
def add_bgp(bgp)
@bgps << bgp
end
|
#add_ipsec(ipsec) ⇒ Object
169
170
171
|
# File 'lib/construqt/flavour/delegates.rb', line 169
def add_ipsec(ipsec)
@ipsecs << ipsec
end
|
#commit ⇒ Object
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
# File 'lib/construqt/flavour/delegates.rb', line 177
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
165
166
167
|
# File 'lib/construqt/flavour/delegates.rb', line 165
def configip
self.delegate.configip
end
|
#configip=(id) ⇒ Object
161
162
163
|
# File 'lib/construqt/flavour/delegates.rb', line 161
def configip=(id)
self.delegate.configip = id
end
|
#flavour ⇒ Object
145
146
147
|
# File 'lib/construqt/flavour/delegates.rb', line 145
def flavour
self.delegate.flavour
end
|
#id ⇒ Object
157
158
159
|
# File 'lib/construqt/flavour/delegates.rb', line 157
def id
self.delegate.id
end
|
#id=(id) ⇒ Object
153
154
155
|
# File 'lib/construqt/flavour/delegates.rb', line 153
def id=(id)
self.delegate.id = id
end
|
#interfaces ⇒ Object
149
150
151
|
# File 'lib/construqt/flavour/delegates.rb', line 149
def interfaces
self.delegate.interfaces
end
|
#region ⇒ Object
137
138
139
|
# File 'lib/construqt/flavour/delegates.rb', line 137
def region
self.delegate.region
end
|
#result ⇒ Object
141
142
143
|
# File 'lib/construqt/flavour/delegates.rb', line 141
def result
self.delegate.result
end
|