class ChefPlugin::ForemanApi

Private Instance Methods

get_content() click to toggle source
# File lib/smart_proxy_chef_plugin/foreman_api.rb, line 34
def get_content
  input = request.env['rack.input']
  input.rewind
  input.read
end
log_result(foreman_response) click to toggle source
# File lib/smart_proxy_chef_plugin/foreman_api.rb, line 40
def log_result(foreman_response)
  code = foreman_response.code.to_i
  if code >= 200 && code < 300
    logger.debug "upload forwarded to Foreman successfully, response was #{code}"
  else
    logger.error "forwarding failed, Foreman responded with #{code}, check Foreman access and production logs for more details"
  end
end