]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/nfs/utils: changes to helper func to check cephfs path
authorDhairya Parmar <dparmar@redhat.com>
Tue, 11 Apr 2023 10:06:52 +0000 (15:36 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Wed, 26 Apr 2023 10:20:18 +0000 (15:50 +0530)
commitf3d737093fed625ef9ae85f4e11b3630b2a45e56
tree520806db1ec89966df83dde206e20f9acf64f997
parent477d70cbdb7bd430d0bb982448da1cc093199076
mgr/nfs/utils: changes to helper func to check cephfs path

- Renamed to cephfs_path_is_dir

- Removed exception handling to prevent redundant log statements like:
   "No such file or directory error in stat: b'/mnt/testdir_symlink': No such file or directory [Errno 2]"

  Exceptions handled inside caller eliminates this redundancy

- Set modifier flag AT_SYMLINK_NOFOLLOW

- Removed string "{path} is not a dir" when raising NotADirectoryError
  Rationale: will be handled in export.py

- change mock to cephfs_path_is_dir

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/pybind/mgr/nfs/tests/test_nfs.py
src/pybind/mgr/nfs/utils.py