From 5dfcb676778e05e4351474938e86d843663efcd6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 6 Mar 2022 14:05:07 +0800 Subject: [PATCH] mgr/cephadm: set docstring for shim() methods this allows the "rpc"ized methods of OrchestratorClientMixin to have the docstring defined by the original methods. Signed-off-by: Kefu Chai (cherry picked from commit d0db2ae4f946e1a985402640ef8f1733b40e91ef) Conflicts: src/pybind/mgr/orchestrator/_interface.py - Removed some typing imports that were not present in Octopus --- src/pybind/mgr/orchestrator/_interface.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index c22ac4c2d3fef..2780b00cf7421 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -16,7 +16,7 @@ import uuid from collections import namedtuple, OrderedDict from contextlib import contextmanager -from functools import wraps +from functools import wraps, update_wrapper import yaml @@ -1630,9 +1630,10 @@ def _mk_orch_methods(cls): return completion return inner - for meth in Orchestrator.__dict__: - if not meth.startswith('_') and meth not in ['is_orchestrator_module']: - setattr(cls, meth, shim(meth)) + for name, method in Orchestrator.__dict__.items(): + if not name.startswith('_') and name not in ['is_orchestrator_module']: + remote_call = update_wrapper(shim(name), method) + setattr(cls, name, remote_call) return cls -- 2.39.5