class Proxy::OpenSCAP::Api

Constants

CLIENT_PATHS

Private Instance Methods

file_not_found_msg() click to toggle source
# File lib/smart_proxy_openscap/openscap_api.rb, line 194
def file_not_found_msg
  "File not found on Foreman. Wrong policy id?"
end
validate_scap_file(params) click to toggle source
# File lib/smart_proxy_openscap/openscap_api.rb, line 184
def validate_scap_file(params)
  begin
    Proxy::OpenSCAP::ContentParser.new.validate(params[:type], request.body.string).to_json
  rescue *HTTP_ERRORS => e
    log_halt 500, e.message
  rescue StandardError => e
    log_halt 500, "Error occurred: #{e.message}"
  end
end