{"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/75350188","id":75350188,"diff_hunk":"@@ -0,0 +1,110 @@\n+\"\"\"Module that gather several informations about host\"\"\"\n+import logging\n+\n+import re\n+from cachetools import lru_cache\n+\n+from robottelo import ssh\n+LOGGER = logging.getLogger(__name__)\n+\n+\n+@lru_cache(maxsize=1)\n+def get_host_os_version():\n+    \"\"\"Fetchs host's OS version through SSH\n+    :return: str with version\n+    \"\"\"\n+    cmd = ssh.command('cat /etc/redhat-release')\n+    if cmd.stdout:\n+        version_description = cmd.stdout[0]\n+        version_re = (\n+            r'Red Hat Enterprise Linux Server release (?P<version>\\d(\\.\\d)*)'\n+        )\n+        result = re.search(version_re, version_description)\n+        if result:\n+            host_os_version = 'RHEL{}'.format(result.group('version'))\n+            LOGGER.debug('Host version: {}'.format(host_os_version))\n+            return host_os_version\n+\n+    LOGGER.warning('Host version not available: {!r}'.format(cmd))\n+    return 'Not Available'\n+\n+\n+_SAT_6_2_VERSION_COMMAND = (","path":"robottelo/host_info.py","position":32,"original_position":32,"commit_id":"39caeb2dcae7afe8fd5c420e045480c2205cccf1","original_commit_id":"39caeb2dcae7afe8fd5c420e045480c2205cccf1","user":{"login":"rochacbruno","id":458654,"avatar_url":"https://avatars.githubusercontent.com/u/458654?v=3","gravatar_id":"","url":"https://api.github.com/users/rochacbruno","html_url":"https://github.com/rochacbruno","followers_url":"https://api.github.com/users/rochacbruno/followers","following_url":"https://api.github.com/users/rochacbruno/following{/other_user}","gists_url":"https://api.github.com/users/rochacbruno/gists{/gist_id}","starred_url":"https://api.github.com/users/rochacbruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochacbruno/subscriptions","organizations_url":"https://api.github.com/users/rochacbruno/orgs","repos_url":"https://api.github.com/users/rochacbruno/repos","events_url":"https://api.github.com/users/rochacbruno/events{/privacy}","received_events_url":"https://api.github.com/users/rochacbruno/received_events","type":"User","site_admin":false},"body":"@rplevka so in upstream is there another path? so we can put the `grep pattern` and also the `version file path` in settings variable.","created_at":"2016-08-18T17:21:10Z","updated_at":"2016-08-18T17:21:10Z","html_url":"https://github.com/SatelliteQE/robottelo/pull/3709#discussion_r75350188","pull_request_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/75350188"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/3709#discussion_r75350188"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709","id":81113369,"html_url":"https://github.com/SatelliteQE/robottelo/pull/3709","diff_url":"https://github.com/SatelliteQE/robottelo/pull/3709.diff","patch_url":"https://github.com/SatelliteQE/robottelo/pull/3709.patch","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/3709","number":3709,"state":"closed","locked":false,"title":"Repos loaded accordingly to sat version","user":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"body":"closes #3698\n\nRefactoring:\nHost information unified on host_info","created_at":"2016-08-12T12:47:31Z","updated_at":"2016-08-18T17:21:10Z","closed_at":"2016-08-15T15:50:07Z","merged_at":"2016-08-15T15:50:07Z","merge_commit_sha":"a5edc49c4d4ec390de5f612d17be160b877c57c5","assignee":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"assignees":[{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones/80","html_url":"https://github.com/SatelliteQE/robottelo/milestones/Sprint6.2.4%20Week%20starting%20Aug%208th,%202016","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones/80/labels","id":1925638,"number":80,"title":"Sprint6.2.4 Week starting Aug 8th, 2016","description":"","creator":{"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},"open_issues":0,"closed_issues":10,"state":"closed","created_at":"2016-08-05T14:37:49Z","updated_at":"2016-08-16T06:59:35Z","due_on":"2016-08-11T18:30:00Z","closed_at":"2016-08-16T06:59:35Z"},"commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709/comments","review_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/3709/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/39caeb2dcae7afe8fd5c420e045480c2205cccf1","head":{"label":"renzon:3698","ref":"3698","sha":"39caeb2dcae7afe8fd5c420e045480c2205cccf1","user":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"repo":{"id":60784721,"name":"robottelo","full_name":"renzon/robottelo","owner":{"login":"renzon","id":3457115,"avatar_url":"https://avatars.githubusercontent.com/u/3457115?v=3","gravatar_id":"","url":"https://api.github.com/users/renzon","html_url":"https://github.com/renzon","followers_url":"https://api.github.com/users/renzon/followers","following_url":"https://api.github.com/users/renzon/following{/other_user}","gists_url":"https://api.github.com/users/renzon/gists{/gist_id}","starred_url":"https://api.github.com/users/renzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzon/subscriptions","organizations_url":"https://api.github.com/users/renzon/orgs","repos_url":"https://api.github.com/users/renzon/repos","events_url":"https://api.github.com/users/renzon/events{/privacy}","received_events_url":"https://api.github.com/users/renzon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/renzon/robottelo","description":"Robottelo is a test suite which exercises The Foreman.","fork":true,"url":"https://api.github.com/repos/renzon/robottelo","forks_url":"https://api.github.com/repos/renzon/robottelo/forks","keys_url":"https://api.github.com/repos/renzon/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/renzon/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/renzon/robottelo/teams","hooks_url":"https://api.github.com/repos/renzon/robottelo/hooks","issue_events_url":"https://api.github.com/repos/renzon/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/renzon/robottelo/events","assignees_url":"https://api.github.com/repos/renzon/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/renzon/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/renzon/robottelo/tags","blobs_url":"https://api.github.com/repos/renzon/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/renzon/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/renzon/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/renzon/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/renzon/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/renzon/robottelo/languages","stargazers_url":"https://api.github.com/repos/renzon/robottelo/stargazers","contributors_url":"https://api.github.com/repos/renzon/robottelo/contributors","subscribers_url":"https://api.github.com/repos/renzon/robottelo/subscribers","subscription_url":"https://api.github.com/repos/renzon/robottelo/subscription","commits_url":"https://api.github.com/repos/renzon/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/renzon/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/renzon/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/renzon/robottelo/issues/comments{/number}","contents_url":"https://api.github.com/repos/renzon/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/renzon/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/renzon/robottelo/merges","archive_url":"https://api.github.com/repos/renzon/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/renzon/robottelo/downloads","issues_url":"https://api.github.com/repos/renzon/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/renzon/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/renzon/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/renzon/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/renzon/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/renzon/robottelo/releases{/id}","deployments_url":"https://api.github.com/repos/renzon/robottelo/deployments","created_at":"2016-06-09T15:18:45Z","updated_at":"2016-06-09T15:18:47Z","pushed_at":"2016-08-18T16:20:11Z","git_url":"git://github.com/renzon/robottelo.git","ssh_url":"git@github.com:renzon/robottelo.git","clone_url":"https://github.com/renzon/robottelo.git","svn_url":"https://github.com/renzon/robottelo","homepage":"","size":13094,"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":"a5686af7a5d8eec954c965db0b9efc20c8e08a24","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":4000279,"name":"robottelo","full_name":"SatelliteQE/robottelo","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/robottelo","description":"Robottelo is a test suite which exercises The Foreman.","fork":false,"url":"https://api.github.com/repos/SatelliteQE/robottelo","forks_url":"https://api.github.com/repos/SatelliteQE/robottelo/forks","keys_url":"https://api.github.com/repos/SatelliteQE/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SatelliteQE/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SatelliteQE/robottelo/teams","hooks_url":"https://api.github.com/repos/SatelliteQE/robottelo/hooks","issue_events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/events","assignees_url":"https://api.github.com/repos/SatelliteQE/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/SatelliteQE/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/SatelliteQE/robottelo/tags","blobs_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/SatelliteQE/robottelo/languages","stargazers_url":"https://api.github.com/repos/SatelliteQE/robottelo/stargazers","contributors_url":"https://api.github.com/repos/SatelliteQE/robottelo/contributors","subscribers_url":"https://api.github.com/repos/SatelliteQE/robottelo/subscribers","subscription_url":"https://api.github.com/repos/SatelliteQE/robottelo/subscription","commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/comments{/number}","contents_url":"https://api.github.com/repos/SatelliteQE/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/SatelliteQE/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SatelliteQE/robottelo/merges","archive_url":"https://api.github.com/repos/SatelliteQE/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SatelliteQE/robottelo/downloads","issues_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/SatelliteQE/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/SatelliteQE/robottelo/releases{/id}","deployments_url":"https://api.github.com/repos/SatelliteQE/robottelo/deployments","created_at":"2012-04-12T01:36:39Z","updated_at":"2016-08-16T13:23:50Z","pushed_at":"2016-08-18T17:12:15Z","git_url":"git://github.com/SatelliteQE/robottelo.git","ssh_url":"git@github.com:SatelliteQE/robottelo.git","clone_url":"https://github.com/SatelliteQE/robottelo.git","svn_url":"https://github.com/SatelliteQE/robottelo","homepage":"","size":14209,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"open_issues_count":148,"forks":46,"open_issues":148,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/3709"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/3709"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/3709/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709/comments"},"review_comment":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/3709/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/39caeb2dcae7afe8fd5c420e045480c2205cccf1"}}}}
{"actor":{"display_login":"rochacbruno"}}