class ChefPlugin::Resources::Base

Public Class Methods

new() click to toggle source
# File lib/smart_proxy_chef_plugin/resources/base.rb, line 6
def initialize
  @connection = ChefAPI::Connection.new(
      :endpoint => ChefPlugin::Plugin.settings.chef_server_url,
      :client => ChefPlugin::Plugin.settings.chef_smartproxy_clientname,
      :key => ChefPlugin::Plugin.settings.chef_smartproxy_privatekey,
  )
  @connection.ssl_verify = ChefPlugin::Plugin.settings.chef_ssl_verify
  self_signed = ChefPlugin::Plugin.settings.chef_ssl_pem_file
  if !self_signed.nil? && !self_signed.empty?
    @connection.ssl_pem_file = self_signed
  end
end