From 4f5ce67fc60a0a8f44221368341d0fca36ff1075 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 22 Jan 2021 10:19:03 +0100 Subject: [PATCH] mgr/cephadm: minor pep8 fixes Signed-off-by: Sebastian Wagner (cherry picked from commit 4ca11ae50d734c1d059d88b8b14a3318f11f4eea) --- src/pybind/mgr/cephadm/module.py | 2 +- src/pybind/mgr/orchestrator/_interface.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index f389c57483a7..2e88dafe6751 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -942,7 +942,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, Text that is appended to all daemon's ceph.conf. Mainly a workaround, till `config generate-minimal-conf` generates a complete ceph.conf. - + Warning: this is a dangerous operation. """ if inbuf: diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index f56e0684e939..cc726d52d7da 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -117,6 +117,7 @@ def handle_exception(prefix: str, perm: str, func: FuncT) -> FuncT: class InnerCliCommandCallable(Protocol): def __call__(self, prefix: str) -> Callable[[FuncT], FuncT]: ... + def _cli_command(perm: str) -> InnerCliCommandCallable: def inner_cli_command(prefix: str) -> Callable[[FuncT], FuncT]: return lambda func: handle_exception(prefix, perm, func) @@ -667,6 +668,7 @@ def _hide_in_features(f: FuncT) -> FuncT: f._hide_in_features = True # type: ignore return f + class Orchestrator(object): """ Calls in this class may do long running remote operations, with time -- 2.47.3