From: Sebastian Wagner Date: Mon, 27 Jan 2020 10:12:55 +0000 (+0100) Subject: mgr/orchestrator: Add doc about how to use OrchestratorClientMixin X-Git-Tag: v15.1.0~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aec0240e3f96705acaab258ff647f8b50290ad65;p=ceph.git mgr/orchestrator: Add doc about how to use OrchestratorClientMixin Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 35d7e278ebf7..0335b56a8c6d 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):