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: Task, host: Host, result: MultiResult) None
This method is called when a host completes executing a subtask
- subtask_instance_started(task: Task, host: Host) None
This method is called before a host starts executing a subtask
- task_completed(task: Task, result: AggregatedResult) None
This method is called when all the hosts have completed executing their respective task
- task_instance_completed(task: Task, host: Host, result: MultiResult) None
This method is called when a host completes its instance of a 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: Task, host: Host, result: MultiResult) None
- task_completed(task: Task, result: AggregatedResult) None
- task_instance_completed(task: Task, host: Host, result: MultiResult) None