Class: Chef::Resource::LoadBalancer
- Inherits:
-
LWRPBase
- Object
- LWRPBase
- Chef::Resource::LoadBalancer
- Defined in:
- lib/chef/resource/load_balancer.rb
Instance Method Summary collapse
- #add_load_balancer_options(options) ⇒ Object
-
#initialize(*args) ⇒ LoadBalancer
constructor
A new instance of LoadBalancer.
-
#load_prior_resource(*args) ⇒ Object
This is here because metal users will probably want to do things like: machine “foo” action :destroy end.
Constructor Details
#initialize(*args) ⇒ LoadBalancer
Returns a new instance of LoadBalancer.
12 13 14 15 16 17 18 |
# File 'lib/chef/resource/load_balancer.rb', line 12 def initialize(*args) super @chef_environment = run_context.cheffish.current_environment @chef_server = run_context.cheffish.current_chef_server @driver = run_context..current_driver @load_balancer_options = run_context.. end |
Instance Method Details
#add_load_balancer_options(options) ⇒ Object
30 31 32 |
# File 'lib/chef/resource/load_balancer.rb', line 30 def () @load_balancer_options = Cheffish::MergedConfig.new(, @load_balancer_options) end |
#load_prior_resource(*args) ⇒ Object
This is here because metal users will probably want to do things like: machine “foo”
action :destroy
end
with_load_balancer_options :bootstrap_options => … machine “foo”
converge true
end
Without this, the first resource’s machine options will obliterate the second resource’s machine options, and then unexpected (and undesired) things happen.
47 48 49 |
# File 'lib/chef/resource/load_balancer.rb', line 47 def load_prior_resource(*args) Chef::Log.debug "Overloading #{self.resource_name} load_prior_resource with NOOP" end |