Skip to content

Commit

Permalink
Merge pull request #1075 from schakrava/959_admin_host
Browse files Browse the repository at this point in the history
Admin host should take precedence when it's same as the client(s). Fi…
  • Loading branch information
schakrava committed Dec 30, 2015
2 parents b37b8e0 + 66994e5 commit 4c0a998
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/rockstor/storageadmin/views/nfs_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ def client_input(export):
ci = {'client_str': eg.host_str,
'option_list': ('%s,%s,%s' % (eg.editable, eg.syncable,
eg.mount_security))}
if (eg.nohide):
ci['option_list'] = ('%s,nohide' % ci['option_list'])

ci['mnt_pt'] = export.mount.replace(settings.NFS_EXPORT_ROOT,
settings.MNT_PT)
if (eg.admin_host is not None):
ci['admin_host'] = eg.admin_host
if (eg.admin_host == eg.host_str):
ci['option_list'] = ('rw,no_root_squash,%s,%s' %
(eg.syncable, eg.mount_security))
else:
ci['admin_host'] = eg.admin_host
if (eg.nohide):
ci['option_list'] = ('%s,nohide' % ci['option_list'])
return ci

@staticmethod
Expand Down

0 comments on commit 4c0a998

Please sign in to comment.