lib/jamf/api/connection.rb
# Apply defaults from the Jamf.config
# to the params for the #connect method
#
# @param params[Hash] The params for #connect
#
# @return [Hash] The params with defaults applied
#
Apply defaults from the Jamf.config
to the params for the #connect method
Apply defaults from the Jamf . config to the params for the #connect method
def apply_defaults_from_config(params)
      params[:host] ||= Jamf.config.api_server_name
      params[:port] ||= Jamf.config.api_server_port
      params[:user] ||= Jamf.config.api_username
      params[:timeout] ||= Jamf.config.api_timeout
      params[:open_timeout] ||= Jamf.config.api_timeout_open
      params[:ssl_version] ||= Jamf.config.api_ssl_version
      params[:verify_cert] = Jamf.config.api_verify_cert if params[:verify_cert].nil?
    end
def apply_defaults_from_config ( params ) params [ :host ] ||= Jamf . config . api_server_name params [ :port ] ||= Jamf . config . api_server_port params [ :user ] ||= Jamf . config . api_username params [ :timeout ] ||= Jamf . config . api_timeout params [ :open_timeout ] ||= Jamf . config . api_timeout_open params [ :ssl_version ] ||= Jamf . config . api_ssl_version params [ :verify_cert ] = Jamf . config . api_verify_cert if params [ :verify_cert ] . nil? end
Apply defaults from the Jamf.config
to the params for the #connect method
Apply defaults from the Jamf . config to the params for the #connect method
# settings from config if they aren't in the params # if verify cert was not in the params, get it from the prefs. # We can't use ||= because the desired value might be 'false'
The params with defaults applied
The params with defaults applied
Hash
params
The params for #connect
The params for #connect