12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/concerns/insights_cloud/package_profile_upload_extensions.rb', line 12
def generate_host_report
return unless ForemanRhCloud.with_iop_smart_proxy?
logger.debug("Generating host-specific report for host #{@host.name}")
ForemanTasks.async_task(
ForemanInventoryUpload::Async::SingleHostReportJob,
ForemanInventoryUpload.generated_reports_folder,
@host.organization_id,
@host.id
)
return if @host.insights
insights_facet = @host.build_insights(uuid: @host.subscription_facet.uuid)
insights_facet.save
end
|