{"action":"created","comment":{"url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/comments/244563042","pull_request_review_id":188471055,"id":244563042,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDU2MzA0Mg==","diff_hunk":"@@ -99,32 +129,58 @@ def _load(self):\n \n     @property\n     def exports(self):\n+        \"\"\"\n+        list shared directories\n+        \"\"\"\n         if self._exports is None:\n             self._load()\n         return self._exports\n \n     def add(self, path):\n+        \"\"\"\n+        add shared directory\n+        @param path: directory path\n+                     type: string\n+        \"\"\"\n+        for export in self.exports:\n+            if export.path == path:\n+                raise NFSError(\"Path {} is already added\".format(path))\n+\n         export = NFSExport(path)\n         self.exports.append(export)\n         return export\n \n     def delete(self, path):\n+        \"\"\"\n+        delete path from shared directories\n+        @param path: directory path\n+                     type: string\n+        \"\"\"\n         for i in range(len(self.exports) - 1, -1, -1):\n             export = self.exports[i]\n             if export.path == path:\n                 self.exports.pop(i)\n+                break\n+        else:\n+            raise NFSError(\"Path {} is not found\".format(path))\n \n     def erase(self):\n+        \"\"\"\n+        delete all shared directories\n+        \"\"\"\n         self._exports = []\n \n     def commit(self):\n+        \"\"\"\n+        apply changes to shared directories\n+        \"\"\"\n         buf = list()\n         for export in self.exports:\n             buf.append(export.__str__())\n \n         EXPORTS_FILE.write_text(\"\\n\".join(buf))\n         EXPORTS_FILE.chmod(644)\n-        try:\n-            self._executor.execute('service nfs-kernel-server reload')\n-        except Exception as e:\n-            raise NFSError(e)\n+        response = run('service nfs-kernel-server reload', shell=True, universal_newlines=True, stdout=PIPE, stderr=PIPE)\n+        if response.stderr:\n+            raise NFSError(response.stderr.strip())\n+        return response.stdout.strip()","path":"Jumpscale/sal/nfs/NFS.py","position":163,"original_position":163,"commit_id":"549e2f0f99ac3a28c4d0e687a625275037f0c46e","original_commit_id":"549e2f0f99ac3a28c4d0e687a625275037f0c46e","user":{"login":"serboctor","id":6323012,"node_id":"MDQ6VXNlcjYzMjMwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6323012?v=4","gravatar_id":"","url":"https://api.github.com/users/serboctor","html_url":"https://github.com/serboctor","followers_url":"https://api.github.com/users/serboctor/followers","following_url":"https://api.github.com/users/serboctor/following{/other_user}","gists_url":"https://api.github.com/users/serboctor/gists{/gist_id}","starred_url":"https://api.github.com/users/serboctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serboctor/subscriptions","organizations_url":"https://api.github.com/users/serboctor/orgs","repos_url":"https://api.github.com/users/serboctor/repos","events_url":"https://api.github.com/users/serboctor/events{/privacy}","received_events_url":"https://api.github.com/users/serboctor/received_events","type":"User","site_admin":false},"body":"No new line at the end of the file","created_at":"2018-12-31T08:37:21Z","updated_at":"2018-12-31T08:38:15Z","html_url":"https://github.com/threefoldtech/jumpscaleX/pull/98#discussion_r244563042","pull_request_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/comments/244563042"},"html":{"href":"https://github.com/threefoldtech/jumpscaleX/pull/98#discussion_r244563042"},"pull_request":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98","id":240879641,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwODc5NjQx","html_url":"https://github.com/threefoldtech/jumpscaleX/pull/98","diff_url":"https://github.com/threefoldtech/jumpscaleX/pull/98.diff","patch_url":"https://github.com/threefoldtech/jumpscaleX/pull/98.patch","issue_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/98","number":98,"state":"open","locked":false,"title":"edit NFS","user":{"login":"AhmedHanafy725","id":41957921,"node_id":"MDQ6VXNlcjQxOTU3OTIx","avatar_url":"https://avatars3.githubusercontent.com/u/41957921?v=4","gravatar_id":"","url":"https://api.github.com/users/AhmedHanafy725","html_url":"https://github.com/AhmedHanafy725","followers_url":"https://api.github.com/users/AhmedHanafy725/followers","following_url":"https://api.github.com/users/AhmedHanafy725/following{/other_user}","gists_url":"https://api.github.com/users/AhmedHanafy725/gists{/gist_id}","starred_url":"https://api.github.com/users/AhmedHanafy725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AhmedHanafy725/subscriptions","organizations_url":"https://api.github.com/users/AhmedHanafy725/orgs","repos_url":"https://api.github.com/users/AhmedHanafy725/repos","events_url":"https://api.github.com/users/AhmedHanafy725/events{/privacy}","received_events_url":"https://api.github.com/users/AhmedHanafy725/received_events","type":"User","site_admin":false},"body":"Resolves: https://github.com/threefoldtech/jumpscaleX/issues/60\r\n### Description\r\nrefactor NFS","created_at":"2018-12-25T14:52:57Z","updated_at":"2018-12-31T08:38:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6544216f7dad64f845663693f5f283c826400546","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98/commits","review_comments_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98/comments","review_comment_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/comments{/number}","comments_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/98/comments","statuses_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/statuses/549e2f0f99ac3a28c4d0e687a625275037f0c46e","head":{"label":"threefoldtech:sal_nfs","ref":"sal_nfs","sha":"549e2f0f99ac3a28c4d0e687a625275037f0c46e","user":{"login":"threefoldtech","id":41825953,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODI1OTUz","avatar_url":"https://avatars1.githubusercontent.com/u/41825953?v=4","gravatar_id":"","url":"https://api.github.com/users/threefoldtech","html_url":"https://github.com/threefoldtech","followers_url":"https://api.github.com/users/threefoldtech/followers","following_url":"https://api.github.com/users/threefoldtech/following{/other_user}","gists_url":"https://api.github.com/users/threefoldtech/gists{/gist_id}","starred_url":"https://api.github.com/users/threefoldtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threefoldtech/subscriptions","organizations_url":"https://api.github.com/users/threefoldtech/orgs","repos_url":"https://api.github.com/users/threefoldtech/repos","events_url":"https://api.github.com/users/threefoldtech/events{/privacy}","received_events_url":"https://api.github.com/users/threefoldtech/received_events","type":"Organization","site_admin":false},"repo":{"id":162375444,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIzNzU0NDQ=","name":"jumpscaleX","full_name":"threefoldtech/jumpscaleX","private":false,"owner":{"login":"threefoldtech","id":41825953,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODI1OTUz","avatar_url":"https://avatars1.githubusercontent.com/u/41825953?v=4","gravatar_id":"","url":"https://api.github.com/users/threefoldtech","html_url":"https://github.com/threefoldtech","followers_url":"https://api.github.com/users/threefoldtech/followers","following_url":"https://api.github.com/users/threefoldtech/following{/other_user}","gists_url":"https://api.github.com/users/threefoldtech/gists{/gist_id}","starred_url":"https://api.github.com/users/threefoldtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threefoldtech/subscriptions","organizations_url":"https://api.github.com/users/threefoldtech/orgs","repos_url":"https://api.github.com/users/threefoldtech/repos","events_url":"https://api.github.com/users/threefoldtech/events{/privacy}","received_events_url":"https://api.github.com/users/threefoldtech/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/threefoldtech/jumpscaleX","description":null,"fork":false,"url":"https://api.github.com/repos/threefoldtech/jumpscaleX","forks_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/forks","keys_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/keys{/key_id}","collaborators_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/teams","hooks_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/hooks","issue_events_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/events{/number}","events_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/events","assignees_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/assignees{/user}","branches_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/branches{/branch}","tags_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/tags","blobs_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/refs{/sha}","trees_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/trees{/sha}","statuses_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/statuses/{sha}","languages_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/languages","stargazers_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/stargazers","contributors_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/contributors","subscribers_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/subscribers","subscription_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/subscription","commits_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/commits{/sha}","git_commits_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/commits{/sha}","comments_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/comments{/number}","issue_comment_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/comments{/number}","contents_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/contents/{+path}","compare_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/compare/{base}...{head}","merges_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/merges","archive_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/downloads","issues_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues{/number}","pulls_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls{/number}","milestones_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/milestones{/number}","notifications_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/labels{/name}","releases_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/releases{/id}","deployments_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/deployments","created_at":"2018-12-19T03:03:43Z","updated_at":"2018-12-30T16:11:42Z","pushed_at":"2018-12-31T08:35:40Z","git_url":"git://github.com/threefoldtech/jumpscaleX.git","ssh_url":"git@github.com:threefoldtech/jumpscaleX.git","clone_url":"https://github.com/threefoldtech/jumpscaleX.git","svn_url":"https://github.com/threefoldtech/jumpscaleX","homepage":null,"size":6062,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":88,"watchers":0,"default_branch":"master"}},"base":{"label":"threefoldtech:master","ref":"master","sha":"d784af6a5d3aaeabb5b657b1792fe0db5d81e099","user":{"login":"threefoldtech","id":41825953,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODI1OTUz","avatar_url":"https://avatars1.githubusercontent.com/u/41825953?v=4","gravatar_id":"","url":"https://api.github.com/users/threefoldtech","html_url":"https://github.com/threefoldtech","followers_url":"https://api.github.com/users/threefoldtech/followers","following_url":"https://api.github.com/users/threefoldtech/following{/other_user}","gists_url":"https://api.github.com/users/threefoldtech/gists{/gist_id}","starred_url":"https://api.github.com/users/threefoldtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threefoldtech/subscriptions","organizations_url":"https://api.github.com/users/threefoldtech/orgs","repos_url":"https://api.github.com/users/threefoldtech/repos","events_url":"https://api.github.com/users/threefoldtech/events{/privacy}","received_events_url":"https://api.github.com/users/threefoldtech/received_events","type":"Organization","site_admin":false},"repo":{"id":162375444,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIzNzU0NDQ=","name":"jumpscaleX","full_name":"threefoldtech/jumpscaleX","private":false,"owner":{"login":"threefoldtech","id":41825953,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxODI1OTUz","avatar_url":"https://avatars1.githubusercontent.com/u/41825953?v=4","gravatar_id":"","url":"https://api.github.com/users/threefoldtech","html_url":"https://github.com/threefoldtech","followers_url":"https://api.github.com/users/threefoldtech/followers","following_url":"https://api.github.com/users/threefoldtech/following{/other_user}","gists_url":"https://api.github.com/users/threefoldtech/gists{/gist_id}","starred_url":"https://api.github.com/users/threefoldtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threefoldtech/subscriptions","organizations_url":"https://api.github.com/users/threefoldtech/orgs","repos_url":"https://api.github.com/users/threefoldtech/repos","events_url":"https://api.github.com/users/threefoldtech/events{/privacy}","received_events_url":"https://api.github.com/users/threefoldtech/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/threefoldtech/jumpscaleX","description":null,"fork":false,"url":"https://api.github.com/repos/threefoldtech/jumpscaleX","forks_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/forks","keys_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/keys{/key_id}","collaborators_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/teams","hooks_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/hooks","issue_events_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/events{/number}","events_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/events","assignees_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/assignees{/user}","branches_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/branches{/branch}","tags_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/tags","blobs_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/refs{/sha}","trees_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/trees{/sha}","statuses_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/statuses/{sha}","languages_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/languages","stargazers_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/stargazers","contributors_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/contributors","subscribers_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/subscribers","subscription_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/subscription","commits_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/commits{/sha}","git_commits_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/git/commits{/sha}","comments_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/comments{/number}","issue_comment_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/comments{/number}","contents_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/contents/{+path}","compare_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/compare/{base}...{head}","merges_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/merges","archive_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/downloads","issues_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues{/number}","pulls_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls{/number}","milestones_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/milestones{/number}","notifications_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/labels{/name}","releases_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/releases{/id}","deployments_url":"https://api.github.com/repos/threefoldtech/jumpscaleX/deployments","created_at":"2018-12-19T03:03:43Z","updated_at":"2018-12-30T16:11:42Z","pushed_at":"2018-12-31T08:35:40Z","git_url":"git://github.com/threefoldtech/jumpscaleX.git","ssh_url":"git@github.com:threefoldtech/jumpscaleX.git","clone_url":"https://github.com/threefoldtech/jumpscaleX.git","svn_url":"https://github.com/threefoldtech/jumpscaleX","homepage":null,"size":6062,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":88,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98"},"html":{"href":"https://github.com/threefoldtech/jumpscaleX/pull/98"},"issue":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/98"},"comments":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/threefoldtech/jumpscaleX/statuses/549e2f0f99ac3a28c4d0e687a625275037f0c46e"}},"author_association":"NONE"}}
{"actor":{"display_login":"serboctor"}}