{"action":"closed","number":1131,"pull_request":{"url":"https://api.github.com/repos/gophercloud/gophercloud/pulls/1131","id":201782051,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNzgyMDUx","html_url":"https://github.com/gophercloud/gophercloud/pull/1131","diff_url":"https://github.com/gophercloud/gophercloud/pull/1131.diff","patch_url":"https://github.com/gophercloud/gophercloud/pull/1131.patch","issue_url":"https://api.github.com/repos/gophercloud/gophercloud/issues/1131","number":1131,"state":"closed","locked":false,"title":"Implements heat/orchestration stack update PATCH verb.","user":{"login":"scott-chaney","id":40778338,"node_id":"MDQ6VXNlcjQwNzc4MzM4","avatar_url":"https://avatars0.githubusercontent.com/u/40778338?v=4","gravatar_id":"","url":"https://api.github.com/users/scott-chaney","html_url":"https://github.com/scott-chaney","followers_url":"https://api.github.com/users/scott-chaney/followers","following_url":"https://api.github.com/users/scott-chaney/following{/other_user}","gists_url":"https://api.github.com/users/scott-chaney/gists{/gist_id}","starred_url":"https://api.github.com/users/scott-chaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scott-chaney/subscriptions","organizations_url":"https://api.github.com/users/scott-chaney/orgs","repos_url":"https://api.github.com/users/scott-chaney/repos","events_url":"https://api.github.com/users/scott-chaney/events{/privacy}","received_events_url":"https://api.github.com/users/scott-chaney/received_events","type":"User","site_admin":false},"body":"For #[[1101](https://github.com/gophercloud/gophercloud/issues/1101)]\r\n\r\nRelated Openstack code:\r\nhttps://github.com/openstack/heat/blob/master/heat/api/openstack/v1/stacks.py#L494\r\nhttps://github.com/openstack/heat/blob/master/heat/api/openstack/v1/__init__.py#L218\r\n\r\nSome notes on the implementation:\r\nBoth PUT and PATCH update verbs are acceptable, but the PATCH verb allows template parameter updates without needing to specify the template to the API call, where as PUT does require the template.  PATCH does accept a template, but does not delete the environment overlay as PUT does.  See `openstack/orchestration/v1/stacks/doc.go` for more information on PUT vs PATCH functionality.\r\n\r\nI ran this implementation by my colleagues and gophercloud contributors @problemv, @JackKuei  and @dkt26111 and we had some uncertainty on the most gophercloud appropriate manner to implement the PUT vs PATCH, specifically on both routes usage of` ToStackUpdateMaps()`.\r\n\r\nWe explored the following options:\r\n- Current method of having the Update functions pass in an \"existing\" flag to the `ToStackUpdateMap() `to reason if a template is required\r\n- Adding a private member to the `UpdateOpts` struct, \"existing\", that is set by the Update functions and then checked via new interface method in the `ToStackUpdateMap()` function\r\n- Using completely divergent paths for `Update()` and `UpdatePatch()` functions (new structs, new interfaces, new functions)\r\n- Moving the logic from the `ToStackUpdateMap()` function into the different update functions\r\n\r\nSince this feature of distinguishing between PUT and PATCH is somewhat unique to stack updates in GopherCloud,  we are hoping to get some feedback on which implementation fits best with in the language and project paradigms.","created_at":"2018-07-16T22:56:03Z","updated_at":"2018-07-21T01:42:43Z","closed_at":"2018-07-21T01:42:43Z","merged_at":"2018-07-21T01:42:43Z","merge_commit_sha":"9bb899a7c1d92abca2da4992cff2f284fdf62cce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gophercloud/gophercloud/pulls/1131/commits","review_comments_url":"https://api.github.com/repos/gophercloud/gophercloud/pulls/1131/comments","review_comment_url":"https://api.github.com/repos/gophercloud/gophercloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gophercloud/gophercloud/issues/1131/comments","statuses_url":"https://api.github.com/repos/gophercloud/gophercloud/statuses/3af94ea7ee27b6cd9231dbf5659b3b1aefedf859","head":{"label":"scott-chaney:orchestration-stack-updatepatch","ref":"orchestration-stack-updatepatch","sha":"3af94ea7ee27b6cd9231dbf5659b3b1aefedf859","user":{"login":"scott-chaney","id":40778338,"node_id":"MDQ6VXNlcjQwNzc4MzM4","avatar_url":"https://avatars0.githubusercontent.com/u/40778338?v=4","gravatar_id":"","url":"https://api.github.com/users/scott-chaney","html_url":"https://github.com/scott-chaney","followers_url":"https://api.github.com/users/scott-chaney/followers","following_url":"https://api.github.com/users/scott-chaney/following{/other_user}","gists_url":"https://api.github.com/users/scott-chaney/gists{/gist_id}","starred_url":"https://api.github.com/users/scott-chaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scott-chaney/subscriptions","organizations_url":"https://api.github.com/users/scott-chaney/orgs","repos_url":"https://api.github.com/users/scott-chaney/repos","events_url":"https://api.github.com/users/scott-chaney/events{/privacy}","received_events_url":"https://api.github.com/users/scott-chaney/received_events","type":"User","site_admin":false},"repo":{"id":139902676,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk5MDI2NzY=","name":"gophercloud","full_name":"scott-chaney/gophercloud","owner":{"login":"scott-chaney","id":40778338,"node_id":"MDQ6VXNlcjQwNzc4MzM4","avatar_url":"https://avatars0.githubusercontent.com/u/40778338?v=4","gravatar_id":"","url":"https://api.github.com/users/scott-chaney","html_url":"https://github.com/scott-chaney","followers_url":"https://api.github.com/users/scott-chaney/followers","following_url":"https://api.github.com/users/scott-chaney/following{/other_user}","gists_url":"https://api.github.com/users/scott-chaney/gists{/gist_id}","starred_url":"https://api.github.com/users/scott-chaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scott-chaney/subscriptions","organizations_url":"https://api.github.com/users/scott-chaney/orgs","repos_url":"https://api.github.com/users/scott-chaney/repos","events_url":"https://api.github.com/users/scott-chaney/events{/privacy}","received_events_url":"https://api.github.com/users/scott-chaney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scott-chaney/gophercloud","description":"Gophercloud: an OpenStack SDK for Go","fork":true,"url":"https://api.github.com/repos/scott-chaney/gophercloud","forks_url":"https://api.github.com/repos/scott-chaney/gophercloud/forks","keys_url":"https://api.github.com/repos/scott-chaney/gophercloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scott-chaney/gophercloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scott-chaney/gophercloud/teams","hooks_url":"https://api.github.com/repos/scott-chaney/gophercloud/hooks","issue_events_url":"https://api.github.com/repos/scott-chaney/gophercloud/issues/events{/number}","events_url":"https://api.github.com/repos/scott-chaney/gophercloud/events","assignees_url":"https://api.github.com/repos/scott-chaney/gophercloud/assignees{/user}","branches_url":"https://api.github.com/repos/scott-chaney/gophercloud/branches{/branch}","tags_url":"https://api.github.com/repos/scott-chaney/gophercloud/tags","blobs_url":"https://api.github.com/repos/scott-chaney/gophercloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scott-chaney/gophercloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scott-chaney/gophercloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/scott-chaney/gophercloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scott-chaney/gophercloud/statuses/{sha}","languages_url":"https://api.github.com/repos/scott-chaney/gophercloud/languages","stargazers_url":"https://api.github.com/repos/scott-chaney/gophercloud/stargazers","contributors_url":"https://api.github.com/repos/scott-chaney/gophercloud/contributors","subscribers_url":"https://api.github.com/repos/scott-chaney/gophercloud/subscribers","subscription_url":"https://api.github.com/repos/scott-chaney/gophercloud/subscription","commits_url":"https://api.github.com/repos/scott-chaney/gophercloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/scott-chaney/gophercloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/scott-chaney/gophercloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/scott-chaney/gophercloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/scott-chaney/gophercloud/contents/{+path}","compare_url":"https://api.github.com/repos/scott-chaney/gophercloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scott-chaney/gophercloud/merges","archive_url":"https://api.github.com/repos/scott-chaney/gophercloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scott-chaney/gophercloud/downloads","issues_url":"https://api.github.com/repos/scott-chaney/gophercloud/issues{/number}","pulls_url":"https://api.github.com/repos/scott-chaney/gophercloud/pulls{/number}","milestones_url":"https://api.github.com/repos/scott-chaney/gophercloud/milestones{/number}","notifications_url":"https://api.github.com/repos/scott-chaney/gophercloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scott-chaney/gophercloud/labels{/name}","releases_url":"https://api.github.com/repos/scott-chaney/gophercloud/releases{/id}","deployments_url":"https://api.github.com/repos/scott-chaney/gophercloud/deployments","created_at":"2018-07-05T21:31:42Z","updated_at":"2018-07-05T21:31:47Z","pushed_at":"2018-07-18T20:50:15Z","git_url":"git://github.com/scott-chaney/gophercloud.git","ssh_url":"git@github.com:scott-chaney/gophercloud.git","clone_url":"https://github.com/scott-chaney/gophercloud.git","svn_url":"https://github.com/scott-chaney/gophercloud","homepage":"","size":5602,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gophercloud:master","ref":"master","sha":"edd944db6f0236dd272a0a320d2cd02cfeea6425","user":{"login":"gophercloud","id":13769691,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzY5Njkx","avatar_url":"https://avatars0.githubusercontent.com/u/13769691?v=4","gravatar_id":"","url":"https://api.github.com/users/gophercloud","html_url":"https://github.com/gophercloud","followers_url":"https://api.github.com/users/gophercloud/followers","following_url":"https://api.github.com/users/gophercloud/following{/other_user}","gists_url":"https://api.github.com/users/gophercloud/gists{/gist_id}","starred_url":"https://api.github.com/users/gophercloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gophercloud/subscriptions","organizations_url":"https://api.github.com/users/gophercloud/orgs","repos_url":"https://api.github.com/users/gophercloud/repos","events_url":"https://api.github.com/users/gophercloud/events{/privacy}","received_events_url":"https://api.github.com/users/gophercloud/received_events","type":"Organization","site_admin":false},"repo":{"id":40673116,"node_id":"MDEwOlJlcG9zaXRvcnk0MDY3MzExNg==","name":"gophercloud","full_name":"gophercloud/gophercloud","owner":{"login":"gophercloud","id":13769691,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzY5Njkx","avatar_url":"https://avatars0.githubusercontent.com/u/13769691?v=4","gravatar_id":"","url":"https://api.github.com/users/gophercloud","html_url":"https://github.com/gophercloud","followers_url":"https://api.github.com/users/gophercloud/followers","following_url":"https://api.github.com/users/gophercloud/following{/other_user}","gists_url":"https://api.github.com/users/gophercloud/gists{/gist_id}","starred_url":"https://api.github.com/users/gophercloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gophercloud/subscriptions","organizations_url":"https://api.github.com/users/gophercloud/orgs","repos_url":"https://api.github.com/users/gophercloud/repos","events_url":"https://api.github.com/users/gophercloud/events{/privacy}","received_events_url":"https://api.github.com/users/gophercloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gophercloud/gophercloud","description":"Gophercloud: an OpenStack SDK for Go","fork":false,"url":"https://api.github.com/repos/gophercloud/gophercloud","forks_url":"https://api.github.com/repos/gophercloud/gophercloud/forks","keys_url":"https://api.github.com/repos/gophercloud/gophercloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gophercloud/gophercloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gophercloud/gophercloud/teams","hooks_url":"https://api.github.com/repos/gophercloud/gophercloud/hooks","issue_events_url":"https://api.github.com/repos/gophercloud/gophercloud/issues/events{/number}","events_url":"https://api.github.com/repos/gophercloud/gophercloud/events","assignees_url":"https://api.github.com/repos/gophercloud/gophercloud/assignees{/user}","branches_url":"https://api.github.com/repos/gophercloud/gophercloud/branches{/branch}","tags_url":"https://api.github.com/repos/gophercloud/gophercloud/tags","blobs_url":"https://api.github.com/repos/gophercloud/gophercloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gophercloud/gophercloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gophercloud/gophercloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/gophercloud/gophercloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gophercloud/gophercloud/statuses/{sha}","languages_url":"https://api.github.com/repos/gophercloud/gophercloud/languages","stargazers_url":"https://api.github.com/repos/gophercloud/gophercloud/stargazers","contributors_url":"https://api.github.com/repos/gophercloud/gophercloud/contributors","subscribers_url":"https://api.github.com/repos/gophercloud/gophercloud/subscribers","subscription_url":"https://api.github.com/repos/gophercloud/gophercloud/subscription","commits_url":"https://api.github.com/repos/gophercloud/gophercloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/gophercloud/gophercloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/gophercloud/gophercloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/gophercloud/gophercloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/gophercloud/gophercloud/contents/{+path}","compare_url":"https://api.github.com/repos/gophercloud/gophercloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gophercloud/gophercloud/merges","archive_url":"https://api.github.com/repos/gophercloud/gophercloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gophercloud/gophercloud/downloads","issues_url":"https://api.github.com/repos/gophercloud/gophercloud/issues{/number}","pulls_url":"https://api.github.com/repos/gophercloud/gophercloud/pulls{/number}","milestones_url":"https://api.github.com/repos/gophercloud/gophercloud/milestones{/number}","notifications_url":"https://api.github.com/repos/gophercloud/gophercloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gophercloud/gophercloud/labels{/name}","releases_url":"https://api.github.com/repos/gophercloud/gophercloud/releases{/id}","deployments_url":"https://api.github.com/repos/gophercloud/gophercloud/deployments","created_at":"2015-08-13T17:44:17Z","updated_at":"2018-07-18T15:03:20Z","pushed_at":"2018-07-21T01:42:43Z","git_url":"git://github.com/gophercloud/gophercloud.git","ssh_url":"git@github.com:gophercloud/gophercloud.git","clone_url":"https://github.com/gophercloud/gophercloud.git","svn_url":"https://github.com/gophercloud/gophercloud","homepage":"","size":5596,"stargazers_count":194,"watchers_count":194,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":186,"mirror_url":null,"archived":false,"open_issues_count":56,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":186,"open_issues":56,"watchers":194,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gophercloud/gophercloud/pulls/1131"},"html":{"href":"https://github.com/gophercloud/gophercloud/pull/1131"},"issue":{"href":"https://api.github.com/repos/gophercloud/gophercloud/issues/1131"},"comments":{"href":"https://api.github.com/repos/gophercloud/gophercloud/issues/1131/comments"},"review_comments":{"href":"https://api.github.com/repos/gophercloud/gophercloud/pulls/1131/comments"},"review_comment":{"href":"https://api.github.com/repos/gophercloud/gophercloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gophercloud/gophercloud/pulls/1131/commits"},"statuses":{"href":"https://api.github.com/repos/gophercloud/gophercloud/statuses/3af94ea7ee27b6cd9231dbf5659b3b1aefedf859"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"jtopjian","id":46959,"node_id":"MDQ6VXNlcjQ2OTU5","avatar_url":"https://avatars0.githubusercontent.com/u/46959?v=4","gravatar_id":"","url":"https://api.github.com/users/jtopjian","html_url":"https://github.com/jtopjian","followers_url":"https://api.github.com/users/jtopjian/followers","following_url":"https://api.github.com/users/jtopjian/following{/other_user}","gists_url":"https://api.github.com/users/jtopjian/gists{/gist_id}","starred_url":"https://api.github.com/users/jtopjian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtopjian/subscriptions","organizations_url":"https://api.github.com/users/jtopjian/orgs","repos_url":"https://api.github.com/users/jtopjian/repos","events_url":"https://api.github.com/users/jtopjian/events{/privacy}","received_events_url":"https://api.github.com/users/jtopjian/received_events","type":"User","site_admin":false},"comments":11,"review_comments":7,"maintainer_can_modify":false,"commits":3,"additions":223,"deletions":27,"changed_files":6}}
{"actor":{"display_login":"jtopjian"}}