]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/smb: use correct module when referring to result classes
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 2 May 2024 20:40:41 +0000 (16:40 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 17 Jun 2024 15:16:59 +0000 (11:16 -0400)
The result classes are not based in handler.py (any more) but the
module.py code was not updated to reflect that. Update it now.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/module.py

index fcaf2d3d67001fe8e9897fd7299f650a5e622aff..34bab3c82a046fa4d9aa8c66379b368187a810de 100644 (file)
@@ -6,7 +6,7 @@ import orchestrator
 from ceph.deployment.service_spec import PlacementSpec, SMBSpec
 from mgr_module import MgrModule, Option
 
-from . import cli, fs, handler, mon_store, rados_store, resources
+from . import cli, fs, handler, mon_store, rados_store, resources, results
 from .enums import AuthMode, JoinSourceType, UserGroupSourceType
 from .proto import AccessAuthorizer, Simplified
 
@@ -59,7 +59,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         )
 
     @cli.SMBCommand('apply', perm='rw')
-    def apply_resources(self, inbuf: str) -> handler.ResultGroup:
+    def apply_resources(self, inbuf: str) -> results.ResultGroup:
         """Create, update, or remove smb configuration resources based on YAML
         or JSON specs
         """
@@ -82,7 +82,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         define_user_pass: Optional[List[str]] = None,
         custom_dns: Optional[List[str]] = None,
         placement: Optional[str] = None,
-    ) -> handler.Result:
+    ) -> results.Result:
         """Create an smb cluster"""
         domain_settings = None
         user_group_settings = None
@@ -181,7 +181,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         return self._handler.apply(to_apply, create_only=True).squash(cluster)
 
     @cli.SMBCommand('cluster rm', perm='rw')
-    def cluster_rm(self, cluster_id: str) -> handler.Result:
+    def cluster_rm(self, cluster_id: str) -> results.Result:
         """Remove an smb cluster"""
         cluster = resources.RemovedCluster(cluster_id=cluster_id)
         return self._handler.apply([cluster]).one()
@@ -207,7 +207,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         share_name: str = '',
         subvolume: str = '',
         readonly: bool = False,
-    ) -> handler.Result:
+    ) -> results.Result:
         """Create an smb share"""
         share = resources.Share(
             cluster_id=cluster_id,
@@ -223,7 +223,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         return self._handler.apply([share], create_only=True).one()
 
     @cli.SMBCommand('share rm', perm='rw')
-    def share_rm(self, cluster_id: str, share_id: str) -> handler.Result:
+    def share_rm(self, cluster_id: str, share_id: str) -> results.Result:
         """Remove an smb share"""
         share = resources.RemovedShare(
             cluster_id=cluster_id, share_id=share_id