def nfs_export_remove(req, host, path): found = False for e in Nfs.exports(): if e.host == host and e.path == path: Nfs.export_remove(e) found = True if not found: raise TargetdError(-400, "NFS export to remove not found %s:%s", (host, path))
def nfs_export_remove(req, host, path): found = False for e in Nfs.exports(): if e.host == host and e.path == path: Nfs.export_remove(e) found = True if not found: raise TargetdError( TargetdError.NOT_FOUND_NFS_EXPORT, "NFS export to remove not found %s:%s" % (host, path))
def nfs_export_list(req): rc = [] exports = Nfs.exports() for e in exports: rc.append(dict(host=e.host, path=e.path, options=e.options_list())) return rc