Feature #12172

Common serializer for output of tasks

Added by Tomáš Strachota over 1 year ago.

Status:New
Priority:Normal
Assigned To:-
Category:-
Target version:0.0.2
Difficulty: Pull request:
Bugzilla link:

Description

It would be good to provide common serializer for task output to avoid hacks like custom to_hash functions:
https://github.com/theforeman/foreman_deployments/blob/master/app/lib/foreman_deployments/tasks/search_task_definition.rb#L12-L16
https://github.com/theforeman/foreman_deployments/blob/master/lib/foreman_deployments/monkey_patches.rb

The serializer should enable for custom serialization methods for classes to tune the behaviour. E.g. output for host should always include facts.

Also available in: Atom PDF