]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: stub in a new smb mgr module
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 30 Jan 2024 19:39:16 +0000 (14:39 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 25 Apr 2024 23:10:38 +0000 (19:10 -0400)
Currently, this module does nothing but serve as a placeholder for
the future smb manager module.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/CMakeLists.txt
src/pybind/mgr/smb/__init__.py [new file with mode: 0644]
src/pybind/mgr/smb/module.py [new file with mode: 0644]

index e8c06c9e2e9e848e7e7b0e6886289031b50f2dd0..0b706c74edb23c82f49dbaf920a635a83eea052e 100644 (file)
@@ -46,6 +46,7 @@ set(mgr_modules
   rgw
   # rook (optional)
   selftest
+  smb
   snap_schedule
   stats
   status
diff --git a/src/pybind/mgr/smb/__init__.py b/src/pybind/mgr/smb/__init__.py
new file mode 100644 (file)
index 0000000..b99793b
--- /dev/null
@@ -0,0 +1,9 @@
+# enable unit test automagical mocks
+import os
+
+if 'UNITTEST' in os.environ:
+    import tests  # noqa: F401
+
+from .module import Module
+
+__all__ = ['Module']
diff --git a/src/pybind/mgr/smb/module.py b/src/pybind/mgr/smb/module.py
new file mode 100644 (file)
index 0000000..d0a19d9
--- /dev/null
@@ -0,0 +1,19 @@
+import logging
+
+from typing import Any, List
+
+from mgr_module import MgrModule, Option
+
+import orchestrator
+
+
+
+log = logging.getLogger(__name__)
+
+
+class Module(orchestrator.OrchestratorClientMixin, MgrModule):
+    MODULE_OPTIONS: List[Option] = []
+
+    def __init__(self, *args: str, **kwargs: Any) -> None:
+        super().__init__(*args, **kwargs)
+        log.info('hello smb')