From 20a22447af47646f4f098b073868780cb0b2dd05 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 2 Sep 2022 11:36:53 -0400 Subject: [PATCH] mgr/nfs: add --sectype flag to nfs export create functions Fixes: https://tracker.ceph.com/issues/57404 Add the sectype argument, also for use as a CLI option, to the functions that create nfs exports. NFS Ganesha can use the sectype configuration option to decide what kind of security will be applied/required for connection to an export. NOTE: This option is only useful when Ganesha is configured along with LDAP/Kerberos integration. Configuration of that integration is outside the scope of these patches. Signed-off-by: John Mulligan (cherry picked from commit 11affedea600360afd1ee7e3bb62c51f7b423a67) --- src/pybind/mgr/nfs/module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py index ef4868d42e719..340792e81b33b 100644 --- a/src/pybind/mgr/nfs/module.py +++ b/src/pybind/mgr/nfs/module.py @@ -34,6 +34,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): readonly: Optional[bool] = False, client_addr: Optional[List[str]] = None, squash: str = 'none', + sectype: Optional[List[str]] = None, ) -> Tuple[int, str, str]: """Create a CephFS export""" return self.export_mgr.create_export( @@ -45,6 +46,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): path=path, squash=squash, addr=client_addr, + sectype=sectype, ) @CLICommand('nfs export create rgw', perm='rw') @@ -57,6 +59,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): readonly: Optional[bool] = False, client_addr: Optional[List[str]] = None, squash: str = 'none', + sectype: Optional[List[str]] = None, ) -> Tuple[int, str, str]: """Create an RGW export""" return self.export_mgr.create_export( @@ -68,6 +71,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): read_only=readonly, squash=squash, addr=client_addr, + sectype=sectype, ) @CLICommand('nfs export rm', perm='rw') -- 2.39.5