Class: ForemanInventoryUpload::Async::SingleHostReportJob
Instance Method Summary
collapse
#organization, #organization_id, #report_file_path, #rescue_strategy_for_self, #resource_locks
Instance Method Details
#hostname(host_id) ⇒ Object
9
10
11
12
|
# File 'lib/foreman_inventory_upload/async/single_host_report_job.rb', line 9
def hostname(host_id)
host = ::Host.find_by(id: host_id)
host&.name
end
|
#humanized_name ⇒ Object
14
15
16
17
|
# File 'lib/foreman_inventory_upload/async/single_host_report_job.rb', line 14
def humanized_name
hostname_result = hostname(input[:host_id])
hostname_result.present? ? format(_("Single-host report job for host %s"), hostname_result) : _("Single-host report job")
end
|
#plan(base_folder, organization_id, host_id) ⇒ Object
4
5
6
7
|
# File 'lib/foreman_inventory_upload/async/single_host_report_job.rb', line 4
def plan(base_folder, organization_id, host_id)
input[:host_id] = host_id
super(base_folder, organization_id, "id=#{input[:host_id]}")
end
|