This module contains functions that are executed in the
serve() thread.
Meaning they don't block the CLI
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit
acd6854bbc8985f8b2f6f2bfaa84f7e4c31d6660)
--- /dev/null
+import logging
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from cephadm.module import CephadmOrchestrator
+
+logger = logging.getLogger(__name__)
+
+
+class CephadmServe:
+ """
+ This module contains functions that are executed in the
+ serve() thread. Thus they don't block the CLI.
+
+ On the other hand, These function should *not* be called form
+ CLI handlers, to avoid blocking the CLI
+ """
+
+ def __init__(self, mgr: "CephadmOrchestrator"):
+ self.mgr: "CephadmOrchestrator" = mgr