From aec0240e3f96705acaab258ff647f8b50290ad65 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 27 Jan 2020 11:12:55 +0100 Subject: [PATCH] mgr/orchestrator: Add doc about how to use OrchestratorClientMixin Signed-off-by: Sebastian Wagner --- src/pybind/mgr/orchestrator.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 35d7e278ebf..0335b56a8c6 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -1467,6 +1467,16 @@ class OrchestratorClientMixin(Orchestrator): ... self._orchestrator_wait([completion]) ... self.log.debug(completion.result) + .. note:: Orchestrator implementations should not inherit from `OrchestratorClientMixin`. + Reason is, that OrchestratorClientMixin magically redirects all methods to the + "real" implementation of the orchestrator. + + + >>> import mgr_module + >>> class MyImplentation(mgr_module.MgrModule, Orchestrator): + ... def __init__(self, ...): + ... self.orch_client = OrchestratorClientMixin() + ... self.orch_client.set_mgr(self.mgr)) """ def set_mgr(self, mgr): -- 2.39.5