{"action":"created","comment":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments/177812592","pull_request_review_id":107755524,"id":177812592,"diff_hunk":"@@ -30,8 +30,45 @@ def filter(self, resource_manager, **params):\n         m = resource_manager.resource_type\n         client = local_session(self.session_factory).client(\n             \"%s.%s\" % (m.service, m.client))\n-        # TODO: fixme\n-        return client\n+        enum_op, list_op = m.enum_spec\n+        op = getattr(getattr(client, enum_op), list_op)\n+        data = [self.to_dictionary(e) for e in op()]\n+        return data\n+\n+    def to_dictionary(self, obj):\n+        if isinstance(obj, dict):","path":"tools/c7n_azure/c7n_azure/query.py","position":12,"original_position":12,"commit_id":"90d1e00d3d0fece5c9a470b28987816b3144c56d","original_commit_id":"90d1e00d3d0fece5c9a470b28987816b3144c56d","user":{"login":"kapilt","id":21650,"avatar_url":"https://avatars3.githubusercontent.com/u/21650?v=4","gravatar_id":"","url":"https://api.github.com/users/kapilt","html_url":"https://github.com/kapilt","followers_url":"https://api.github.com/users/kapilt/followers","following_url":"https://api.github.com/users/kapilt/following{/other_user}","gists_url":"https://api.github.com/users/kapilt/gists{/gist_id}","starred_url":"https://api.github.com/users/kapilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapilt/subscriptions","organizations_url":"https://api.github.com/users/kapilt/orgs","repos_url":"https://api.github.com/users/kapilt/repos","events_url":"https://api.github.com/users/kapilt/events{/privacy}","received_events_url":"https://api.github.com/users/kapilt/received_events","type":"User","site_admin":false},"body":"looks good for now, but i think there's a way we could get msrest layer to not deserialize to objects and just pass the dicts through as is, instead of converting multiple times.","created_at":"2018-03-28T16:36:50Z","updated_at":"2018-03-28T16:39:29Z","html_url":"https://github.com/capitalone/cloud-custodian/pull/2172#discussion_r177812592","pull_request_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments/177812592"},"html":{"href":"https://github.com/capitalone/cloud-custodian/pull/2172#discussion_r177812592"},"pull_request":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172"}}},"pull_request":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172","id":178068683,"html_url":"https://github.com/capitalone/cloud-custodian/pull/2172","diff_url":"https://github.com/capitalone/cloud-custodian/pull/2172.diff","patch_url":"https://github.com/capitalone/cloud-custodian/pull/2172.patch","issue_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2172","number":2172,"state":"open","locked":false,"title":"Unblock running filters against Azure 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":"Including some additional enum info in resources to differentiate between the appropriate type of list operation (list vs list_all mostly) and recursively converting SDK results to dictionaries so they are compatible with rest of pipeline.  Rough, but I can now successfully run policies like \r\n\r\n```\r\npolicies:\r\n  - name: test-azure\r\n    resource: azure.storage\r\n    filters:\r\n      - type: value\r\n        key: creation_time\r\n        op: less-than\r\n        value_type: age\r\n        value: 10\r\n```\r\n\r\nWhich is pretty cool ;)\r\n\r\nAlso including `launch.json.default`.  Would actually be nice to do `settings.json` that way too, then add `launch.json` and `settings.json` to `.gitignore` so user versions of workspace files aren't always a hassle to manage during commits.","created_at":"2018-03-28T15:02:07Z","updated_at":"2018-03-28T16:39:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a05453a2789fc4f210a0179aaba9abeb530382d2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172/commits","review_comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172/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/2172/comments","statuses_url":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/90d1e00d3d0fece5c9a470b28987816b3144c56d","head":{"label":"stefangordon:cleanpr","ref":"cleanpr","sha":"90d1e00d3d0fece5c9a470b28987816b3144c56d","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-03-26T21:19:58Z","pushed_at":"2018-03-28T14:57:52Z","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":53473,"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":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"capitalone:master","ref":"master","sha":"ce4796117c3cce84a361f3fdd2eecc0c4929be78","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 AWS management, DSL in yaml for query, filter, and 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-03-28T15:46:48Z","pushed_at":"2018-03-28T16:28:22Z","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":54506,"stargazers_count":1275,"watchers_count":1275,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":360,"mirror_url":null,"archived":false,"open_issues_count":259,"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":360,"open_issues":259,"watchers":1275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172"},"html":{"href":"https://github.com/capitalone/cloud-custodian/pull/2172"},"issue":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2172"},"comments":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/issues/2172/comments"},"review_comments":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/2172/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/2172/commits"},"statuses":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/90d1e00d3d0fece5c9a470b28987816b3144c56d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kapilt"}}