{"action":"created","comment":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments/189645017","pull_request_review_id":121864271,"id":189645017,"diff_hunk":"@@ -86,7 +88,14 @@ def get_storage_keys(storage_account_id):\n     def get_storage_from_uri(storage_uri):\n         parts = urlparse(storage_uri)\n         storage_name = str(parts.netloc).partition('.')[0]\n-        container_name = parts.path.partition('/')[2]\n+\n+        path_parts = os.path.split(parts.path)\n+        container_name = path_parts[0].strip('/')\n+        if len(path_parts) > 1:\n+            key_prefix = path_parts[1].strip('/')","path":"tools/c7n_azure/c7n_azure/storage_utils.py","position":39,"original_position":39,"commit_id":"9cab0b6b5355d651bb23c1924ca7b9f68e37eb20","original_commit_id":"9cab0b6b5355d651bb23c1924ca7b9f68e37eb20","user":{"login":"stefangordon","id":4087345,"avatar_url":"https://avatars3.githubusercontent.com/u/4087345?v=4","gravatar_id":"","url":"https://api.github.com/users/stefangordon","html_url":"https://github.com/stefangordon","followers_url":"https://api.github.com/users/stefangordon/followers","following_url":"https://api.github.com/users/stefangordon/following{/other_user}","gists_url":"https://api.github.com/users/stefangordon/gists{/gist_id}","starred_url":"https://api.github.com/users/stefangordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefangordon/subscriptions","organizations_url":"https://api.github.com/users/stefangordon/orgs","repos_url":"https://api.github.com/users/stefangordon/repos","events_url":"https://api.github.com/users/stefangordon/events{/privacy}","received_events_url":"https://api.github.com/users/stefangordon/received_events","type":"User","site_admin":false},"body":"At the moment only planning to support a container, and custodian builds the directory structure after the container, but we can probably make it let them specify arbitrary virtual directories","created_at":"2018-05-21T16:39:01Z","updated_at":"2018-05-21T16:39:01Z","html_url":"https://github.com/capitalone/cloud-custodian/pull/2426#discussion_r189645017","pull_request_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments/189645017"},"html":{"href":"https://github.com/capitalone/cloud-custodian/pull/2426#discussion_r189645017"},"pull_request":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426"}},"in_reply_to_id":189642707},"pull_request":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426","id":189413339,"html_url":"https://github.com/capitalone/cloud-custodian/pull/2426","diff_url":"https://github.com/capitalone/cloud-custodian/pull/2426.diff","patch_url":"https://github.com/capitalone/cloud-custodian/pull/2426.patch","issue_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2426","number":2426,"state":"open","locked":false,"title":"Azure - Support blob output for logs/resources","user":{"login":"stefangordon","id":4087345,"avatar_url":"https://avatars3.githubusercontent.com/u/4087345?v=4","gravatar_id":"","url":"https://api.github.com/users/stefangordon","html_url":"https://github.com/stefangordon","followers_url":"https://api.github.com/users/stefangordon/followers","following_url":"https://api.github.com/users/stefangordon/following{/other_user}","gists_url":"https://api.github.com/users/stefangordon/gists{/gist_id}","starred_url":"https://api.github.com/users/stefangordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefangordon/subscriptions","organizations_url":"https://api.github.com/users/stefangordon/orgs","repos_url":"https://api.github.com/users/stefangordon/repos","events_url":"https://api.github.com/users/stefangordon/events{/privacy}","received_events_url":"https://api.github.com/users/stefangordon/received_events","type":"User","site_admin":false},"body":"Works roughly the same way as S3 output with `azure://` prefix.  \r\n\r\nDocumentation incoming in a separate PR as I have quite a few doc changes to do together.","created_at":"2018-05-21T15:34:33Z","updated_at":"2018-05-21T16:39:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b881c84bc950b653d571b3df89570d6fc1b22e7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":876678619,"url":"https://api.github.com/repos/capitalone/cloud-custodian/labels/cloud/azure","name":"cloud/azure","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426/commits","review_comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426/comments","review_comment_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments{/number}","comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2426/comments","statuses_url":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/9cab0b6b5355d651bb23c1924ca7b9f68e37eb20","head":{"label":"stefangordon:blob_output","ref":"blob_output","sha":"9cab0b6b5355d651bb23c1924ca7b9f68e37eb20","user":{"login":"stefangordon","id":4087345,"avatar_url":"https://avatars3.githubusercontent.com/u/4087345?v=4","gravatar_id":"","url":"https://api.github.com/users/stefangordon","html_url":"https://github.com/stefangordon","followers_url":"https://api.github.com/users/stefangordon/followers","following_url":"https://api.github.com/users/stefangordon/following{/other_user}","gists_url":"https://api.github.com/users/stefangordon/gists{/gist_id}","starred_url":"https://api.github.com/users/stefangordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefangordon/subscriptions","organizations_url":"https://api.github.com/users/stefangordon/orgs","repos_url":"https://api.github.com/users/stefangordon/repos","events_url":"https://api.github.com/users/stefangordon/events{/privacy}","received_events_url":"https://api.github.com/users/stefangordon/received_events","type":"User","site_admin":false},"repo":{"id":125872127,"name":"cloud-custodian","full_name":"stefangordon/cloud-custodian","owner":{"login":"stefangordon","id":4087345,"avatar_url":"https://avatars3.githubusercontent.com/u/4087345?v=4","gravatar_id":"","url":"https://api.github.com/users/stefangordon","html_url":"https://github.com/stefangordon","followers_url":"https://api.github.com/users/stefangordon/followers","following_url":"https://api.github.com/users/stefangordon/following{/other_user}","gists_url":"https://api.github.com/users/stefangordon/gists{/gist_id}","starred_url":"https://api.github.com/users/stefangordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefangordon/subscriptions","organizations_url":"https://api.github.com/users/stefangordon/orgs","repos_url":"https://api.github.com/users/stefangordon/repos","events_url":"https://api.github.com/users/stefangordon/events{/privacy}","received_events_url":"https://api.github.com/users/stefangordon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stefangordon/cloud-custodian","description":"Rules engine for AWS management, DSL in yaml for query, filter, and actions on resources","fork":true,"url":"https://api.github.com/repos/stefangordon/cloud-custodian","forks_url":"https://api.github.com/repos/stefangordon/cloud-custodian/forks","keys_url":"https://api.github.com/repos/stefangordon/cloud-custodian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stefangordon/cloud-custodian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stefangordon/cloud-custodian/teams","hooks_url":"https://api.github.com/repos/stefangordon/cloud-custodian/hooks","issue_events_url":"https://api.github.com/repos/stefangordon/cloud-custodian/issues/events{/number}","events_url":"https://api.github.com/repos/stefangordon/cloud-custodian/events","assignees_url":"https://api.github.com/repos/stefangordon/cloud-custodian/assignees{/user}","branches_url":"https://api.github.com/repos/stefangordon/cloud-custodian/branches{/branch}","tags_url":"https://api.github.com/repos/stefangordon/cloud-custodian/tags","blobs_url":"https://api.github.com/repos/stefangordon/cloud-custodian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stefangordon/cloud-custodian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stefangordon/cloud-custodian/git/refs{/sha}","trees_url":"https://api.github.com/repos/stefangordon/cloud-custodian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stefangordon/cloud-custodian/statuses/{sha}","languages_url":"https://api.github.com/repos/stefangordon/cloud-custodian/languages","stargazers_url":"https://api.github.com/repos/stefangordon/cloud-custodian/stargazers","contributors_url":"https://api.github.com/repos/stefangordon/cloud-custodian/contributors","subscribers_url":"https://api.github.com/repos/stefangordon/cloud-custodian/subscribers","subscription_url":"https://api.github.com/repos/stefangordon/cloud-custodian/subscription","commits_url":"https://api.github.com/repos/stefangordon/cloud-custodian/commits{/sha}","git_commits_url":"https://api.github.com/repos/stefangordon/cloud-custodian/git/commits{/sha}","comments_url":"https://api.github.com/repos/stefangordon/cloud-custodian/comments{/number}","issue_comment_url":"https://api.github.com/repos/stefangordon/cloud-custodian/issues/comments{/number}","contents_url":"https://api.github.com/repos/stefangordon/cloud-custodian/contents/{+path}","compare_url":"https://api.github.com/repos/stefangordon/cloud-custodian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stefangordon/cloud-custodian/merges","archive_url":"https://api.github.com/repos/stefangordon/cloud-custodian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stefangordon/cloud-custodian/downloads","issues_url":"https://api.github.com/repos/stefangordon/cloud-custodian/issues{/number}","pulls_url":"https://api.github.com/repos/stefangordon/cloud-custodian/pulls{/number}","milestones_url":"https://api.github.com/repos/stefangordon/cloud-custodian/milestones{/number}","notifications_url":"https://api.github.com/repos/stefangordon/cloud-custodian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stefangordon/cloud-custodian/labels{/name}","releases_url":"https://api.github.com/repos/stefangordon/cloud-custodian/releases{/id}","deployments_url":"https://api.github.com/repos/stefangordon/cloud-custodian/deployments","created_at":"2018-03-19T14:37:36Z","updated_at":"2018-05-04T00:09:51Z","pushed_at":"2018-05-21T15:32:38Z","git_url":"git://github.com/stefangordon/cloud-custodian.git","ssh_url":"git@github.com:stefangordon/cloud-custodian.git","clone_url":"https://github.com/stefangordon/cloud-custodian.git","svn_url":"https://github.com/stefangordon/cloud-custodian","homepage":"https://developer.capitalone.com/opensource-projects/cloud-custodian","size":54733,"stargazers_count":0,"watchers_count":0,"language":"Python","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":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"capitalone:master","ref":"master","sha":"1a39815ab4a61a3255f6272a9d8f9acd2b652bbb","user":{"login":"capitalone","id":8644615,"avatar_url":"https://avatars0.githubusercontent.com/u/8644615?v=4","gravatar_id":"","url":"https://api.github.com/users/capitalone","html_url":"https://github.com/capitalone","followers_url":"https://api.github.com/users/capitalone/followers","following_url":"https://api.github.com/users/capitalone/following{/other_user}","gists_url":"https://api.github.com/users/capitalone/gists{/gist_id}","starred_url":"https://api.github.com/users/capitalone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capitalone/subscriptions","organizations_url":"https://api.github.com/users/capitalone/orgs","repos_url":"https://api.github.com/users/capitalone/repos","events_url":"https://api.github.com/users/capitalone/events{/privacy}","received_events_url":"https://api.github.com/users/capitalone/received_events","type":"Organization","site_admin":false},"repo":{"id":52837350,"name":"cloud-custodian","full_name":"capitalone/cloud-custodian","owner":{"login":"capitalone","id":8644615,"avatar_url":"https://avatars0.githubusercontent.com/u/8644615?v=4","gravatar_id":"","url":"https://api.github.com/users/capitalone","html_url":"https://github.com/capitalone","followers_url":"https://api.github.com/users/capitalone/followers","following_url":"https://api.github.com/users/capitalone/following{/other_user}","gists_url":"https://api.github.com/users/capitalone/gists{/gist_id}","starred_url":"https://api.github.com/users/capitalone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capitalone/subscriptions","organizations_url":"https://api.github.com/users/capitalone/orgs","repos_url":"https://api.github.com/users/capitalone/repos","events_url":"https://api.github.com/users/capitalone/events{/privacy}","received_events_url":"https://api.github.com/users/capitalone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/capitalone/cloud-custodian","description":"Rules engine for cloud security, cost optimization, and governance, DSL in yaml for policies to query, filter, and take actions on resources","fork":false,"url":"https://api.github.com/repos/capitalone/cloud-custodian","forks_url":"https://api.github.com/repos/capitalone/cloud-custodian/forks","keys_url":"https://api.github.com/repos/capitalone/cloud-custodian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/capitalone/cloud-custodian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/capitalone/cloud-custodian/teams","hooks_url":"https://api.github.com/repos/capitalone/cloud-custodian/hooks","issue_events_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/events{/number}","events_url":"https://api.github.com/repos/capitalone/cloud-custodian/events","assignees_url":"https://api.github.com/repos/capitalone/cloud-custodian/assignees{/user}","branches_url":"https://api.github.com/repos/capitalone/cloud-custodian/branches{/branch}","tags_url":"https://api.github.com/repos/capitalone/cloud-custodian/tags","blobs_url":"https://api.github.com/repos/capitalone/cloud-custodian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/capitalone/cloud-custodian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/capitalone/cloud-custodian/git/refs{/sha}","trees_url":"https://api.github.com/repos/capitalone/cloud-custodian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/{sha}","languages_url":"https://api.github.com/repos/capitalone/cloud-custodian/languages","stargazers_url":"https://api.github.com/repos/capitalone/cloud-custodian/stargazers","contributors_url":"https://api.github.com/repos/capitalone/cloud-custodian/contributors","subscribers_url":"https://api.github.com/repos/capitalone/cloud-custodian/subscribers","subscription_url":"https://api.github.com/repos/capitalone/cloud-custodian/subscription","commits_url":"https://api.github.com/repos/capitalone/cloud-custodian/commits{/sha}","git_commits_url":"https://api.github.com/repos/capitalone/cloud-custodian/git/commits{/sha}","comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/comments{/number}","issue_comment_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/comments{/number}","contents_url":"https://api.github.com/repos/capitalone/cloud-custodian/contents/{+path}","compare_url":"https://api.github.com/repos/capitalone/cloud-custodian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/capitalone/cloud-custodian/merges","archive_url":"https://api.github.com/repos/capitalone/cloud-custodian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/capitalone/cloud-custodian/downloads","issues_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues{/number}","pulls_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls{/number}","milestones_url":"https://api.github.com/repos/capitalone/cloud-custodian/milestones{/number}","notifications_url":"https://api.github.com/repos/capitalone/cloud-custodian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/capitalone/cloud-custodian/labels{/name}","releases_url":"https://api.github.com/repos/capitalone/cloud-custodian/releases{/id}","deployments_url":"https://api.github.com/repos/capitalone/cloud-custodian/deployments","created_at":"2016-03-01T01:11:20Z","updated_at":"2018-05-21T03:54:27Z","pushed_at":"2018-05-21T15:34:34Z","git_url":"git://github.com/capitalone/cloud-custodian.git","ssh_url":"git@github.com:capitalone/cloud-custodian.git","clone_url":"https://github.com/capitalone/cloud-custodian.git","svn_url":"https://github.com/capitalone/cloud-custodian","homepage":"https://developer.capitalone.com/opensource-projects/cloud-custodian","size":60985,"stargazers_count":1357,"watchers_count":1357,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":401,"mirror_url":null,"archived":false,"open_issues_count":310,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":401,"open_issues":310,"watchers":1357,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426"},"html":{"href":"https://github.com/capitalone/cloud-custodian/pull/2426"},"issue":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2426"},"comments":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2426/comments"},"review_comments":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426/comments"},"review_comment":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2426/commits"},"statuses":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/9cab0b6b5355d651bb23c1924ca7b9f68e37eb20"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"stefangordon"}}