{"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments/37574509","id":37574509,"diff_hunk":"@@ -1622,6 +1623,30 @@ def setenforce(mode):\n     run('setenforce {0}'.format(mode))\n \n \n+def host_pings(host):\n+    \"\"\"This ensures the given IP/hostname pings succesfully.\n+\n+    :param host: A string. The IP or hostname of host.\n+\n+    \"\"\"\n+    if host is None:\n+        print(\"The hostname/IP is not provided to ping. \\\n+        Terminating the execution !!\")\n+        sys.exit(1)\n+    while True:\n+        command = subprocess.Popen(\n+            'ping -c1 {0}'.format(host),\n+            stdout=subprocess.PIPE,\n+            stderr=subprocess.PIPE,\n+            shell=True\n+        )\n+        output = command.communicate()[0]\n+        if '1 received' in output:","path":"automation_tools/__init__.py","position":30,"original_position":30,"commit_id":"a72c087e45e523d60f824e064ddc7b6192170ef5","original_commit_id":"a72c087e45e523d60f824e064ddc7b6192170ef5","user":{"login":"elyezer","id":48132,"avatar_url":"https://avatars.githubusercontent.com/u/48132?v=3","gravatar_id":"","url":"https://api.github.com/users/elyezer","html_url":"https://github.com/elyezer","followers_url":"https://api.github.com/users/elyezer/followers","following_url":"https://api.github.com/users/elyezer/following{/other_user}","gists_url":"https://api.github.com/users/elyezer/gists{/gist_id}","starred_url":"https://api.github.com/users/elyezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyezer/subscriptions","organizations_url":"https://api.github.com/users/elyezer/orgs","repos_url":"https://api.github.com/users/elyezer/repos","events_url":"https://api.github.com/users/elyezer/events{/privacy}","received_events_url":"https://api.github.com/users/elyezer/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-08-20T20:02:08Z","updated_at":"2015-08-20T20:02:08Z","html_url":"https://github.com/SatelliteQE/automation-tools/pull/225#discussion_r37574509","pull_request_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments/37574509"},"html":{"href":"https://github.com/SatelliteQE/automation-tools/pull/225#discussion_r37574509"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225","id":42917439,"html_url":"https://github.com/SatelliteQE/automation-tools/pull/225","diff_url":"https://github.com/SatelliteQE/automation-tools/pull/225.diff","patch_url":"https://github.com/SatelliteQE/automation-tools/pull/225.patch","issue_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/225","number":225,"state":"open","locked":false,"title":"Static delay removed to resolve the DNS","user":{"login":"jyejare","id":11752425,"avatar_url":"https://avatars.githubusercontent.com/u/11752425?v=3","gravatar_id":"","url":"https://api.github.com/users/jyejare","html_url":"https://github.com/jyejare","followers_url":"https://api.github.com/users/jyejare/followers","following_url":"https://api.github.com/users/jyejare/following{/other_user}","gists_url":"https://api.github.com/users/jyejare/gists{/gist_id}","starred_url":"https://api.github.com/users/jyejare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyejare/subscriptions","organizations_url":"https://api.github.com/users/jyejare/orgs","repos_url":"https://api.github.com/users/jyejare/repos","events_url":"https://api.github.com/users/jyejare/events{/privacy}","received_events_url":"https://api.github.com/users/jyejare/received_events","type":"User","site_admin":false},"body":"In this PR, the static delay has been removed/replaced by host_pings method\r\n\r\nEarlier there was fix wait time of 10 minutes to resolve the DNS, which is now replaced by pinging the IP and then pinging the hostname retrieved by IP.\r\n\r\nThis surely makes run upgrade automation faster. :)","created_at":"2015-08-20T11:11:16Z","updated_at":"2015-08-20T20:02:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bdfa6931523d12b64945b3e01c8a653339c7389","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225/comments","review_comment_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/225/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/a72c087e45e523d60f824e064ddc7b6192170ef5","head":{"label":"jyejare:Upgrade_Improve","ref":"Upgrade_Improve","sha":"a72c087e45e523d60f824e064ddc7b6192170ef5","user":{"login":"jyejare","id":11752425,"avatar_url":"https://avatars.githubusercontent.com/u/11752425?v=3","gravatar_id":"","url":"https://api.github.com/users/jyejare","html_url":"https://github.com/jyejare","followers_url":"https://api.github.com/users/jyejare/followers","following_url":"https://api.github.com/users/jyejare/following{/other_user}","gists_url":"https://api.github.com/users/jyejare/gists{/gist_id}","starred_url":"https://api.github.com/users/jyejare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyejare/subscriptions","organizations_url":"https://api.github.com/users/jyejare/orgs","repos_url":"https://api.github.com/users/jyejare/repos","events_url":"https://api.github.com/users/jyejare/events{/privacy}","received_events_url":"https://api.github.com/users/jyejare/received_events","type":"User","site_admin":false},"repo":{"id":37851466,"name":"automation-tools","full_name":"jyejare/automation-tools","owner":{"login":"jyejare","id":11752425,"avatar_url":"https://avatars.githubusercontent.com/u/11752425?v=3","gravatar_id":"","url":"https://api.github.com/users/jyejare","html_url":"https://github.com/jyejare","followers_url":"https://api.github.com/users/jyejare/followers","following_url":"https://api.github.com/users/jyejare/following{/other_user}","gists_url":"https://api.github.com/users/jyejare/gists{/gist_id}","starred_url":"https://api.github.com/users/jyejare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyejare/subscriptions","organizations_url":"https://api.github.com/users/jyejare/orgs","repos_url":"https://api.github.com/users/jyejare/repos","events_url":"https://api.github.com/users/jyejare/events{/privacy}","received_events_url":"https://api.github.com/users/jyejare/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jyejare/automation-tools","description":"A set of tools to help automating testing Foreman with Robottelo (https://github.com/SatelliteQE/robottelo)","fork":true,"url":"https://api.github.com/repos/jyejare/automation-tools","forks_url":"https://api.github.com/repos/jyejare/automation-tools/forks","keys_url":"https://api.github.com/repos/jyejare/automation-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jyejare/automation-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jyejare/automation-tools/teams","hooks_url":"https://api.github.com/repos/jyejare/automation-tools/hooks","issue_events_url":"https://api.github.com/repos/jyejare/automation-tools/issues/events{/number}","events_url":"https://api.github.com/repos/jyejare/automation-tools/events","assignees_url":"https://api.github.com/repos/jyejare/automation-tools/assignees{/user}","branches_url":"https://api.github.com/repos/jyejare/automation-tools/branches{/branch}","tags_url":"https://api.github.com/repos/jyejare/automation-tools/tags","blobs_url":"https://api.github.com/repos/jyejare/automation-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jyejare/automation-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jyejare/automation-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jyejare/automation-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jyejare/automation-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/jyejare/automation-tools/languages","stargazers_url":"https://api.github.com/repos/jyejare/automation-tools/stargazers","contributors_url":"https://api.github.com/repos/jyejare/automation-tools/contributors","subscribers_url":"https://api.github.com/repos/jyejare/automation-tools/subscribers","subscription_url":"https://api.github.com/repos/jyejare/automation-tools/subscription","commits_url":"https://api.github.com/repos/jyejare/automation-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jyejare/automation-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jyejare/automation-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jyejare/automation-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jyejare/automation-tools/contents/{+path}","compare_url":"https://api.github.com/repos/jyejare/automation-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jyejare/automation-tools/merges","archive_url":"https://api.github.com/repos/jyejare/automation-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jyejare/automation-tools/downloads","issues_url":"https://api.github.com/repos/jyejare/automation-tools/issues{/number}","pulls_url":"https://api.github.com/repos/jyejare/automation-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/jyejare/automation-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/jyejare/automation-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jyejare/automation-tools/labels{/name}","releases_url":"https://api.github.com/repos/jyejare/automation-tools/releases{/id}","created_at":"2015-06-22T11:23:46Z","updated_at":"2015-06-22T11:23:47Z","pushed_at":"2015-08-20T11:05:58Z","git_url":"git://github.com/jyejare/automation-tools.git","ssh_url":"git@github.com:jyejare/automation-tools.git","clone_url":"https://github.com/jyejare/automation-tools.git","svn_url":"https://github.com/jyejare/automation-tools","homepage":"","size":467,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"master"}},"base":{"label":"SatelliteQE:master","ref":"master","sha":"fe6a7ca1514078f8fdf7fa31f84a3bdcc7fdadea","user":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"repo":{"id":22513327,"name":"automation-tools","full_name":"SatelliteQE/automation-tools","owner":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SatelliteQE/automation-tools","description":"A set of tools to help automating testing Foreman with Robottelo (https://github.com/SatelliteQE/robottelo)","fork":false,"url":"https://api.github.com/repos/SatelliteQE/automation-tools","forks_url":"https://api.github.com/repos/SatelliteQE/automation-tools/forks","keys_url":"https://api.github.com/repos/SatelliteQE/automation-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SatelliteQE/automation-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SatelliteQE/automation-tools/teams","hooks_url":"https://api.github.com/repos/SatelliteQE/automation-tools/hooks","issue_events_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/events{/number}","events_url":"https://api.github.com/repos/SatelliteQE/automation-tools/events","assignees_url":"https://api.github.com/repos/SatelliteQE/automation-tools/assignees{/user}","branches_url":"https://api.github.com/repos/SatelliteQE/automation-tools/branches{/branch}","tags_url":"https://api.github.com/repos/SatelliteQE/automation-tools/tags","blobs_url":"https://api.github.com/repos/SatelliteQE/automation-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SatelliteQE/automation-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SatelliteQE/automation-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/SatelliteQE/automation-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/SatelliteQE/automation-tools/languages","stargazers_url":"https://api.github.com/repos/SatelliteQE/automation-tools/stargazers","contributors_url":"https://api.github.com/repos/SatelliteQE/automation-tools/contributors","subscribers_url":"https://api.github.com/repos/SatelliteQE/automation-tools/subscribers","subscription_url":"https://api.github.com/repos/SatelliteQE/automation-tools/subscription","commits_url":"https://api.github.com/repos/SatelliteQE/automation-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/SatelliteQE/automation-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/SatelliteQE/automation-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/SatelliteQE/automation-tools/contents/{+path}","compare_url":"https://api.github.com/repos/SatelliteQE/automation-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SatelliteQE/automation-tools/merges","archive_url":"https://api.github.com/repos/SatelliteQE/automation-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SatelliteQE/automation-tools/downloads","issues_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues{/number}","pulls_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/SatelliteQE/automation-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/SatelliteQE/automation-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SatelliteQE/automation-tools/labels{/name}","releases_url":"https://api.github.com/repos/SatelliteQE/automation-tools/releases{/id}","created_at":"2014-08-01T14:27:34Z","updated_at":"2015-05-20T03:49:25Z","pushed_at":"2015-08-20T11:11:16Z","git_url":"git://github.com/SatelliteQE/automation-tools.git","ssh_url":"git@github.com:SatelliteQE/automation-tools.git","clone_url":"https://github.com/SatelliteQE/automation-tools.git","svn_url":"https://github.com/SatelliteQE/automation-tools","homepage":"","size":1548,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":10,"forks":14,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225"},"html":{"href":"https://github.com/SatelliteQE/automation-tools/pull/225"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/225"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225/comments"},"review_comment":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/225/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/a72c087e45e523d60f824e064ddc7b6192170ef5"}}}}