Class: Actions::ForemanTemplateTasks::TemplateImportAction
- Inherits:
-
TemplateAction
- Object
- Base
- TemplateAction
- Actions::ForemanTemplateTasks::TemplateImportAction
show all
- Defined in:
- app/lib/actions/foreman_template_tasks/template_import_action.rb
Instance Method Summary
collapse
#_plan, cleanup_after, #delay, #humanized_name, #humanized_output, #plan, #rescue_strategy, #task_output
Instance Method Details
#humanized_action ⇒ Object
12
13
14
|
# File 'app/lib/actions/foreman_template_tasks/template_import_action.rb', line 12
def humanized_action
'Import'
end
|
#run ⇒ Object
7
8
9
10
|
# File 'app/lib/actions/foreman_template_tasks/template_import_action.rb', line 7
def run
importer = ForemanTemplates::TemplateImporter.new(input[:task_params])
output[:results] = importer.import![:results].map(&:to_h)
end
|