{"action":"created","comment":{"url":"https://api.github.com/repos/dmtucker/yaas/pulls/comments/41601984","id":41601984,"diff_hunk":"@@ -3,28 +3,39 @@\n from __future__ import absolute_import\n from __future__ import print_function\n \n+import pprint\n+import requests\n+\n # These default configs are overriden based on\n-# command line arguments or environment variables\n+# command line arguments or environment variables.\n \n-server_url = None   # Must be overriden\n+scheme = 'http'\n+server = None   # Must be overriden\n+port = 8080\n username = 'admin'\n password = 'admin'\n-args = None\n+command = None\n+\n \n def print_request_and_response(res, *args, **kwargs):\n     print(\"Request:\", res.request.__dict__)\n     print(\"Response:\", res.__dict__)\n \n-def requests_opts():\n-    opts = {\n-        'auth': (username, password),\n-        'headers': {'X-Requested-By': 'Ambari'},\n-        }\n-\n-    if args.verbose:\n-        opts['hooks'] = {\n-            'response': print_request_and_response,\n-            }\n-\n-    return opts\n \n+def request(endpoint, callback):","path":"yaas/config.py","position":38,"original_position":38,"commit_id":"7695480924bfde48f6c72ed22f925d3f58bb9d9a","original_commit_id":"7695480924bfde48f6c72ed22f925d3f58bb9d9a","user":{"login":"dmtucker","id":1817814,"avatar_url":"https://avatars.githubusercontent.com/u/1817814?v=3","gravatar_id":"","url":"https://api.github.com/users/dmtucker","html_url":"https://github.com/dmtucker","followers_url":"https://api.github.com/users/dmtucker/followers","following_url":"https://api.github.com/users/dmtucker/following{/other_user}","gists_url":"https://api.github.com/users/dmtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dmtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmtucker/subscriptions","organizations_url":"https://api.github.com/users/dmtucker/orgs","repos_url":"https://api.github.com/users/dmtucker/repos","events_url":"https://api.github.com/users/dmtucker/events{/privacy}","received_events_url":"https://api.github.com/users/dmtucker/received_events","type":"User","site_admin":false},"body":"good point","created_at":"2015-10-09T06:57:11Z","updated_at":"2015-10-09T06:57:11Z","html_url":"https://github.com/dmtucker/yaas/pull/9#discussion_r41601984","pull_request_url":"https://api.github.com/repos/dmtucker/yaas/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/dmtucker/yaas/pulls/comments/41601984"},"html":{"href":"https://github.com/dmtucker/yaas/pull/9#discussion_r41601984"},"pull_request":{"href":"https://api.github.com/repos/dmtucker/yaas/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/dmtucker/yaas/pulls/9","id":47234030,"html_url":"https://github.com/dmtucker/yaas/pull/9","diff_url":"https://github.com/dmtucker/yaas/pull/9.diff","patch_url":"https://github.com/dmtucker/yaas/pull/9.patch","issue_url":"https://api.github.com/repos/dmtucker/yaas/issues/9","number":9,"state":"open","locked":false,"title":"Implement host list with callbacks.","user":{"login":"dmtucker","id":1817814,"avatar_url":"https://avatars.githubusercontent.com/u/1817814?v=3","gravatar_id":"","url":"https://api.github.com/users/dmtucker","html_url":"https://github.com/dmtucker","followers_url":"https://api.github.com/users/dmtucker/followers","following_url":"https://api.github.com/users/dmtucker/following{/other_user}","gists_url":"https://api.github.com/users/dmtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dmtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmtucker/subscriptions","organizations_url":"https://api.github.com/users/dmtucker/orgs","repos_url":"https://api.github.com/users/dmtucker/repos","events_url":"https://api.github.com/users/dmtucker/events{/privacy}","received_events_url":"https://api.github.com/users/dmtucker/received_events","type":"User","site_admin":false},"body":"We will need to modify `config.request` to accommodate POST and PUT requests soon.","created_at":"2015-10-09T04:52:26Z","updated_at":"2015-10-09T06:57:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b7b6bbb2f01729a0110d402139d6a79926b17f2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dmtucker/yaas/pulls/9/commits","review_comments_url":"https://api.github.com/repos/dmtucker/yaas/pulls/9/comments","review_comment_url":"https://api.github.com/repos/dmtucker/yaas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dmtucker/yaas/issues/9/comments","statuses_url":"https://api.github.com/repos/dmtucker/yaas/statuses/7695480924bfde48f6c72ed22f925d3f58bb9d9a","head":{"label":"dmtucker:host_list_callback","ref":"host_list_callback","sha":"7695480924bfde48f6c72ed22f925d3f58bb9d9a","user":{"login":"dmtucker","id":1817814,"avatar_url":"https://avatars.githubusercontent.com/u/1817814?v=3","gravatar_id":"","url":"https://api.github.com/users/dmtucker","html_url":"https://github.com/dmtucker","followers_url":"https://api.github.com/users/dmtucker/followers","following_url":"https://api.github.com/users/dmtucker/following{/other_user}","gists_url":"https://api.github.com/users/dmtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dmtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmtucker/subscriptions","organizations_url":"https://api.github.com/users/dmtucker/orgs","repos_url":"https://api.github.com/users/dmtucker/repos","events_url":"https://api.github.com/users/dmtucker/events{/privacy}","received_events_url":"https://api.github.com/users/dmtucker/received_events","type":"User","site_admin":false},"repo":{"id":42206165,"name":"yaas","full_name":"dmtucker/yaas","owner":{"login":"dmtucker","id":1817814,"avatar_url":"https://avatars.githubusercontent.com/u/1817814?v=3","gravatar_id":"","url":"https://api.github.com/users/dmtucker","html_url":"https://github.com/dmtucker","followers_url":"https://api.github.com/users/dmtucker/followers","following_url":"https://api.github.com/users/dmtucker/following{/other_user}","gists_url":"https://api.github.com/users/dmtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dmtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmtucker/subscriptions","organizations_url":"https://api.github.com/users/dmtucker/orgs","repos_url":"https://api.github.com/users/dmtucker/repos","events_url":"https://api.github.com/users/dmtucker/events{/privacy}","received_events_url":"https://api.github.com/users/dmtucker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmtucker/yaas","description":"Yet Another Ambari Shell","fork":false,"url":"https://api.github.com/repos/dmtucker/yaas","forks_url":"https://api.github.com/repos/dmtucker/yaas/forks","keys_url":"https://api.github.com/repos/dmtucker/yaas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmtucker/yaas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmtucker/yaas/teams","hooks_url":"https://api.github.com/repos/dmtucker/yaas/hooks","issue_events_url":"https://api.github.com/repos/dmtucker/yaas/issues/events{/number}","events_url":"https://api.github.com/repos/dmtucker/yaas/events","assignees_url":"https://api.github.com/repos/dmtucker/yaas/assignees{/user}","branches_url":"https://api.github.com/repos/dmtucker/yaas/branches{/branch}","tags_url":"https://api.github.com/repos/dmtucker/yaas/tags","blobs_url":"https://api.github.com/repos/dmtucker/yaas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmtucker/yaas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmtucker/yaas/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmtucker/yaas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmtucker/yaas/statuses/{sha}","languages_url":"https://api.github.com/repos/dmtucker/yaas/languages","stargazers_url":"https://api.github.com/repos/dmtucker/yaas/stargazers","contributors_url":"https://api.github.com/repos/dmtucker/yaas/contributors","subscribers_url":"https://api.github.com/repos/dmtucker/yaas/subscribers","subscription_url":"https://api.github.com/repos/dmtucker/yaas/subscription","commits_url":"https://api.github.com/repos/dmtucker/yaas/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmtucker/yaas/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmtucker/yaas/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmtucker/yaas/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmtucker/yaas/contents/{+path}","compare_url":"https://api.github.com/repos/dmtucker/yaas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmtucker/yaas/merges","archive_url":"https://api.github.com/repos/dmtucker/yaas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmtucker/yaas/downloads","issues_url":"https://api.github.com/repos/dmtucker/yaas/issues{/number}","pulls_url":"https://api.github.com/repos/dmtucker/yaas/pulls{/number}","milestones_url":"https://api.github.com/repos/dmtucker/yaas/milestones{/number}","notifications_url":"https://api.github.com/repos/dmtucker/yaas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmtucker/yaas/labels{/name}","releases_url":"https://api.github.com/repos/dmtucker/yaas/releases{/id}","created_at":"2015-09-09T21:37:25Z","updated_at":"2015-09-10T08:52:09Z","pushed_at":"2015-10-09T04:52:26Z","git_url":"git://github.com/dmtucker/yaas.git","ssh_url":"git@github.com:dmtucker/yaas.git","clone_url":"https://github.com/dmtucker/yaas.git","svn_url":"https://github.com/dmtucker/yaas","homepage":null,"size":502,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"dmtucker:master","ref":"master","sha":"e22ce875a565f877a622daac17e769737cc001b3","user":{"login":"dmtucker","id":1817814,"avatar_url":"https://avatars.githubusercontent.com/u/1817814?v=3","gravatar_id":"","url":"https://api.github.com/users/dmtucker","html_url":"https://github.com/dmtucker","followers_url":"https://api.github.com/users/dmtucker/followers","following_url":"https://api.github.com/users/dmtucker/following{/other_user}","gists_url":"https://api.github.com/users/dmtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dmtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmtucker/subscriptions","organizations_url":"https://api.github.com/users/dmtucker/orgs","repos_url":"https://api.github.com/users/dmtucker/repos","events_url":"https://api.github.com/users/dmtucker/events{/privacy}","received_events_url":"https://api.github.com/users/dmtucker/received_events","type":"User","site_admin":false},"repo":{"id":42206165,"name":"yaas","full_name":"dmtucker/yaas","owner":{"login":"dmtucker","id":1817814,"avatar_url":"https://avatars.githubusercontent.com/u/1817814?v=3","gravatar_id":"","url":"https://api.github.com/users/dmtucker","html_url":"https://github.com/dmtucker","followers_url":"https://api.github.com/users/dmtucker/followers","following_url":"https://api.github.com/users/dmtucker/following{/other_user}","gists_url":"https://api.github.com/users/dmtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dmtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmtucker/subscriptions","organizations_url":"https://api.github.com/users/dmtucker/orgs","repos_url":"https://api.github.com/users/dmtucker/repos","events_url":"https://api.github.com/users/dmtucker/events{/privacy}","received_events_url":"https://api.github.com/users/dmtucker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmtucker/yaas","description":"Yet Another Ambari Shell","fork":false,"url":"https://api.github.com/repos/dmtucker/yaas","forks_url":"https://api.github.com/repos/dmtucker/yaas/forks","keys_url":"https://api.github.com/repos/dmtucker/yaas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmtucker/yaas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmtucker/yaas/teams","hooks_url":"https://api.github.com/repos/dmtucker/yaas/hooks","issue_events_url":"https://api.github.com/repos/dmtucker/yaas/issues/events{/number}","events_url":"https://api.github.com/repos/dmtucker/yaas/events","assignees_url":"https://api.github.com/repos/dmtucker/yaas/assignees{/user}","branches_url":"https://api.github.com/repos/dmtucker/yaas/branches{/branch}","tags_url":"https://api.github.com/repos/dmtucker/yaas/tags","blobs_url":"https://api.github.com/repos/dmtucker/yaas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmtucker/yaas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmtucker/yaas/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmtucker/yaas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmtucker/yaas/statuses/{sha}","languages_url":"https://api.github.com/repos/dmtucker/yaas/languages","stargazers_url":"https://api.github.com/repos/dmtucker/yaas/stargazers","contributors_url":"https://api.github.com/repos/dmtucker/yaas/contributors","subscribers_url":"https://api.github.com/repos/dmtucker/yaas/subscribers","subscription_url":"https://api.github.com/repos/dmtucker/yaas/subscription","commits_url":"https://api.github.com/repos/dmtucker/yaas/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmtucker/yaas/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmtucker/yaas/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmtucker/yaas/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmtucker/yaas/contents/{+path}","compare_url":"https://api.github.com/repos/dmtucker/yaas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmtucker/yaas/merges","archive_url":"https://api.github.com/repos/dmtucker/yaas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmtucker/yaas/downloads","issues_url":"https://api.github.com/repos/dmtucker/yaas/issues{/number}","pulls_url":"https://api.github.com/repos/dmtucker/yaas/pulls{/number}","milestones_url":"https://api.github.com/repos/dmtucker/yaas/milestones{/number}","notifications_url":"https://api.github.com/repos/dmtucker/yaas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmtucker/yaas/labels{/name}","releases_url":"https://api.github.com/repos/dmtucker/yaas/releases{/id}","created_at":"2015-09-09T21:37:25Z","updated_at":"2015-09-10T08:52:09Z","pushed_at":"2015-10-09T04:52:26Z","git_url":"git://github.com/dmtucker/yaas.git","ssh_url":"git@github.com:dmtucker/yaas.git","clone_url":"https://github.com/dmtucker/yaas.git","svn_url":"https://github.com/dmtucker/yaas","homepage":null,"size":502,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dmtucker/yaas/pulls/9"},"html":{"href":"https://github.com/dmtucker/yaas/pull/9"},"issue":{"href":"https://api.github.com/repos/dmtucker/yaas/issues/9"},"comments":{"href":"https://api.github.com/repos/dmtucker/yaas/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/dmtucker/yaas/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/dmtucker/yaas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dmtucker/yaas/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/dmtucker/yaas/statuses/7695480924bfde48f6c72ed22f925d3f58bb9d9a"}}}}