class Chef::Resource::LoadBalancer
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# 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.chef_metal.current_driver @load_balancer_options = run_context.chef_metal.current_load_balancer_options end
Public Instance Methods
add_load_balancer_options(options)
click to toggle source
# File lib/chef/resource/load_balancer.rb, line 30 def add_load_balancer_options(options) @load_balancer_options = Cheffish::MergedConfig.new(options, @load_balancer_options) end
load_prior_resource(*args)
click to toggle source
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.
# 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