{"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments/81696938","pull_request_review_id":2657720,"id":81696938,"diff_hunk":"@@ -0,0 +1,161 @@\n+import os\n+import sys\n+import time\n+\n+from tools import reboot\n+from automation_tools import setup_capsule_firewall\n+from automation_tools.repository import enable_repos, disable_repos\n+from automation_tools.satellite6.capsule import generate_capsule_certs\n+from automation_tools.utils import distro_info, update_packages\n+from fabric.api import env, execute, run\n+from tasks import (\n+    create_rhevm_instance,\n+    delete_rhevm_instance,\n+    sync_capsule_repos_to_upgrade\n+)\n+from tools import copy_ssh_key\n+\n+\n+def satellite6_capsule_setup(sat_host, os_version):\n+    \"\"\"Sets up required things on upgrade running machine and on Capsule to\n+    perform capsule upgrade later\n+\n+    :param string sat_host: Satellite hostname to which the capsule registered\n+    :param string os_version: The OS version onto which the capsule installed\n+        e.g: rhel6, rhel7\n+    \"\"\"\n+    # If Personal Capsule Hostname provided\n+    if os.environ.get('CAPSULE_HOSTNAMES'):\n+        cap_hosts = os.environ.get('CAPSULE_HOSTNAMES')\n+        # For Personal Satellite CAPSULE_SUBSCRIPTION is must\n+        cap_subscription = os.environ.get('CAPSULE_SUBSCRIPTION')\n+        if not cap_subscription:\n+            print('CAPSULE_SUBSCRIPTION environment variable is not '","path":"automation_tools/satellite6/upgrade/capsule.py","position":33,"original_position":33,"commit_id":"44098b9dea08d53f495665e3d95f6c57fe4c69c6","original_commit_id":"197db7d16b963063239d57834a597e85dc7ba83d","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":"Empty String i.e(''), that equals to false in python. So if not defined it('') will be treated as false. And it is been tested already :)","created_at":"2016-10-04T07:14:19Z","updated_at":"2016-10-04T07:14:19Z","html_url":"https://github.com/SatelliteQE/automation-tools/pull/429#discussion_r81696938","pull_request_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/comments/81696938"},"html":{"href":"https://github.com/SatelliteQE/automation-tools/pull/429#discussion_r81696938"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429","id":87314489,"html_url":"https://github.com/SatelliteQE/automation-tools/pull/429","diff_url":"https://github.com/SatelliteQE/automation-tools/pull/429.diff","patch_url":"https://github.com/SatelliteQE/automation-tools/pull/429.patch","issue_url":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/429","number":429,"state":"open","locked":false,"title":"Client Upgrade with Reorganized Upgrade Code","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":"This PR has :\r\n\r\n1. The most awaited client upgrade (thousands of clients can be installed and upgraded now):\r\n       - Personal satellite Clients Upgrade\r\n       - RHEVM satellite Clients Upgrade\r\n2. The Reorganized upgrade code:\r\n       - Separate module for satellite, capsule and client\r\n       - Functions for setup and upgrade in each module\r\n3. Improvements from Last Upgrade Automation:\r\n       - Now more than one capsules can be upgraded at a time\r\n       - Improvements in some helper functions\r\n\r\nEnjoy !!","created_at":"2016-09-29T13:37:00Z","updated_at":"2016-10-04T07:14:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9468b2cb3e7fdc575c862f9e50a3f2c3527a3211","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429/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/429/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/44098b9dea08d53f495665e3d95f6c57fe4c69c6","head":{"label":"jyejare:client_upgrade","ref":"client_upgrade","sha":"44098b9dea08d53f495665e3d95f6c57fe4c69c6","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":63147984,"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}","deployments_url":"https://api.github.com/repos/jyejare/automation-tools/deployments","created_at":"2016-07-12T10:09:06Z","updated_at":"2016-07-12T10:09:07Z","pushed_at":"2016-10-03T14:03:47Z","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":738,"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":"b97bf94cdacd41949d11b5b06829d95fa3aa66d8","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}","deployments_url":"https://api.github.com/repos/SatelliteQE/automation-tools/deployments","created_at":"2014-08-01T14:27:34Z","updated_at":"2016-03-31T14:58:31Z","pushed_at":"2016-10-03T14:03:48Z","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":1064,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":18,"forks":19,"open_issues":18,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429"},"html":{"href":"https://github.com/SatelliteQE/automation-tools/pull/429"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/429"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/pulls/429/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/429/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/automation-tools/statuses/44098b9dea08d53f495665e3d95f6c57fe4c69c6"}}}}
{"actor":{"display_login":"jyejare"}}