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
)
@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
"""
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
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()
share_name: str = '',
subvolume: str = '',
readonly: bool = False,
- ) -> handler.Result:
+ ) -> results.Result:
"""Create an smb share"""
share = resources.Share(
cluster_id=cluster_id,
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