{"action":"created","comment":{"url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/comments/53964157","id":53964157,"diff_hunk":"@@ -127,6 +117,28 @@ def ifupdown(iface, up):\n                          % iface)\n \n \n+def dhclient(iface, enable, script=None):\n+    # Disable the dhcp client and flush interface\n+    try:\n+        dhclients = sh.awk(\n+            sh.grep(\n+                sh.grep(sh.ps(\"ax\"), iface, _timeout=5),\n+                \"dhclient\", _timeout=5),\n+            \"{print $1}\")\n+        dhclients = dhclients.split()\n+        for dhclient in dhclients:\n+            sh.kill(dhclient)\n+    except Exception as e:\n+        _logger.info(\"Failed to stop dhclient: %s\" % e)\n+        pass\n+\n+    if enable:\n+        if script:\n+            sh.dhclient(\"-nw\", \"-sf\", script, iface, _bg=True)\n+        else:\n+            sh.dhclient(\"-nw\", iface, _bg=True)","path":"ip/addr.py","position":51,"original_position":51,"commit_id":"891c0b0c92a9458e436096ca659b69a83044e0ae","original_commit_id":"891c0b0c92a9458e436096ca659b69a83044e0ae","user":{"login":"imZack","id":690703,"avatar_url":"https://avatars.githubusercontent.com/u/690703?v=3","gravatar_id":"","url":"https://api.github.com/users/imZack","html_url":"https://github.com/imZack","followers_url":"https://api.github.com/users/imZack/followers","following_url":"https://api.github.com/users/imZack/following{/other_user}","gists_url":"https://api.github.com/users/imZack/gists{/gist_id}","starred_url":"https://api.github.com/users/imZack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imZack/subscriptions","organizations_url":"https://api.github.com/users/imZack/orgs","repos_url":"https://api.github.com/users/imZack/repos","events_url":"https://api.github.com/users/imZack/events{/privacy}","received_events_url":"https://api.github.com/users/imZack/received_events","type":"User","site_admin":false},"body":"should we have a timeout here?","created_at":"2016-02-24T16:24:59Z","updated_at":"2016-02-24T16:24:59Z","html_url":"https://github.com/Sanji-IO/sanji-bundle-route/pull/30#discussion_r53964157","pull_request_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/comments/53964157"},"html":{"href":"https://github.com/Sanji-IO/sanji-bundle-route/pull/30#discussion_r53964157"},"pull_request":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30","id":60482391,"html_url":"https://github.com/Sanji-IO/sanji-bundle-route/pull/30","diff_url":"https://github.com/Sanji-IO/sanji-bundle-route/pull/30.diff","patch_url":"https://github.com/Sanji-IO/sanji-bundle-route/pull/30.patch","issue_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues/30","number":30,"state":"open","locked":false,"title":"Update dhclient to non-blocking mode","user":{"login":"lwindg","id":8893829,"avatar_url":"https://avatars.githubusercontent.com/u/8893829?v=3","gravatar_id":"","url":"https://api.github.com/users/lwindg","html_url":"https://github.com/lwindg","followers_url":"https://api.github.com/users/lwindg/followers","following_url":"https://api.github.com/users/lwindg/following{/other_user}","gists_url":"https://api.github.com/users/lwindg/gists{/gist_id}","starred_url":"https://api.github.com/users/lwindg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwindg/subscriptions","organizations_url":"https://api.github.com/users/lwindg/orgs","repos_url":"https://api.github.com/users/lwindg/repos","events_url":"https://api.github.com/users/lwindg/events{/privacy}","received_events_url":"https://api.github.com/users/lwindg/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-24T09:54:00Z","updated_at":"2016-02-24T16:24:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"937b779f860ba22ca61ff7949f4ca5ba4b0482ae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30/commits","review_comments_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30/comments","review_comment_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues/30/comments","statuses_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/statuses/891c0b0c92a9458e436096ca659b69a83044e0ae","head":{"label":"lwindg:develop","ref":"develop","sha":"891c0b0c92a9458e436096ca659b69a83044e0ae","user":{"login":"lwindg","id":8893829,"avatar_url":"https://avatars.githubusercontent.com/u/8893829?v=3","gravatar_id":"","url":"https://api.github.com/users/lwindg","html_url":"https://github.com/lwindg","followers_url":"https://api.github.com/users/lwindg/followers","following_url":"https://api.github.com/users/lwindg/following{/other_user}","gists_url":"https://api.github.com/users/lwindg/gists{/gist_id}","starred_url":"https://api.github.com/users/lwindg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwindg/subscriptions","organizations_url":"https://api.github.com/users/lwindg/orgs","repos_url":"https://api.github.com/users/lwindg/repos","events_url":"https://api.github.com/users/lwindg/events{/privacy}","received_events_url":"https://api.github.com/users/lwindg/received_events","type":"User","site_admin":false},"repo":{"id":27418473,"name":"sanji-bundle-routes","full_name":"lwindg/sanji-bundle-routes","owner":{"login":"lwindg","id":8893829,"avatar_url":"https://avatars.githubusercontent.com/u/8893829?v=3","gravatar_id":"","url":"https://api.github.com/users/lwindg","html_url":"https://github.com/lwindg","followers_url":"https://api.github.com/users/lwindg/followers","following_url":"https://api.github.com/users/lwindg/following{/other_user}","gists_url":"https://api.github.com/users/lwindg/gists{/gist_id}","starred_url":"https://api.github.com/users/lwindg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwindg/subscriptions","organizations_url":"https://api.github.com/users/lwindg/orgs","repos_url":"https://api.github.com/users/lwindg/repos","events_url":"https://api.github.com/users/lwindg/events{/privacy}","received_events_url":"https://api.github.com/users/lwindg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lwindg/sanji-bundle-routes","description":"","fork":true,"url":"https://api.github.com/repos/lwindg/sanji-bundle-routes","forks_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/forks","keys_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/teams","hooks_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/hooks","issue_events_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/issues/events{/number}","events_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/events","assignees_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/assignees{/user}","branches_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/branches{/branch}","tags_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/tags","blobs_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/git/refs{/sha}","trees_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/statuses/{sha}","languages_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/languages","stargazers_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/stargazers","contributors_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/contributors","subscribers_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/subscribers","subscription_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/subscription","commits_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/commits{/sha}","git_commits_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/git/commits{/sha}","comments_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/comments{/number}","issue_comment_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/issues/comments{/number}","contents_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/contents/{+path}","compare_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/merges","archive_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/downloads","issues_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/issues{/number}","pulls_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/pulls{/number}","milestones_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/milestones{/number}","notifications_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/labels{/name}","releases_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/releases{/id}","deployments_url":"https://api.github.com/repos/lwindg/sanji-bundle-routes/deployments","created_at":"2014-12-02T06:24:38Z","updated_at":"2016-01-11T09:53:03Z","pushed_at":"2016-02-24T08:44:54Z","git_url":"git://github.com/lwindg/sanji-bundle-routes.git","ssh_url":"git@github.com:lwindg/sanji-bundle-routes.git","clone_url":"https://github.com/lwindg/sanji-bundle-routes.git","svn_url":"https://github.com/lwindg/sanji-bundle-routes","homepage":null,"size":78,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Sanji-IO:develop","ref":"develop","sha":"66d215d0483e9c60f3ed89e5f9003c6433ec1dfa","user":{"login":"Sanji-IO","id":8855714,"avatar_url":"https://avatars.githubusercontent.com/u/8855714?v=3","gravatar_id":"","url":"https://api.github.com/users/Sanji-IO","html_url":"https://github.com/Sanji-IO","followers_url":"https://api.github.com/users/Sanji-IO/followers","following_url":"https://api.github.com/users/Sanji-IO/following{/other_user}","gists_url":"https://api.github.com/users/Sanji-IO/gists{/gist_id}","starred_url":"https://api.github.com/users/Sanji-IO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sanji-IO/subscriptions","organizations_url":"https://api.github.com/users/Sanji-IO/orgs","repos_url":"https://api.github.com/users/Sanji-IO/repos","events_url":"https://api.github.com/users/Sanji-IO/events{/privacy}","received_events_url":"https://api.github.com/users/Sanji-IO/received_events","type":"Organization","site_admin":false},"repo":{"id":27162903,"name":"sanji-bundle-route","full_name":"Sanji-IO/sanji-bundle-route","owner":{"login":"Sanji-IO","id":8855714,"avatar_url":"https://avatars.githubusercontent.com/u/8855714?v=3","gravatar_id":"","url":"https://api.github.com/users/Sanji-IO","html_url":"https://github.com/Sanji-IO","followers_url":"https://api.github.com/users/Sanji-IO/followers","following_url":"https://api.github.com/users/Sanji-IO/following{/other_user}","gists_url":"https://api.github.com/users/Sanji-IO/gists{/gist_id}","starred_url":"https://api.github.com/users/Sanji-IO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sanji-IO/subscriptions","organizations_url":"https://api.github.com/users/Sanji-IO/orgs","repos_url":"https://api.github.com/users/Sanji-IO/repos","events_url":"https://api.github.com/users/Sanji-IO/events{/privacy}","received_events_url":"https://api.github.com/users/Sanji-IO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sanji-IO/sanji-bundle-route","description":"Default routes","fork":false,"url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route","forks_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/forks","keys_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/teams","hooks_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/hooks","issue_events_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues/events{/number}","events_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/events","assignees_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/assignees{/user}","branches_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/branches{/branch}","tags_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/tags","blobs_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/statuses/{sha}","languages_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/languages","stargazers_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/stargazers","contributors_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/contributors","subscribers_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/subscribers","subscription_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/subscription","commits_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/contents/{+path}","compare_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/merges","archive_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/downloads","issues_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues{/number}","pulls_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls{/number}","milestones_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/milestones{/number}","notifications_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/labels{/name}","releases_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/releases{/id}","deployments_url":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/deployments","created_at":"2014-11-26T06:29:01Z","updated_at":"2016-01-11T10:28:35Z","pushed_at":"2016-02-24T09:54:02Z","git_url":"git://github.com/Sanji-IO/sanji-bundle-route.git","ssh_url":"git@github.com:Sanji-IO/sanji-bundle-route.git","clone_url":"https://github.com/Sanji-IO/sanji-bundle-route.git","svn_url":"https://github.com/Sanji-IO/sanji-bundle-route","homepage":"","size":94,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30"},"html":{"href":"https://github.com/Sanji-IO/sanji-bundle-route/pull/30"},"issue":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues/30"},"comments":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/Sanji-IO/sanji-bundle-route/statuses/891c0b0c92a9458e436096ca659b69a83044e0ae"}}}}