Class: ForemanInventoryUpload::Async::SingleHostReportJob
- Inherits:
-
HostInventoryReportJob
- Object
- Actions::EntryAction
- HostInventoryReportJob
- ForemanInventoryUpload::Async::SingleHostReportJob
- Defined in:
- lib/foreman_inventory_upload/async/single_host_report_job.rb
Instance Method Summary collapse
- #hostname(host_id) ⇒ Object
- #humanized_name ⇒ Object
- #plan(base_folder, organization_id, host_id) ⇒ Object
Methods inherited from HostInventoryReportJob
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 |