]> 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>
Tue, 2 May 2023 10:10:07 +0000 (15:40 +0530)
commit03ba2d4c6f5d2d06a7d96b29530d7657b8be215f
tree5d6aa3cfbb9ee4464d424169c7fd4d258fc5fb3e
parent621afba62df866bbbf8e0adbb4614510e3337d45
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>
(cherry picked from commit f3d737093fed625ef9ae85f4e11b3630b2a45e56)
src/pybind/mgr/nfs/tests/test_nfs.py
src/pybind/mgr/nfs/utils.py