We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 774ce9f commit cc7b69fCopy full SHA for cc7b69f
src/pybind/mgr/nfs/export.py
@@ -71,6 +71,17 @@ def normalize_path(path: str) -> str:
71
return path
72
73
74
+def validate_cephfs_path(mgr: 'Module', fs_name: str, path: str) -> None:
75
+ try:
76
+ cephfs_path_is_dir(mgr, fs_name, path)
77
+ except NotADirectoryError:
78
+ raise NFSException(f"path {path} is not a dir", -errno.ENOTDIR)
79
+ except cephfs.ObjectNotFound:
80
+ raise NFSObjectNotFound(f"path {path} does not exist")
81
+ except cephfs.Error as e:
82
+ raise NFSException(e.args[1], -e.args[0])
83
+
84
85
class NFSRados:
86
def __init__(self, rados: 'Rados', namespace: str) -> None:
87
self.rados = rados
0 commit comments