{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/170482152","pull_request_review_id":99170077,"id":170482152,"diff_hunk":"@@ -114,3 +114,67 @@ type CloudSpecResult struct {\n type CloudSpecResults struct {\n \tResults []CloudSpecResult `json:\"results,omitempty\"`\n }\n+\n+// CloudCredentialRequestParam defines a credential in terms of its cloud and name.\n+// It is used to request detailed content for the credential stored on the controller.\n+type CloudCredentialRequestParam struct {\n+\tCloudName      string `json:\"cloud-name\"`\n+\tCredentialName string `json:\"credential-name\"`\n+}\n+\n+func (p CloudCredentialRequestParam) IsEmpty() bool {\n+\treturn p.CloudName == \"\" && p.CredentialName == \"\"\n+}\n+\n+// CredentialContentRequestParam defines an input required to make a valid call\n+// to get credentials content stored on the controller.\n+type CredentialContentRequestParam struct {\n+\tCredentials    []CloudCredentialRequestParam `json:\"credentials,omitempty\"`\n+\tIncludeSecrets bool                          `json:\"include-secrets\"`\n+}\n+\n+// CloudCredential contains a cloud credential content.\n+type CredentialContent struct {","path":"apiserver/params/cloud.go","position":24,"original_position":24,"commit_id":"86082cd38b7bda30b4716d18894d3732d78e6b6a","original_commit_id":"86082cd38b7bda30b4716d18894d3732d78e6b6a","user":{"login":"wallyworld","id":5808968,"avatar_url":"https://avatars3.githubusercontent.com/u/5808968?v=4","gravatar_id":"","url":"https://api.github.com/users/wallyworld","html_url":"https://github.com/wallyworld","followers_url":"https://api.github.com/users/wallyworld/followers","following_url":"https://api.github.com/users/wallyworld/following{/other_user}","gists_url":"https://api.github.com/users/wallyworld/gists{/gist_id}","starred_url":"https://api.github.com/users/wallyworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wallyworld/subscriptions","organizations_url":"https://api.github.com/users/wallyworld/orgs","repos_url":"https://api.github.com/users/wallyworld/repos","events_url":"https://api.github.com/users/wallyworld/events{/privacy}","received_events_url":"https://api.github.com/users/wallyworld/received_events","type":"User","site_admin":false},"body":"Would be nice to add to the exiting CloudCredential struct instead of creating a new, similar one.\r\nThe the result for the controller credentials api call were a map[cloudname]CloudCredential, then the extra fields in the CloudCredential struct would be name and optional, omitempty secrets. Maybe just leave a TODO. But if we were to use a map in the controller credentials result, that would make the TODO easier to do later","created_at":"2018-02-26T02:23:38Z","updated_at":"2018-02-26T02:33:29Z","html_url":"https://github.com/juju/juju/pull/8422#discussion_r170482152","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/8422","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/170482152"},"html":{"href":"https://github.com/juju/juju/pull/8422#discussion_r170482152"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/8422"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/8422","id":171266726,"html_url":"https://github.com/juju/juju/pull/8422","diff_url":"https://github.com/juju/juju/pull/8422.diff","patch_url":"https://github.com/juju/juju/pull/8422.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/8422","number":8422,"state":"open","locked":false,"title":"Added apiserver call to get controller credentials and models that use them.","user":{"login":"anastasiamac","id":9034160,"avatar_url":"https://avatars0.githubusercontent.com/u/9034160?v=4","gravatar_id":"","url":"https://api.github.com/users/anastasiamac","html_url":"https://github.com/anastasiamac","followers_url":"https://api.github.com/users/anastasiamac/followers","following_url":"https://api.github.com/users/anastasiamac/following{/other_user}","gists_url":"https://api.github.com/users/anastasiamac/gists{/gist_id}","starred_url":"https://api.github.com/users/anastasiamac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastasiamac/subscriptions","organizations_url":"https://api.github.com/users/anastasiamac/orgs","repos_url":"https://api.github.com/users/anastasiamac/repos","events_url":"https://api.github.com/users/anastasiamac/events{/privacy}","received_events_url":"https://api.github.com/users/anastasiamac/received_events","type":"User","site_admin":false},"body":"## Description of change\r\n\r\nThis PR adds an apiserver call that allows credential owner to view the content of their credentials as stored on the controller, including models that use these credentials and what access level credential owner has to each of these models.\r\n\r\nFollow up PRs will provide api layer call as well as the CLI command to display this info.\r\n","created_at":"2018-02-26T01:53:08Z","updated_at":"2018-02-26T02:33:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2531e791a7c11b03dbee5a821dfd2a3a1391b7f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/8422/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/8422/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/8422/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/86082cd38b7bda30b4716d18894d3732d78e6b6a","head":{"label":"anastasiamac:cred-content-apiserver","ref":"cred-content-apiserver","sha":"86082cd38b7bda30b4716d18894d3732d78e6b6a","user":{"login":"anastasiamac","id":9034160,"avatar_url":"https://avatars0.githubusercontent.com/u/9034160?v=4","gravatar_id":"","url":"https://api.github.com/users/anastasiamac","html_url":"https://github.com/anastasiamac","followers_url":"https://api.github.com/users/anastasiamac/followers","following_url":"https://api.github.com/users/anastasiamac/following{/other_user}","gists_url":"https://api.github.com/users/anastasiamac/gists{/gist_id}","starred_url":"https://api.github.com/users/anastasiamac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastasiamac/subscriptions","organizations_url":"https://api.github.com/users/anastasiamac/orgs","repos_url":"https://api.github.com/users/anastasiamac/repos","events_url":"https://api.github.com/users/anastasiamac/events{/privacy}","received_events_url":"https://api.github.com/users/anastasiamac/received_events","type":"User","site_admin":false},"repo":{"id":24841340,"name":"juju","full_name":"anastasiamac/juju","owner":{"login":"anastasiamac","id":9034160,"avatar_url":"https://avatars0.githubusercontent.com/u/9034160?v=4","gravatar_id":"","url":"https://api.github.com/users/anastasiamac","html_url":"https://github.com/anastasiamac","followers_url":"https://api.github.com/users/anastasiamac/followers","following_url":"https://api.github.com/users/anastasiamac/following{/other_user}","gists_url":"https://api.github.com/users/anastasiamac/gists{/gist_id}","starred_url":"https://api.github.com/users/anastasiamac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastasiamac/subscriptions","organizations_url":"https://api.github.com/users/anastasiamac/orgs","repos_url":"https://api.github.com/users/anastasiamac/repos","events_url":"https://api.github.com/users/anastasiamac/events{/privacy}","received_events_url":"https://api.github.com/users/anastasiamac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anastasiamac/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/anastasiamac/juju","forks_url":"https://api.github.com/repos/anastasiamac/juju/forks","keys_url":"https://api.github.com/repos/anastasiamac/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anastasiamac/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anastasiamac/juju/teams","hooks_url":"https://api.github.com/repos/anastasiamac/juju/hooks","issue_events_url":"https://api.github.com/repos/anastasiamac/juju/issues/events{/number}","events_url":"https://api.github.com/repos/anastasiamac/juju/events","assignees_url":"https://api.github.com/repos/anastasiamac/juju/assignees{/user}","branches_url":"https://api.github.com/repos/anastasiamac/juju/branches{/branch}","tags_url":"https://api.github.com/repos/anastasiamac/juju/tags","blobs_url":"https://api.github.com/repos/anastasiamac/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anastasiamac/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anastasiamac/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/anastasiamac/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anastasiamac/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/anastasiamac/juju/languages","stargazers_url":"https://api.github.com/repos/anastasiamac/juju/stargazers","contributors_url":"https://api.github.com/repos/anastasiamac/juju/contributors","subscribers_url":"https://api.github.com/repos/anastasiamac/juju/subscribers","subscription_url":"https://api.github.com/repos/anastasiamac/juju/subscription","commits_url":"https://api.github.com/repos/anastasiamac/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/anastasiamac/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/anastasiamac/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/anastasiamac/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/anastasiamac/juju/contents/{+path}","compare_url":"https://api.github.com/repos/anastasiamac/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anastasiamac/juju/merges","archive_url":"https://api.github.com/repos/anastasiamac/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anastasiamac/juju/downloads","issues_url":"https://api.github.com/repos/anastasiamac/juju/issues{/number}","pulls_url":"https://api.github.com/repos/anastasiamac/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/anastasiamac/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/anastasiamac/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anastasiamac/juju/labels{/name}","releases_url":"https://api.github.com/repos/anastasiamac/juju/releases{/id}","deployments_url":"https://api.github.com/repos/anastasiamac/juju/deployments","created_at":"2014-10-06T10:12:53Z","updated_at":"2016-01-13T06:23:49Z","pushed_at":"2018-02-26T01:50:22Z","git_url":"git://github.com/anastasiamac/juju.git","ssh_url":"git@github.com:anastasiamac/juju.git","clone_url":"https://github.com/anastasiamac/juju.git","svn_url":"https://github.com/anastasiamac/juju","homepage":"juju.ubuntu.com","size":201224,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"juju:develop","ref":"develop","sha":"b7bb556529802ab026482a8fd95aa6dedc006028","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju/deployments","created_at":"2014-06-03T14:28:10Z","updated_at":"2018-02-23T09:19:30Z","pushed_at":"2018-02-26T01:53:45Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":206578,"stargazers_count":1107,"watchers_count":1107,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":257,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":257,"open_issues":12,"watchers":1107,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/8422"},"html":{"href":"https://github.com/juju/juju/pull/8422"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/8422"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/8422/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/8422/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/8422/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/86082cd38b7bda30b4716d18894d3732d78e6b6a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"wallyworld"}}