Feature #7301
closedInfrastructure for bulk actions
Description
Foreman tasks should support triggering an action on a set of resources
and tracking the progress of the sub-tasks.
Implementation¶
There is a ::Actions::BulkAction
:
plan_action(::Actions::BulkAction, ActionToTriggerPerTarget, targets, *args)
This will plan the ActionToTriggerPerTarget
on every target from the
targets. By default, it uses the targets class and the id of the
targets for serializing the data into the input and loading the
objects back in the run phase. The *args are also passed as arguments
to the ActionToTriggerPerTarget
.
To customize the logic around serialization/deserialization of the
input targets and args, one can override the plan
andcreate_sub_plans
method.
The Task
model has parent_task reference to the task that planned it.
In bulk action task details there is a link to a list of subtasks
(/tasks/uuid/sub_tasks
), and in the sub task details, there is link
to the parent task.
Updated by Ivan Necas about 10 years ago
- Blocks Tracker #6190: Dynflowize bulk actions added
Updated by Ivan Necas about 10 years ago
- Description updated (diff)
- Status changed from Assigned to Ready For Testing
Updated by Ivan Necas about 10 years ago
- Pull request https://github.com/theforeman/foreman-tasks/pull/86 added
- Pull request deleted (
)
Updated by Ivan Necas about 10 years ago
- Blocks Refactor #7304: Use dynflow for repository sync bulk actions added
Updated by Ivan Necas about 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset bbb06d1a6ebadadddb4b25e248b3c87b6c3f340c.