From 470d8399a346b9ca1b5e083c0f99b8bbd361f59b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 1 Apr 2018 22:31:45 +0100 Subject: [PATCH] ansible: document planner.Planner. --- ansible_mitogen/planner.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ansible_mitogen/planner.py b/ansible_mitogen/planner.py index 49c0be06..8fcd639c 100644 --- a/ansible_mitogen/planner.py +++ b/ansible_mitogen/planner.py @@ -128,9 +128,27 @@ class Planner(object): exports a method to run the module. """ def detect(self, invocation): + """ + Return true if the supplied `invocation` matches the module type + implemented by this planner. + """ raise NotImplementedError() def plan(self, invocation): + """ + If :meth:`detect` returned :data:`True`, plan for the module's + execution, including granting access to or delivering any files to it + that are known to be absent, and finally return a dict:: + + { + # Name of the class from runners.py that implements the + # target-side execution of this module type. + "runner_name": "...", + + # Remaining keys are passed to the constructor of the class + # named by `runner_name`. + } + """ raise NotImplementedError()