]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: add --sectype flag to nfs export create functions
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 2 Sep 2022 15:36:53 +0000 (11:36 -0400)
committerAdam King <adking@redhat.com>
Mon, 30 Jan 2023 23:42:04 +0000 (18:42 -0500)
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 <jmulligan@redhat.com>
(cherry picked from commit 11affedea600360afd1ee7e3bb62c51f7b423a67)

src/pybind/mgr/nfs/module.py

index ef4868d42e719b83354bd399db5a6785aafcff1b..340792e81b33b228a0dbecd600e9fc279b065c5e 100644 (file)
@@ -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')