{"action":"created","comment":{"url":"https://api.github.com/repos/quipucords/camayoc/pulls/comments/165380363","pull_request_review_id":93309383,"id":165380363,"diff_hunk":"@@ -26,16 +26,17 @@\n \n def generate_show_output(data):\n     \"\"\"Generate a regex pattern with the data for a qpc cred show output.\"\"\"\n+    cred_type = data.get('cred_type', 'network')\n     output = '{\\r\\n'\n-    output += '    \"become_method\": \"{}\",\\r\\n'.format(\n-        data.get('become_method', 'sudo'))\n-    if 'become_password' in data:\n-        output += '    \"become_password\": \"{}\",\\r\\n'.format(\n-            data['become_password'])\n-    output += '    \"become_user\": \"{}\",\\r\\n'.format(\n-        data.get('become_user', 'root'))\n-    output += '    \"cred_type\": \"{}\",\\r\\n'.format(\n-        data.get('cred_type', 'network'))\n+    if cred_type == 'network':\n+        output += '    \"become_method\": \"{}\",\\r\\n'.format(\n+            data.get('become_method', 'sudo'))","path":"camayoc/tests/qcs/cli/test_credentials.py","position":17,"original_position":17,"commit_id":"afcf3180e9f4ad2c3ceba45060736bf9d4c4b4f6","original_commit_id":"afcf3180e9f4ad2c3ceba45060736bf9d4c4b4f6","user":{"login":"elyezer","id":48132,"avatar_url":"https://avatars1.githubusercontent.com/u/48132?v=4","gravatar_id":"","url":"https://api.github.com/users/elyezer","html_url":"https://github.com/elyezer","followers_url":"https://api.github.com/users/elyezer/followers","following_url":"https://api.github.com/users/elyezer/following{/other_user}","gists_url":"https://api.github.com/users/elyezer/gists{/gist_id}","starred_url":"https://api.github.com/users/elyezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyezer/subscriptions","organizations_url":"https://api.github.com/users/elyezer/orgs","repos_url":"https://api.github.com/users/elyezer/repos","events_url":"https://api.github.com/users/elyezer/events{/privacy}","received_events_url":"https://api.github.com/users/elyezer/received_events","type":"User","site_admin":false},"body":"become_method has the default of sudo, that is why whenever a network credential is created the value will be presented as sudo even if no become_method is passed during the creation.","created_at":"2018-02-01T14:58:12Z","updated_at":"2018-02-01T14:58:12Z","html_url":"https://github.com/quipucords/camayoc/pull/133#discussion_r165380363","pull_request_url":"https://api.github.com/repos/quipucords/camayoc/pulls/133","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/quipucords/camayoc/pulls/comments/165380363"},"html":{"href":"https://github.com/quipucords/camayoc/pull/133#discussion_r165380363"},"pull_request":{"href":"https://api.github.com/repos/quipucords/camayoc/pulls/133"}},"in_reply_to_id":165376326},"pull_request":{"url":"https://api.github.com/repos/quipucords/camayoc/pulls/133","id":166329961,"html_url":"https://github.com/quipucords/camayoc/pull/133","diff_url":"https://github.com/quipucords/camayoc/pull/133.diff","patch_url":"https://github.com/quipucords/camayoc/pull/133.patch","issue_url":"https://api.github.com/repos/quipucords/camayoc/issues/133","number":133,"state":"open","locked":false,"title":"Update CLI crendentials tests to include the type","user":{"login":"elyezer","id":48132,"avatar_url":"https://avatars1.githubusercontent.com/u/48132?v=4","gravatar_id":"","url":"https://api.github.com/users/elyezer","html_url":"https://github.com/elyezer","followers_url":"https://api.github.com/users/elyezer/followers","following_url":"https://api.github.com/users/elyezer/following{/other_user}","gists_url":"https://api.github.com/users/elyezer/gists{/gist_id}","starred_url":"https://api.github.com/users/elyezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyezer/subscriptions","organizations_url":"https://api.github.com/users/elyezer/orgs","repos_url":"https://api.github.com/users/elyezer/repos","events_url":"https://api.github.com/users/elyezer/events{/privacy}","received_events_url":"https://api.github.com/users/elyezer/received_events","type":"User","site_admin":false},"body":"Update tests to test other types than network only.\r\n\r\nClose #128","created_at":"2018-01-31T17:43:35Z","updated_at":"2018-02-01T14:58:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"583f993984dd38cd25cdae1edfb04686427aee53","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/quipucords/camayoc/pulls/133/commits","review_comments_url":"https://api.github.com/repos/quipucords/camayoc/pulls/133/comments","review_comment_url":"https://api.github.com/repos/quipucords/camayoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quipucords/camayoc/issues/133/comments","statuses_url":"https://api.github.com/repos/quipucords/camayoc/statuses/afcf3180e9f4ad2c3ceba45060736bf9d4c4b4f6","head":{"label":"quipucords:issues/128","ref":"issues/128","sha":"afcf3180e9f4ad2c3ceba45060736bf9d4c4b4f6","user":{"login":"quipucords","id":29148065,"avatar_url":"https://avatars0.githubusercontent.com/u/29148065?v=4","gravatar_id":"","url":"https://api.github.com/users/quipucords","html_url":"https://github.com/quipucords","followers_url":"https://api.github.com/users/quipucords/followers","following_url":"https://api.github.com/users/quipucords/following{/other_user}","gists_url":"https://api.github.com/users/quipucords/gists{/gist_id}","starred_url":"https://api.github.com/users/quipucords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipucords/subscriptions","organizations_url":"https://api.github.com/users/quipucords/orgs","repos_url":"https://api.github.com/users/quipucords/repos","events_url":"https://api.github.com/users/quipucords/events{/privacy}","received_events_url":"https://api.github.com/users/quipucords/received_events","type":"Organization","site_admin":false},"repo":{"id":95137300,"name":"camayoc","full_name":"quipucords/camayoc","owner":{"login":"quipucords","id":29148065,"avatar_url":"https://avatars0.githubusercontent.com/u/29148065?v=4","gravatar_id":"","url":"https://api.github.com/users/quipucords","html_url":"https://github.com/quipucords","followers_url":"https://api.github.com/users/quipucords/followers","following_url":"https://api.github.com/users/quipucords/following{/other_user}","gists_url":"https://api.github.com/users/quipucords/gists{/gist_id}","starred_url":"https://api.github.com/users/quipucords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipucords/subscriptions","organizations_url":"https://api.github.com/users/quipucords/orgs","repos_url":"https://api.github.com/users/quipucords/repos","events_url":"https://api.github.com/users/quipucords/events{/privacy}","received_events_url":"https://api.github.com/users/quipucords/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quipucords/camayoc","description":"A GPL-licensed Python library that facilitates functional testing of quipucords.","fork":false,"url":"https://api.github.com/repos/quipucords/camayoc","forks_url":"https://api.github.com/repos/quipucords/camayoc/forks","keys_url":"https://api.github.com/repos/quipucords/camayoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quipucords/camayoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quipucords/camayoc/teams","hooks_url":"https://api.github.com/repos/quipucords/camayoc/hooks","issue_events_url":"https://api.github.com/repos/quipucords/camayoc/issues/events{/number}","events_url":"https://api.github.com/repos/quipucords/camayoc/events","assignees_url":"https://api.github.com/repos/quipucords/camayoc/assignees{/user}","branches_url":"https://api.github.com/repos/quipucords/camayoc/branches{/branch}","tags_url":"https://api.github.com/repos/quipucords/camayoc/tags","blobs_url":"https://api.github.com/repos/quipucords/camayoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quipucords/camayoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quipucords/camayoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/quipucords/camayoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quipucords/camayoc/statuses/{sha}","languages_url":"https://api.github.com/repos/quipucords/camayoc/languages","stargazers_url":"https://api.github.com/repos/quipucords/camayoc/stargazers","contributors_url":"https://api.github.com/repos/quipucords/camayoc/contributors","subscribers_url":"https://api.github.com/repos/quipucords/camayoc/subscribers","subscription_url":"https://api.github.com/repos/quipucords/camayoc/subscription","commits_url":"https://api.github.com/repos/quipucords/camayoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/quipucords/camayoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/quipucords/camayoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/quipucords/camayoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/quipucords/camayoc/contents/{+path}","compare_url":"https://api.github.com/repos/quipucords/camayoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quipucords/camayoc/merges","archive_url":"https://api.github.com/repos/quipucords/camayoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quipucords/camayoc/downloads","issues_url":"https://api.github.com/repos/quipucords/camayoc/issues{/number}","pulls_url":"https://api.github.com/repos/quipucords/camayoc/pulls{/number}","milestones_url":"https://api.github.com/repos/quipucords/camayoc/milestones{/number}","notifications_url":"https://api.github.com/repos/quipucords/camayoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quipucords/camayoc/labels{/name}","releases_url":"https://api.github.com/repos/quipucords/camayoc/releases{/id}","deployments_url":"https://api.github.com/repos/quipucords/camayoc/deployments","created_at":"2017-06-22T16:53:41Z","updated_at":"2017-06-22T17:59:04Z","pushed_at":"2018-02-01T13:40:35Z","git_url":"git://github.com/quipucords/camayoc.git","ssh_url":"git@github.com:quipucords/camayoc.git","clone_url":"https://github.com/quipucords/camayoc.git","svn_url":"https://github.com/quipucords/camayoc","homepage":null,"size":216,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"quipucords:master","ref":"master","sha":"61757e9f352838b54ead14d68a1f69f8089f7565","user":{"login":"quipucords","id":29148065,"avatar_url":"https://avatars0.githubusercontent.com/u/29148065?v=4","gravatar_id":"","url":"https://api.github.com/users/quipucords","html_url":"https://github.com/quipucords","followers_url":"https://api.github.com/users/quipucords/followers","following_url":"https://api.github.com/users/quipucords/following{/other_user}","gists_url":"https://api.github.com/users/quipucords/gists{/gist_id}","starred_url":"https://api.github.com/users/quipucords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipucords/subscriptions","organizations_url":"https://api.github.com/users/quipucords/orgs","repos_url":"https://api.github.com/users/quipucords/repos","events_url":"https://api.github.com/users/quipucords/events{/privacy}","received_events_url":"https://api.github.com/users/quipucords/received_events","type":"Organization","site_admin":false},"repo":{"id":95137300,"name":"camayoc","full_name":"quipucords/camayoc","owner":{"login":"quipucords","id":29148065,"avatar_url":"https://avatars0.githubusercontent.com/u/29148065?v=4","gravatar_id":"","url":"https://api.github.com/users/quipucords","html_url":"https://github.com/quipucords","followers_url":"https://api.github.com/users/quipucords/followers","following_url":"https://api.github.com/users/quipucords/following{/other_user}","gists_url":"https://api.github.com/users/quipucords/gists{/gist_id}","starred_url":"https://api.github.com/users/quipucords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipucords/subscriptions","organizations_url":"https://api.github.com/users/quipucords/orgs","repos_url":"https://api.github.com/users/quipucords/repos","events_url":"https://api.github.com/users/quipucords/events{/privacy}","received_events_url":"https://api.github.com/users/quipucords/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quipucords/camayoc","description":"A GPL-licensed Python library that facilitates functional testing of quipucords.","fork":false,"url":"https://api.github.com/repos/quipucords/camayoc","forks_url":"https://api.github.com/repos/quipucords/camayoc/forks","keys_url":"https://api.github.com/repos/quipucords/camayoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quipucords/camayoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quipucords/camayoc/teams","hooks_url":"https://api.github.com/repos/quipucords/camayoc/hooks","issue_events_url":"https://api.github.com/repos/quipucords/camayoc/issues/events{/number}","events_url":"https://api.github.com/repos/quipucords/camayoc/events","assignees_url":"https://api.github.com/repos/quipucords/camayoc/assignees{/user}","branches_url":"https://api.github.com/repos/quipucords/camayoc/branches{/branch}","tags_url":"https://api.github.com/repos/quipucords/camayoc/tags","blobs_url":"https://api.github.com/repos/quipucords/camayoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quipucords/camayoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quipucords/camayoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/quipucords/camayoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quipucords/camayoc/statuses/{sha}","languages_url":"https://api.github.com/repos/quipucords/camayoc/languages","stargazers_url":"https://api.github.com/repos/quipucords/camayoc/stargazers","contributors_url":"https://api.github.com/repos/quipucords/camayoc/contributors","subscribers_url":"https://api.github.com/repos/quipucords/camayoc/subscribers","subscription_url":"https://api.github.com/repos/quipucords/camayoc/subscription","commits_url":"https://api.github.com/repos/quipucords/camayoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/quipucords/camayoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/quipucords/camayoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/quipucords/camayoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/quipucords/camayoc/contents/{+path}","compare_url":"https://api.github.com/repos/quipucords/camayoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quipucords/camayoc/merges","archive_url":"https://api.github.com/repos/quipucords/camayoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quipucords/camayoc/downloads","issues_url":"https://api.github.com/repos/quipucords/camayoc/issues{/number}","pulls_url":"https://api.github.com/repos/quipucords/camayoc/pulls{/number}","milestones_url":"https://api.github.com/repos/quipucords/camayoc/milestones{/number}","notifications_url":"https://api.github.com/repos/quipucords/camayoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quipucords/camayoc/labels{/name}","releases_url":"https://api.github.com/repos/quipucords/camayoc/releases{/id}","deployments_url":"https://api.github.com/repos/quipucords/camayoc/deployments","created_at":"2017-06-22T16:53:41Z","updated_at":"2017-06-22T17:59:04Z","pushed_at":"2018-02-01T13:40:35Z","git_url":"git://github.com/quipucords/camayoc.git","ssh_url":"git@github.com:quipucords/camayoc.git","clone_url":"https://github.com/quipucords/camayoc.git","svn_url":"https://github.com/quipucords/camayoc","homepage":null,"size":216,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quipucords/camayoc/pulls/133"},"html":{"href":"https://github.com/quipucords/camayoc/pull/133"},"issue":{"href":"https://api.github.com/repos/quipucords/camayoc/issues/133"},"comments":{"href":"https://api.github.com/repos/quipucords/camayoc/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/quipucords/camayoc/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/quipucords/camayoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quipucords/camayoc/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/quipucords/camayoc/statuses/afcf3180e9f4ad2c3ceba45060736bf9d4c4b4f6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"elyezer"}}