From 014bd30417d4f6ad9038a6d206290ab657d30e2a Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Thu, 2 May 2024 16:40:41 -0400 Subject: [PATCH] mgr/smb: use correct module when referring to result classes 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 --- src/pybind/mgr/smb/module.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pybind/mgr/smb/module.py b/src/pybind/mgr/smb/module.py index fcaf2d3d67001..34bab3c82a046 100644 --- a/src/pybind/mgr/smb/module.py +++ b/src/pybind/mgr/smb/module.py @@ -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 -- 2.39.5