{"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments/38073415","id":38073415,"diff_hunk":"@@ -445,9 +445,19 @@ def install_puppet_scap_client():\n     run('yum -y install puppet-foreman_scap_client', warn_only=True)\n \n \n-def install_discovery_image():\n-    \"\"\"Task to install foreman discovery image.\"\"\"\n+def setup_foreman_discovery():\n+    \"\"\"Task to setup foreman discovery.\"\"\"\n+    admin_password = os.environ.get('ADMIN_PASSWORD', 'changeme')\n+    template_url = os.environ['PXE_DEFAULT_TEMPLATE_URL']\n+    template_file = run('mktemp')\n     run('yum -y install foreman-discovery-image', warn_only=True)\n+    run('wget -O {0} {1}'.format(template_file, template_url))\n+    run('sed -i -e \"s/SatelliteCapsule_URL/{0}/\" {1}'","path":"automation_tools/__init__.py","position":null,"original_position":13,"commit_id":"a49833e2af26d81a407eacee95d348d59f202b9a","original_commit_id":"a50aec173eeb858f9ffa95fa3b786cb3e48c62d5","user":{"login":"sghai","id":620852,"avatar_url":"https://avatars.githubusercontent.com/u/620852?v=3","gravatar_id":"","url":"https://api.github.com/users/sghai","html_url":"https://github.com/sghai","followers_url":"https://api.github.com/users/sghai/followers","following_url":"https://api.github.com/users/sghai/following{/other_user}","gists_url":"https://api.github.com/users/sghai/gists{/gist_id}","starred_url":"https://api.github.com/users/sghai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sghai/subscriptions","organizations_url":"https://api.github.com/users/sghai/orgs","repos_url":"https://api.github.com/users/sghai/repos","events_url":"https://api.github.com/users/sghai/events{/privacy}","received_events_url":"https://api.github.com/users/sghai/received_events","type":"User","site_admin":false},"body":"Updated.","created_at":"2015-08-27T08:38:42Z","updated_at":"2015-08-27T08:38:42Z","html_url":"https://github.com/SatelliteQE/automation-tools/pull/227#discussion_r38073415","pull_request_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments/38073415"},"html":{"href":"https://github.com/SatelliteQE/automation-tools/pull/227#discussion_r38073415"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227","id":43161152,"html_url":"https://github.com/SatelliteQE/automation-tools/pull/227","diff_url":"https://github.com/SatelliteQE/automation-tools/pull/227.diff","patch_url":"https://github.com/SatelliteQE/automation-tools/pull/227.patch","issue_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/227","number":227,"state":"open","locked":false,"title":"Updated  install_discovery_image task with setup_foreman_discovery","user":{"login":"sghai","id":620852,"avatar_url":"https://avatars.githubusercontent.com/u/620852?v=3","gravatar_id":"","url":"https://api.github.com/users/sghai","html_url":"https://github.com/sghai","followers_url":"https://api.github.com/users/sghai/followers","following_url":"https://api.github.com/users/sghai/following{/other_user}","gists_url":"https://api.github.com/users/sghai/gists{/gist_id}","starred_url":"https://api.github.com/users/sghai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sghai/subscriptions","organizations_url":"https://api.github.com/users/sghai/orgs","repos_url":"https://api.github.com/users/sghai/repos","events_url":"https://api.github.com/users/sghai/events{/privacy}","received_events_url":"https://api.github.com/users/sghai/received_events","type":"User","site_admin":false},"body":"Pre-requisites for foreman-discovery are:\r\n- Image should be installed\r\n- PXE global template needs to be properly configured\r\n\r\nI find best and easier way to update the template is via hammer. I placed the template in `sesame` and fetching that via http URL by exporting `PXE_DEFAULT_TEMPLATE_URL` from jenkins.\r\n\r\n","created_at":"2015-08-24T10:39:32Z","updated_at":"2015-08-27T08:38:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"906e9c19d7c98af3399d22838dcb191c322bbd7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227/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/227/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/a49833e2af26d81a407eacee95d348d59f202b9a","head":{"label":"sghai:discovery-prereq","ref":"discovery-prereq","sha":"a49833e2af26d81a407eacee95d348d59f202b9a","user":{"login":"sghai","id":620852,"avatar_url":"https://avatars.githubusercontent.com/u/620852?v=3","gravatar_id":"","url":"https://api.github.com/users/sghai","html_url":"https://github.com/sghai","followers_url":"https://api.github.com/users/sghai/followers","following_url":"https://api.github.com/users/sghai/following{/other_user}","gists_url":"https://api.github.com/users/sghai/gists{/gist_id}","starred_url":"https://api.github.com/users/sghai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sghai/subscriptions","organizations_url":"https://api.github.com/users/sghai/orgs","repos_url":"https://api.github.com/users/sghai/repos","events_url":"https://api.github.com/users/sghai/events{/privacy}","received_events_url":"https://api.github.com/users/sghai/received_events","type":"User","site_admin":false},"repo":{"id":40583082,"name":"automation-tools","full_name":"sghai/automation-tools","owner":{"login":"sghai","id":620852,"avatar_url":"https://avatars.githubusercontent.com/u/620852?v=3","gravatar_id":"","url":"https://api.github.com/users/sghai","html_url":"https://github.com/sghai","followers_url":"https://api.github.com/users/sghai/followers","following_url":"https://api.github.com/users/sghai/following{/other_user}","gists_url":"https://api.github.com/users/sghai/gists{/gist_id}","starred_url":"https://api.github.com/users/sghai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sghai/subscriptions","organizations_url":"https://api.github.com/users/sghai/orgs","repos_url":"https://api.github.com/users/sghai/repos","events_url":"https://api.github.com/users/sghai/events{/privacy}","received_events_url":"https://api.github.com/users/sghai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sghai/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/sghai/automation-tools","forks_url":"https://api.github.com/repos/sghai/automation-tools/forks","keys_url":"https://api.github.com/repos/sghai/automation-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sghai/automation-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sghai/automation-tools/teams","hooks_url":"https://api.github.com/repos/sghai/automation-tools/hooks","issue_events_url":"https://api.github.com/repos/sghai/automation-tools/issues/events{/number}","events_url":"https://api.github.com/repos/sghai/automation-tools/events","assignees_url":"https://api.github.com/repos/sghai/automation-tools/assignees{/user}","branches_url":"https://api.github.com/repos/sghai/automation-tools/branches{/branch}","tags_url":"https://api.github.com/repos/sghai/automation-tools/tags","blobs_url":"https://api.github.com/repos/sghai/automation-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sghai/automation-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sghai/automation-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/sghai/automation-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sghai/automation-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/sghai/automation-tools/languages","stargazers_url":"https://api.github.com/repos/sghai/automation-tools/stargazers","contributors_url":"https://api.github.com/repos/sghai/automation-tools/contributors","subscribers_url":"https://api.github.com/repos/sghai/automation-tools/subscribers","subscription_url":"https://api.github.com/repos/sghai/automation-tools/subscription","commits_url":"https://api.github.com/repos/sghai/automation-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/sghai/automation-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/sghai/automation-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/sghai/automation-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/sghai/automation-tools/contents/{+path}","compare_url":"https://api.github.com/repos/sghai/automation-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sghai/automation-tools/merges","archive_url":"https://api.github.com/repos/sghai/automation-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sghai/automation-tools/downloads","issues_url":"https://api.github.com/repos/sghai/automation-tools/issues{/number}","pulls_url":"https://api.github.com/repos/sghai/automation-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/sghai/automation-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/sghai/automation-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sghai/automation-tools/labels{/name}","releases_url":"https://api.github.com/repos/sghai/automation-tools/releases{/id}","created_at":"2015-08-12T06:02:36Z","updated_at":"2015-08-12T06:02:37Z","pushed_at":"2015-08-27T08:38:07Z","git_url":"git://github.com/sghai/automation-tools.git","ssh_url":"git@github.com:sghai/automation-tools.git","clone_url":"https://github.com/sghai/automation-tools.git","svn_url":"https://github.com/sghai/automation-tools","homepage":"","size":499,"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":"6d5341b0d69b6efbe597dc1c56d806fc8be5aad9","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-27T08:38:08Z","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":1557,"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":11,"forks":14,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227"},"html":{"href":"https://github.com/SatelliteQE/automation-tools/pull/227"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/227"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/227/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/227/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/a49833e2af26d81a407eacee95d348d59f202b9a"}}}}