nornir.core.processor
- class nornir.core.processor.Processor(*args, **kwargs)
This defines the Processor interface. A processor plugin needs to implement each method with the same exact signature. It’s not necessary to subclass it.
A processor is a plugin that gets called when certain events happen.
- subtask_instance_completed(task: nornir.core.task.Task, host: nornir.core.inventory.Host, result: nornir.core.task.MultiResult) None
This method is called when a host completes executing a subtask
- subtask_instance_started(task: nornir.core.task.Task, host: nornir.core.inventory.Host) None
This method is called before a host starts executing a subtask
- task_completed(task: nornir.core.task.Task, result: nornir.core.task.AggregatedResult) None
This method is called when all the hosts have completed executing their respective task
- task_instance_completed(task: nornir.core.task.Task, host: nornir.core.inventory.Host, result: nornir.core.task.MultiResult) None
This method is called when a host completes its instance of a task
- task_instance_started(task: nornir.core.task.Task, host: nornir.core.inventory.Host) None
This method is called before a host starts executing its instance of the task
- task_started(task: nornir.core.task.Task) None
This method is called right before starting the task
- class nornir.core.processor.Processors(iterable=(), /)
Processors is a wrapper class that holds a list of Processor. Each method will just iterate over all the the Processor objects in
self
and call its method. For instance:>>> def my_method(...): >>> for p in self: >>> p.my_method(...)
- subtask_instance_completed(task: nornir.core.task.Task, host: nornir.core.inventory.Host, result: nornir.core.task.MultiResult) None
- subtask_instance_started(task: nornir.core.task.Task, host: nornir.core.inventory.Host) None
- task_completed(task: nornir.core.task.Task, result: nornir.core.task.AggregatedResult) None
- task_instance_completed(task: nornir.core.task.Task, host: nornir.core.inventory.Host, result: nornir.core.task.MultiResult) None
- task_instance_started(task: nornir.core.task.Task, host: nornir.core.inventory.Host) None
- task_started(task: nornir.core.task.Task) None