Class: Api::V2::Compliance::OvalReportsController

Inherits:
BaseController
  • Object
show all
Includes:
Foreman::Controller::SmartProxyAuth
Defined in:
app/controllers/api/v2/compliance/oval_reports_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



16
17
18
19
20
21
22
23
24
# File 'app/controllers/api/v2/compliance/oval_reports_controller.rb', line 16

def create
  ForemanOpenscap::Oval::Cves.new.create(@host, params.to_unsafe_h)
  if @host.errors.any?
    upload_fail @host.errors.full_messages
  else
    @host.refresh_statuses([ForemanOpenscap::OvalStatus])
    render :json => { :result => :ok }
  end
end