summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/nfs/module.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/nfs/module.py')
-rw-r--r--src/pybind/mgr/nfs/module.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py
index be43112f396..80490ac8e7f 100644
--- a/src/pybind/mgr/nfs/module.py
+++ b/src/pybind/mgr/nfs/module.py
@@ -6,6 +6,7 @@ from mgr_module import MgrModule, CLICommand, Option, CLICheckNonemptyFileInput
import object_format
import orchestrator
from orchestrator.module import IngressType
+from mgr_util import CephFSEarmarkResolver
from .export import ExportMgr, AppliedExportResults
from .cluster import NFSCluster
@@ -41,6 +42,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
cmount_path: Optional[str] = "/"
) -> Dict[str, Any]:
"""Create a CephFS export"""
+ earmark_resolver = CephFSEarmarkResolver(self)
return self.export_mgr.create_export(
fsal_type='cephfs',
fs_name=fsname,
@@ -51,7 +53,8 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
squash=squash,
addr=client_addr,
sectype=sectype,
- cmount_path=cmount_path
+ cmount_path=cmount_path,
+ earmark_resolver=earmark_resolver
)
@CLICommand('nfs export create rgw', perm='rw')
@@ -114,8 +117,10 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
@CLICheckNonemptyFileInput(desc='Export JSON or Ganesha EXPORT specification')
@object_format.Responder()
def _cmd_nfs_export_apply(self, cluster_id: str, inbuf: str) -> AppliedExportResults:
+ earmark_resolver = CephFSEarmarkResolver(self)
"""Create or update an export by `-i <json_or_ganesha_export_file>`"""
- return self.export_mgr.apply_export(cluster_id, export_config=inbuf)
+ return self.export_mgr.apply_export(cluster_id, export_config=inbuf,
+ earmark_resolver=earmark_resolver)
@CLICommand('nfs cluster create', perm='rw')
@object_format.EmptyResponder()