Skip to content

Commit

Permalink
Allow the caller to limit NFS to specific host
Browse files Browse the repository at this point in the history
Add nfs_host to nfs.modify API
Add missing documentation
  • Loading branch information
ygalblum committed Oct 20, 2021
1 parent c8917a8 commit 645618e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cterasdk/edge/nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ def modify(
mountd_port=None,
statd_port=None,
nfsv4_enabled=None,
krb5_enabled=None):
krb5_enabled=None,
nfsd_host=None):
"""
Modify the FTP Configuration. Parameters that are not passed will not be affected
:param bool,optional async_write: If True, use asynchronous writes
:param bool,optional aggregate_writes: If True, aggregate write requests
:param int,optional mountd_port: Instruct mountd to bind to a specific port
:param int,optional statd_port: Instruct statd to bind to a specific port
:param bool,optional nfsv4_enabled: Enable NFSv4
:param bool,optional krb5_enabled: Enable Kerberos. Note that NFS4V must be enabled to enable Kerberos
:param str,optional nfsd_host: Instruct nfsd to bind to a specific network interface. Set to an empty string to clear
"""
config = self.get_configuration()
if config.mode != Mode.Enabled:
Expand All @@ -64,4 +70,6 @@ def modify(
if krb5_enabled and config.nfsv4enabled is not None and not config.nfsv4enabled:
raise CTERAException("NFSv4 must be enabled in order to enable Kerberos")
config.krb5 = krb5_enabled
if nfsd_host is not None:
config.nfsHost = nfsd_host
self._gateway.put('/config/fileservices/nfs', config)

0 comments on commit 645618e

Please sign in to comment.