Skip to content

Commit dd5a47f

Browse files
mgr/nfs: remove redundant check
Remove the extra check of the cluster id from _apply method. As _apply is a "private" method that should be only called from other private methods that have already validated the cluster_id. It also removes a dependency on the orch-requiring func available_clusters. Signed-off-by: John Mulligan <[email protected]>
1 parent daa455c commit dd5a47f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/pybind/mgr/nfs/export.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
from mgr_module import NFS_POOL_NAME as POOL_NAME, NFS_GANESHA_SUPPORTED_FSALS
2121

2222
from .export_utils import GaneshaConfParser, Export, RawBlock, CephFSFSAL, RGWFSAL
23-
from .exception import NFSException, NFSInvalidOperation, FSNotFound, \
24-
ClusterNotFound
23+
from .exception import NFSException, NFSInvalidOperation, FSNotFound
2524
from .utils import (
2625
CONF_PREFIX,
2726
EXPORT_PREFIX,
@@ -716,8 +715,6 @@ def _apply_export(
716715
for k in ['path', 'pseudo']:
717716
if k not in new_export_dict:
718717
raise NFSInvalidOperation(f'Export missing required field {k}')
719-
if cluster_id not in available_clusters(self.mgr):
720-
raise ClusterNotFound()
721718
if cluster_id not in self.exports:
722719
self.exports[cluster_id] = []
723720

0 commit comments

Comments
 (0)