class Chef::Provider::LoadBalancer

Private Class Methods

additional_lb_option_keys() click to toggle source
# File lib/chef/provider/load_balancer.rb, line 66
def self.additional_lb_option_keys
  @@additional_lb_option_keys ||= []
end

Public Instance Methods

action_handler() click to toggle source
# File lib/chef/provider/load_balancer.rb, line 10
def action_handler
  @action_handler ||= Chef::Provisioning::ChefProviderActionHandler.new(self)
end
chef_managed_entry_store() click to toggle source
# File lib/chef/provider/load_balancer.rb, line 22
def chef_managed_entry_store
  @chef_managed_entry_store ||= Provisioning.chef_managed_entry_store(new_resource.chef_server)
end
new_driver() click to toggle source
# File lib/chef/provider/load_balancer.rb, line 18
def new_driver
  @new_driver ||= run_context.chef_provisioning.driver_for(new_resource.driver)
end
whyrun_supported?() click to toggle source
# File lib/chef/provider/load_balancer.rb, line 14
def whyrun_supported?
  true
end

Private Instance Methods

get_machine_spec!(machine_name) click to toggle source
# File lib/chef/provider/load_balancer.rb, line 48
def get_machine_spec!(machine_name)
  Chef::Log.debug "Getting machine spec for #{machine_name}"
  Provisioning.chef_managed_entry_store(new_resource.chef_server).get!(:machine, machine_name)
end
lb_options() click to toggle source
# File lib/chef/provider/load_balancer.rb, line 53
def lb_options
  @lb_options ||= begin
    configs = []
    configs << new_resource.load_balancer_options if new_resource.load_balancer_options

    # See documentation in machine.rb provider
    (self.class.additional_lb_option_keys || []).each do |k|
      configs << { k => new_resource.public_send(k)} if new_resource.public_send(k)
    end
    Cheffish::MergedConfig.new(*configs)
  end
end