Skip to content

Commit

Permalink
CP-38283: allow any NFS 4.x version
Browse files Browse the repository at this point in the history
Allow to explicitly set any 4.x versions with nfsversion= for testing
purposes.
Note that we do not yet support NFS version >4.1 for production use.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
  • Loading branch information
edwintorok authored and MarkSymsCtx committed Oct 4, 2021
1 parent e121864 commit 6fbff68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def validate_nfsversion(nfsversion):
if not nfsversion:
nfsversion = DEFAULT_NFSVERSION
else:
if nfsversion not in ['3', '4', '4.0', '4.1']:
if not (nfsversion == '3' or nfsversion.startswith('4')):
raise NfsException("Invalid nfsversion.")
return nfsversion

Expand Down
2 changes: 1 addition & 1 deletion tests/test_nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_validate_nfsversion_default(self):
self.assertEquals(nfs.validate_nfsversion(thenfsversion), '3')

def test_validate_nfsversion_valid(self):
for thenfsversion in ['3', '4', '4.0', '4.1']:
for thenfsversion in ['3', '4', '4.0', '4.1', '4.2']:
self.assertEquals(nfs.validate_nfsversion(thenfsversion),
thenfsversion)

Expand Down

0 comments on commit 6fbff68

Please sign in to comment.