{"action":"created","comment":{"url":"https://api.github.com/repos/wazuh/wazuh/pulls/comments/195800838","pull_request_review_id":129242159,"id":195800838,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTgwMDgzOA==","diff_hunk":"@@ -1889,17 +1889,31 @@ def get_outdated_agents(offset=0, limit=common.database_limit, sort=None):\n         return data\n \n \n-    def _get_versions(self, wpk_repo=common.wpk_repo_url):\n+    def _get_url_wpk_repo(self, wpk_repo=common.wpk_repo_url, use_http=False):\n+        protocol = \"\"\n+        if \"http://\" not in wpk_repo and \"https://\" not in wpk_repo:","path":"framework/wazuh/agent.py","position":7,"original_position":7,"commit_id":"81a16d6031408f60c5f5f967749d0015a6aa7f83","original_commit_id":"81a16d6031408f60c5f5f967749d0015a6aa7f83","user":{"login":"mgmacias95","id":8604906,"node_id":"MDQ6VXNlcjg2MDQ5MDY=","avatar_url":"https://avatars0.githubusercontent.com/u/8604906?v=4","gravatar_id":"","url":"https://api.github.com/users/mgmacias95","html_url":"https://github.com/mgmacias95","followers_url":"https://api.github.com/users/mgmacias95/followers","following_url":"https://api.github.com/users/mgmacias95/following{/other_user}","gists_url":"https://api.github.com/users/mgmacias95/gists{/gist_id}","starred_url":"https://api.github.com/users/mgmacias95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgmacias95/subscriptions","organizations_url":"https://api.github.com/users/mgmacias95/orgs","repos_url":"https://api.github.com/users/mgmacias95/repos","events_url":"https://api.github.com/users/mgmacias95/events{/privacy}","received_events_url":"https://api.github.com/users/mgmacias95/received_events","type":"User","site_admin":false},"body":"If a `https` repository is used, the `--http` option is ignored:\r\n```shellsession \r\n# /var/ossec/bin/agent_upgrade -a 001 --http -r https://packages.wazuh.com/wpk/ --debug -F\r\nManager version: v3.3.1\r\nAgent version: v3.3.0\r\nAgent new version: v3.3.0\r\nDownloading WPK file from: https://packages.wazuh.com/wpk/ubuntu/16.04/x86_64/wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk\r\nWPK file downloaded: /var/ossec/var/upgrade/wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk - SHA1SUM: aa10b66971c30c7facc6065fc4f09423e4952698\r\nUpgrade PKG: wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk (4320 KB)\r\nMSG SENT: 001 com open wb wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk\r\nRESPONSE: ok\r\nMSG SENT: 001 com lock_restart -1\r\nRESPONSE: ok\r\nChunk size: 512 bytes\r\nSending: /var/ossec/var/upgrade/wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk\r\nMSG SENT: 001 com close wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk\r\nRESPONSE: ok\r\nMSG SENT: 001 com sha1 wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk\r\nRESPONSE: ok aa10b66971c30c7facc6065fc4f09423e4952698\r\nWPK file sent\r\nMSG SENT: 001 com upgrade wazuh_agent_v3.3.0_ubuntu_16.04_x86_64.wpk upgrade.sh\r\nRESPONSE: ok 0\r\nUpgrade procedure started\r\nMSG SENT: 001 com upgrade_result\r\nRESPONSE: ok 0\r\nAgent upgraded successfully\r\n```\r\n\r\n","created_at":"2018-06-15T16:45:13Z","updated_at":"2018-06-15T16:47:08Z","html_url":"https://github.com/wazuh/wazuh/pull/798#discussion_r195800838","pull_request_url":"https://api.github.com/repos/wazuh/wazuh/pulls/798","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/wazuh/wazuh/pulls/comments/195800838"},"html":{"href":"https://github.com/wazuh/wazuh/pull/798#discussion_r195800838"},"pull_request":{"href":"https://api.github.com/repos/wazuh/wazuh/pulls/798"}}},"pull_request":{"url":"https://api.github.com/repos/wazuh/wazuh/pulls/798","id":194951316,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0OTUxMzE2","html_url":"https://github.com/wazuh/wazuh/pull/798","diff_url":"https://github.com/wazuh/wazuh/pull/798.diff","patch_url":"https://github.com/wazuh/wazuh/pull/798.patch","issue_url":"https://api.github.com/repos/wazuh/wazuh/issues/798","number":798,"state":"open","locked":false,"title":"Add option to download the wpk using http","user":{"login":"Lifka","id":6862172,"node_id":"MDQ6VXNlcjY4NjIxNzI=","avatar_url":"https://avatars3.githubusercontent.com/u/6862172?v=4","gravatar_id":"","url":"https://api.github.com/users/Lifka","html_url":"https://github.com/Lifka","followers_url":"https://api.github.com/users/Lifka/followers","following_url":"https://api.github.com/users/Lifka/following{/other_user}","gists_url":"https://api.github.com/users/Lifka/gists{/gist_id}","starred_url":"https://api.github.com/users/Lifka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lifka/subscriptions","organizations_url":"https://api.github.com/users/Lifka/orgs","repos_url":"https://api.github.com/users/Lifka/repos","events_url":"https://api.github.com/users/Lifka/events{/privacy}","received_events_url":"https://api.github.com/users/Lifka/received_events","type":"User","site_admin":false},"body":"Hi team,\r\n\r\nthis PR fixes the issue https://github.com/wazuh/wazuh/issues/685.\r\n\r\n## Adds\r\n\r\n- Framework support to use http.\r\n- `--http` option to `agent_upgrade`. By default, it uses https.\r\n\r\n### Sample\r\n\r\n```\r\n$/var/ossec/bin/agent_upgrade -a 1001 --http\r\n\r\nSending WPK: [=========================] 100%\r\nUpgrade procedure started... Please wait.\r\nAgent upgraded: Wazuh v3.1.0 -> Wazuh v3.3.0\r\n```\r\n\r\nBest regards.\r\nJavi.","created_at":"2018-06-14T16:31:52Z","updated_at":"2018-06-15T16:47:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8c173e58be0a45778c47aea8caab8ddcee47e75","assignee":{"login":"jesuslinares","id":1523318,"node_id":"MDQ6VXNlcjE1MjMzMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1523318?v=4","gravatar_id":"","url":"https://api.github.com/users/jesuslinares","html_url":"https://github.com/jesuslinares","followers_url":"https://api.github.com/users/jesuslinares/followers","following_url":"https://api.github.com/users/jesuslinares/following{/other_user}","gists_url":"https://api.github.com/users/jesuslinares/gists{/gist_id}","starred_url":"https://api.github.com/users/jesuslinares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesuslinares/subscriptions","organizations_url":"https://api.github.com/users/jesuslinares/orgs","repos_url":"https://api.github.com/users/jesuslinares/repos","events_url":"https://api.github.com/users/jesuslinares/events{/privacy}","received_events_url":"https://api.github.com/users/jesuslinares/received_events","type":"User","site_admin":false},"assignees":[{"login":"jesuslinares","id":1523318,"node_id":"MDQ6VXNlcjE1MjMzMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1523318?v=4","gravatar_id":"","url":"https://api.github.com/users/jesuslinares","html_url":"https://github.com/jesuslinares","followers_url":"https://api.github.com/users/jesuslinares/followers","following_url":"https://api.github.com/users/jesuslinares/following{/other_user}","gists_url":"https://api.github.com/users/jesuslinares/gists{/gist_id}","starred_url":"https://api.github.com/users/jesuslinares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesuslinares/subscriptions","organizations_url":"https://api.github.com/users/jesuslinares/orgs","repos_url":"https://api.github.com/users/jesuslinares/repos","events_url":"https://api.github.com/users/jesuslinares/events{/privacy}","received_events_url":"https://api.github.com/users/jesuslinares/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":246680126,"node_id":"MDU6TGFiZWwyNDY2ODAxMjY=","url":"https://api.github.com/repos/wazuh/wazuh/labels/enhancement","name":"enhancement","color":"0052cc","default":true},{"id":939707423,"node_id":"MDU6TGFiZWw5Mzk3MDc0MjM=","url":"https://api.github.com/repos/wazuh/wazuh/labels/framework","name":"framework","color":"d8f7a3","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/wazuh/wazuh/pulls/798/commits","review_comments_url":"https://api.github.com/repos/wazuh/wazuh/pulls/798/comments","review_comment_url":"https://api.github.com/repos/wazuh/wazuh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wazuh/wazuh/issues/798/comments","statuses_url":"https://api.github.com/repos/wazuh/wazuh/statuses/81a16d6031408f60c5f5f967749d0015a6aa7f83","head":{"label":"wazuh:dev-download-wpk-http","ref":"dev-download-wpk-http","sha":"81a16d6031408f60c5f5f967749d0015a6aa7f83","user":{"login":"wazuh","id":13752566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzUyNTY2","avatar_url":"https://avatars3.githubusercontent.com/u/13752566?v=4","gravatar_id":"","url":"https://api.github.com/users/wazuh","html_url":"https://github.com/wazuh","followers_url":"https://api.github.com/users/wazuh/followers","following_url":"https://api.github.com/users/wazuh/following{/other_user}","gists_url":"https://api.github.com/users/wazuh/gists{/gist_id}","starred_url":"https://api.github.com/users/wazuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wazuh/subscriptions","organizations_url":"https://api.github.com/users/wazuh/orgs","repos_url":"https://api.github.com/users/wazuh/repos","events_url":"https://api.github.com/users/wazuh/events{/privacy}","received_events_url":"https://api.github.com/users/wazuh/received_events","type":"Organization","site_admin":false},"repo":{"id":40556106,"node_id":"MDEwOlJlcG9zaXRvcnk0MDU1NjEwNg==","name":"wazuh","full_name":"wazuh/wazuh","owner":{"login":"wazuh","id":13752566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzUyNTY2","avatar_url":"https://avatars3.githubusercontent.com/u/13752566?v=4","gravatar_id":"","url":"https://api.github.com/users/wazuh","html_url":"https://github.com/wazuh","followers_url":"https://api.github.com/users/wazuh/followers","following_url":"https://api.github.com/users/wazuh/following{/other_user}","gists_url":"https://api.github.com/users/wazuh/gists{/gist_id}","starred_url":"https://api.github.com/users/wazuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wazuh/subscriptions","organizations_url":"https://api.github.com/users/wazuh/orgs","repos_url":"https://api.github.com/users/wazuh/repos","events_url":"https://api.github.com/users/wazuh/events{/privacy}","received_events_url":"https://api.github.com/users/wazuh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wazuh/wazuh","description":"Wazuh - Host and endpoint security","fork":false,"url":"https://api.github.com/repos/wazuh/wazuh","forks_url":"https://api.github.com/repos/wazuh/wazuh/forks","keys_url":"https://api.github.com/repos/wazuh/wazuh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wazuh/wazuh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wazuh/wazuh/teams","hooks_url":"https://api.github.com/repos/wazuh/wazuh/hooks","issue_events_url":"https://api.github.com/repos/wazuh/wazuh/issues/events{/number}","events_url":"https://api.github.com/repos/wazuh/wazuh/events","assignees_url":"https://api.github.com/repos/wazuh/wazuh/assignees{/user}","branches_url":"https://api.github.com/repos/wazuh/wazuh/branches{/branch}","tags_url":"https://api.github.com/repos/wazuh/wazuh/tags","blobs_url":"https://api.github.com/repos/wazuh/wazuh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wazuh/wazuh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wazuh/wazuh/git/refs{/sha}","trees_url":"https://api.github.com/repos/wazuh/wazuh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wazuh/wazuh/statuses/{sha}","languages_url":"https://api.github.com/repos/wazuh/wazuh/languages","stargazers_url":"https://api.github.com/repos/wazuh/wazuh/stargazers","contributors_url":"https://api.github.com/repos/wazuh/wazuh/contributors","subscribers_url":"https://api.github.com/repos/wazuh/wazuh/subscribers","subscription_url":"https://api.github.com/repos/wazuh/wazuh/subscription","commits_url":"https://api.github.com/repos/wazuh/wazuh/commits{/sha}","git_commits_url":"https://api.github.com/repos/wazuh/wazuh/git/commits{/sha}","comments_url":"https://api.github.com/repos/wazuh/wazuh/comments{/number}","issue_comment_url":"https://api.github.com/repos/wazuh/wazuh/issues/comments{/number}","contents_url":"https://api.github.com/repos/wazuh/wazuh/contents/{+path}","compare_url":"https://api.github.com/repos/wazuh/wazuh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wazuh/wazuh/merges","archive_url":"https://api.github.com/repos/wazuh/wazuh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wazuh/wazuh/downloads","issues_url":"https://api.github.com/repos/wazuh/wazuh/issues{/number}","pulls_url":"https://api.github.com/repos/wazuh/wazuh/pulls{/number}","milestones_url":"https://api.github.com/repos/wazuh/wazuh/milestones{/number}","notifications_url":"https://api.github.com/repos/wazuh/wazuh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wazuh/wazuh/labels{/name}","releases_url":"https://api.github.com/repos/wazuh/wazuh/releases{/id}","deployments_url":"https://api.github.com/repos/wazuh/wazuh/deployments","created_at":"2015-08-11T17:39:03Z","updated_at":"2018-06-14T12:05:45Z","pushed_at":"2018-06-15T16:14:55Z","git_url":"git://github.com/wazuh/wazuh.git","ssh_url":"git@github.com:wazuh/wazuh.git","clone_url":"https://github.com/wazuh/wazuh.git","svn_url":"https://github.com/wazuh/wazuh","homepage":"https://wazuh.com/","size":65877,"stargazers_count":444,"watchers_count":444,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":177,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":162,"open_issues":177,"watchers":444,"default_branch":"master"}},"base":{"label":"wazuh:3.3","ref":"3.3","sha":"5f39df2d4d6ce6e5de965f0fb2c5571013238b90","user":{"login":"wazuh","id":13752566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzUyNTY2","avatar_url":"https://avatars3.githubusercontent.com/u/13752566?v=4","gravatar_id":"","url":"https://api.github.com/users/wazuh","html_url":"https://github.com/wazuh","followers_url":"https://api.github.com/users/wazuh/followers","following_url":"https://api.github.com/users/wazuh/following{/other_user}","gists_url":"https://api.github.com/users/wazuh/gists{/gist_id}","starred_url":"https://api.github.com/users/wazuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wazuh/subscriptions","organizations_url":"https://api.github.com/users/wazuh/orgs","repos_url":"https://api.github.com/users/wazuh/repos","events_url":"https://api.github.com/users/wazuh/events{/privacy}","received_events_url":"https://api.github.com/users/wazuh/received_events","type":"Organization","site_admin":false},"repo":{"id":40556106,"node_id":"MDEwOlJlcG9zaXRvcnk0MDU1NjEwNg==","name":"wazuh","full_name":"wazuh/wazuh","owner":{"login":"wazuh","id":13752566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzUyNTY2","avatar_url":"https://avatars3.githubusercontent.com/u/13752566?v=4","gravatar_id":"","url":"https://api.github.com/users/wazuh","html_url":"https://github.com/wazuh","followers_url":"https://api.github.com/users/wazuh/followers","following_url":"https://api.github.com/users/wazuh/following{/other_user}","gists_url":"https://api.github.com/users/wazuh/gists{/gist_id}","starred_url":"https://api.github.com/users/wazuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wazuh/subscriptions","organizations_url":"https://api.github.com/users/wazuh/orgs","repos_url":"https://api.github.com/users/wazuh/repos","events_url":"https://api.github.com/users/wazuh/events{/privacy}","received_events_url":"https://api.github.com/users/wazuh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wazuh/wazuh","description":"Wazuh - Host and endpoint security","fork":false,"url":"https://api.github.com/repos/wazuh/wazuh","forks_url":"https://api.github.com/repos/wazuh/wazuh/forks","keys_url":"https://api.github.com/repos/wazuh/wazuh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wazuh/wazuh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wazuh/wazuh/teams","hooks_url":"https://api.github.com/repos/wazuh/wazuh/hooks","issue_events_url":"https://api.github.com/repos/wazuh/wazuh/issues/events{/number}","events_url":"https://api.github.com/repos/wazuh/wazuh/events","assignees_url":"https://api.github.com/repos/wazuh/wazuh/assignees{/user}","branches_url":"https://api.github.com/repos/wazuh/wazuh/branches{/branch}","tags_url":"https://api.github.com/repos/wazuh/wazuh/tags","blobs_url":"https://api.github.com/repos/wazuh/wazuh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wazuh/wazuh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wazuh/wazuh/git/refs{/sha}","trees_url":"https://api.github.com/repos/wazuh/wazuh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wazuh/wazuh/statuses/{sha}","languages_url":"https://api.github.com/repos/wazuh/wazuh/languages","stargazers_url":"https://api.github.com/repos/wazuh/wazuh/stargazers","contributors_url":"https://api.github.com/repos/wazuh/wazuh/contributors","subscribers_url":"https://api.github.com/repos/wazuh/wazuh/subscribers","subscription_url":"https://api.github.com/repos/wazuh/wazuh/subscription","commits_url":"https://api.github.com/repos/wazuh/wazuh/commits{/sha}","git_commits_url":"https://api.github.com/repos/wazuh/wazuh/git/commits{/sha}","comments_url":"https://api.github.com/repos/wazuh/wazuh/comments{/number}","issue_comment_url":"https://api.github.com/repos/wazuh/wazuh/issues/comments{/number}","contents_url":"https://api.github.com/repos/wazuh/wazuh/contents/{+path}","compare_url":"https://api.github.com/repos/wazuh/wazuh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wazuh/wazuh/merges","archive_url":"https://api.github.com/repos/wazuh/wazuh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wazuh/wazuh/downloads","issues_url":"https://api.github.com/repos/wazuh/wazuh/issues{/number}","pulls_url":"https://api.github.com/repos/wazuh/wazuh/pulls{/number}","milestones_url":"https://api.github.com/repos/wazuh/wazuh/milestones{/number}","notifications_url":"https://api.github.com/repos/wazuh/wazuh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wazuh/wazuh/labels{/name}","releases_url":"https://api.github.com/repos/wazuh/wazuh/releases{/id}","deployments_url":"https://api.github.com/repos/wazuh/wazuh/deployments","created_at":"2015-08-11T17:39:03Z","updated_at":"2018-06-14T12:05:45Z","pushed_at":"2018-06-15T16:14:55Z","git_url":"git://github.com/wazuh/wazuh.git","ssh_url":"git@github.com:wazuh/wazuh.git","clone_url":"https://github.com/wazuh/wazuh.git","svn_url":"https://github.com/wazuh/wazuh","homepage":"https://wazuh.com/","size":65877,"stargazers_count":444,"watchers_count":444,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":177,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":162,"open_issues":177,"watchers":444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wazuh/wazuh/pulls/798"},"html":{"href":"https://github.com/wazuh/wazuh/pull/798"},"issue":{"href":"https://api.github.com/repos/wazuh/wazuh/issues/798"},"comments":{"href":"https://api.github.com/repos/wazuh/wazuh/issues/798/comments"},"review_comments":{"href":"https://api.github.com/repos/wazuh/wazuh/pulls/798/comments"},"review_comment":{"href":"https://api.github.com/repos/wazuh/wazuh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wazuh/wazuh/pulls/798/commits"},"statuses":{"href":"https://api.github.com/repos/wazuh/wazuh/statuses/81a16d6031408f60c5f5f967749d0015a6aa7f83"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mgmacias95"}}