{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments/88989129","pull_request_review_id":9543579,"id":88989129,"diff_hunk":"@@ -97,8 +97,20 @@ def rotate_encryption_key(bucket_name, blob_name, base64_encryption_key,\n                           base64_new_encryption_key):\n     \"\"\"Performs a key rotation by re-writing an encrypted blob with a new\n     encryption key.\"\"\"\n-    raise NotImplementedError(\n-        'This is currently not available using the Cloud Client Library.')\n+    storage_client = storage.Client()\n+    bucket = storage_client.get_bucket(bucket_name)\n+    current_encryption_key = base64.b64decode(base64_encryption_key)\n+    new_encryption_key = base64.b64decode(base64_new_encryption_key)\n+    # Both source_blob and destination_blob refer to the same storage object,","path":"storage/cloud-client/encryption.py","position":10,"original_position":10,"commit_id":"150ee3e5b22a49d834fe5a8a7c1703138cd6743c","original_commit_id":"150ee3e5b22a49d834fe5a8a7c1703138cd6743c","user":{"login":"ryanmats","id":21369071,"avatar_url":"https://avatars.githubusercontent.com/u/21369071?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanmats","html_url":"https://github.com/ryanmats","followers_url":"https://api.github.com/users/ryanmats/followers","following_url":"https://api.github.com/users/ryanmats/following{/other_user}","gists_url":"https://api.github.com/users/ryanmats/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanmats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanmats/subscriptions","organizations_url":"https://api.github.com/users/ryanmats/orgs","repos_url":"https://api.github.com/users/ryanmats/repos","events_url":"https://api.github.com/users/ryanmats/events{/privacy}","received_events_url":"https://api.github.com/users/ryanmats/received_events","type":"User","site_admin":false},"body":"done","created_at":"2016-11-21T21:14:35Z","updated_at":"2016-11-21T21:14:35Z","html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/672#discussion_r88989129","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments/88989129"},"html":{"href":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/672#discussion_r88989129"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672","id":94299254,"html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/672","diff_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/672.diff","patch_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/672.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/672","number":672,"state":"open","locked":false,"title":"Storage Encryption Key Rotation Sample using Veneer + Tests","user":{"login":"ryanmats","id":21369071,"avatar_url":"https://avatars.githubusercontent.com/u/21369071?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanmats","html_url":"https://github.com/ryanmats","followers_url":"https://api.github.com/users/ryanmats/followers","following_url":"https://api.github.com/users/ryanmats/following{/other_user}","gists_url":"https://api.github.com/users/ryanmats/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanmats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanmats/subscriptions","organizations_url":"https://api.github.com/users/ryanmats/orgs","repos_url":"https://api.github.com/users/ryanmats/repos","events_url":"https://api.github.com/users/ryanmats/events{/privacy}","received_events_url":"https://api.github.com/users/ryanmats/received_events","type":"User","site_admin":false},"body":"Cloud Storage encryption key rotation sample in veneer:\r\n- Implemented rotate_encryption_key\r\n- Added test_rotate_encryption_key and made another minor fix to test file\r\n- Verified that all tests pass both programmatically and from command line\r\n\r\nFeature Request 32908100 in Buganizer","created_at":"2016-11-18T03:59:22Z","updated_at":"2016-11-21T21:14:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73800e1fa6bd34c8969bca9eac8d723eb749d3f6","assignee":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"assignees":[{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/672/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/150ee3e5b22a49d834fe5a8a7c1703138cd6743c","head":{"label":"GoogleCloudPlatform:storage-encryption-veneer-rotate","ref":"storage-encryption-veneer-rotate","sha":"150ee3e5b22a49d834fe5a8a7c1703138cd6743c","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":35065876,"name":"python-docs-samples","full_name":"GoogleCloudPlatform/python-docs-samples","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples","description":"Code samples used on cloud.google.com","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/deployments","created_at":"2015-05-04T23:26:13Z","updated_at":"2016-11-21T09:49:04Z","pushed_at":"2016-11-21T21:13:47Z","git_url":"git://github.com/GoogleCloudPlatform/python-docs-samples.git","ssh_url":"git@github.com:GoogleCloudPlatform/python-docs-samples.git","clone_url":"https://github.com/GoogleCloudPlatform/python-docs-samples.git","svn_url":"https://github.com/GoogleCloudPlatform/python-docs-samples","homepage":"","size":4848,"stargazers_count":403,"watchers_count":403,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":429,"mirror_url":null,"open_issues_count":19,"forks":429,"open_issues":19,"watchers":403,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"aa8a46301636053b7706e85ee3a7792bc51a9caf","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":35065876,"name":"python-docs-samples","full_name":"GoogleCloudPlatform/python-docs-samples","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples","description":"Code samples used on cloud.google.com","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/deployments","created_at":"2015-05-04T23:26:13Z","updated_at":"2016-11-21T09:49:04Z","pushed_at":"2016-11-21T21:13:47Z","git_url":"git://github.com/GoogleCloudPlatform/python-docs-samples.git","ssh_url":"git@github.com:GoogleCloudPlatform/python-docs-samples.git","clone_url":"https://github.com/GoogleCloudPlatform/python-docs-samples.git","svn_url":"https://github.com/GoogleCloudPlatform/python-docs-samples","homepage":"","size":4848,"stargazers_count":403,"watchers_count":403,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":429,"mirror_url":null,"open_issues_count":19,"forks":429,"open_issues":19,"watchers":403,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672"},"html":{"href":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/672"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/672"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/672/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/672/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/150ee3e5b22a49d834fe5a8a7c1703138cd6743c"}}}}
{"actor":{"display_login":"ryanmats"}}