Class: ForemanInventoryUpload::Async::HostInventoryReportJob

Inherits:
Actions::EntryAction
  • Object
show all
Defined in:
lib/foreman_inventory_upload/async/host_inventory_report_job.rb

Direct Known Subclasses

SingleHostReportJob

Instance Method Summary collapse

Instance Method Details

#humanized_nameObject



30
31
32
# File 'lib/foreman_inventory_upload/async/host_inventory_report_job.rb', line 30

def humanized_name
  _("Host inventory report job")
end

#organization_idObject



34
35
36
# File 'lib/foreman_inventory_upload/async/host_inventory_report_job.rb', line 34

def organization_id
  input[:organization_id]
end

#plan(base_folder, organization_id, hosts_filter = "", upload = true) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/foreman_inventory_upload/async/host_inventory_report_job.rb', line 4

def plan(base_folder, organization_id, hosts_filter = "", upload = true)
  sequence do
    plan_action(
      GenerateHostReport,
      base_folder,
      organization_id,
      hosts_filter
    )
    if upload
      plan_action(
        QueueForUploadJob,
        base_folder,
        ForemanInventoryUpload.facts_archive_name(organization_id, hosts_filter),
        organization_id
      )
    end

    if ForemanRhCloud.with_iop_smart_proxy?
      plan_action(
        CreateMissingInsightsFacets,
        organization_id
      )
    end
  end
end