{"action":"created","comment":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments/92903284","pull_request_review_id":13428759,"id":92903284,"diff_hunk":"@@ -988,6 +988,49 @@ def process_asg(self, asg):\n             raise\n \n \n+@actions.register('modify-security-groups')\n+class ASGModifyGroups(ModifyGroupsAction):\n+    # Need some kind of a warning - this will require the ASGs to bring up new instances\n+    # in order to see the new security groups\n+\n+    # TODO: Implement. Lots of other gotchas\n+\n+    def process(self, asgs):\n+        raise NotImplemented('The modify-security-groups action has not been implemented on this resource')\n+        with self.executor_factory(max_workers=5) as w:\n+            list(w.map(self.process_asg, asgs))\n+\n+    def process_asg(self, asg):\n+        client = local_session(self.manager.session_factory).client('autoscaling')\n+\n+        # patch the resource obj for the generic actions\n+        asg['Groups'] = asg['SecurityGroups']","path":"c7n/resources/asg.py","position":29,"original_position":29,"commit_id":"1c87339603c1399c882d2d60e00c69a04f9cb6e9","original_commit_id":"1c87339603c1399c882d2d60e00c69a04f9cb6e9","user":{"login":"kapilt","id":21650,"avatar_url":"https://avatars.githubusercontent.com/u/21650?v=3","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":"better to make a base method `get_group_ids(resource)` that this could subclass and leave the generics out of annotations, from an annotation perspective this is straight copying of keys, resource records need to be indexed and straight key copying just adds weight.","created_at":"2016-12-16T23:26:42Z","updated_at":"2016-12-16T23:26:42Z","html_url":"https://github.com/capitalone/cloud-custodian/pull/707#discussion_r92903284","pull_request_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707","_links":{"self":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/comments/92903284"},"html":{"href":"https://github.com/capitalone/cloud-custodian/pull/707#discussion_r92903284"},"pull_request":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707"}}},"pull_request":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707","id":97582981,"html_url":"https://github.com/capitalone/cloud-custodian/pull/707","diff_url":"https://github.com/capitalone/cloud-custodian/pull/707.diff","patch_url":"https://github.com/capitalone/cloud-custodian/pull/707.patch","issue_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/707","number":707,"state":"open","locked":false,"title":"WIP: ModifyGroupsAction for network attached resources","user":{"login":"andrewalexander","id":10720880,"avatar_url":"https://avatars.githubusercontent.com/u/10720880?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewalexander","html_url":"https://github.com/andrewalexander","followers_url":"https://api.github.com/users/andrewalexander/followers","following_url":"https://api.github.com/users/andrewalexander/following{/other_user}","gists_url":"https://api.github.com/users/andrewalexander/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewalexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewalexander/subscriptions","organizations_url":"https://api.github.com/users/andrewalexander/orgs","repos_url":"https://api.github.com/users/andrewalexander/repos","events_url":"https://api.github.com/users/andrewalexander/events{/privacy}","received_events_url":"https://api.github.com/users/andrewalexander/received_events","type":"User","site_admin":false},"body":"AutoScaling may need to be rolled back - it is incomplete. Also, tests for SecurityGroupFilter are still failing at the time of PR opening. \r\n\r\nOpening for visibility/clean test information.","created_at":"2016-12-12T16:16:17Z","updated_at":"2016-12-16T23:47:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d683905e08d3c2a768fd38c93d69aa586562720d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707/commits","review_comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707/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/707/comments","statuses_url":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/1c87339603c1399c882d2d60e00c69a04f9cb6e9","head":{"label":"andrewalexander:master","ref":"master","sha":"1c87339603c1399c882d2d60e00c69a04f9cb6e9","user":{"login":"andrewalexander","id":10720880,"avatar_url":"https://avatars.githubusercontent.com/u/10720880?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewalexander","html_url":"https://github.com/andrewalexander","followers_url":"https://api.github.com/users/andrewalexander/followers","following_url":"https://api.github.com/users/andrewalexander/following{/other_user}","gists_url":"https://api.github.com/users/andrewalexander/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewalexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewalexander/subscriptions","organizations_url":"https://api.github.com/users/andrewalexander/orgs","repos_url":"https://api.github.com/users/andrewalexander/repos","events_url":"https://api.github.com/users/andrewalexander/events{/privacy}","received_events_url":"https://api.github.com/users/andrewalexander/received_events","type":"User","site_admin":false},"repo":{"id":66872147,"name":"cloud-custodian","full_name":"andrewalexander/cloud-custodian","owner":{"login":"andrewalexander","id":10720880,"avatar_url":"https://avatars.githubusercontent.com/u/10720880?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewalexander","html_url":"https://github.com/andrewalexander","followers_url":"https://api.github.com/users/andrewalexander/followers","following_url":"https://api.github.com/users/andrewalexander/following{/other_user}","gists_url":"https://api.github.com/users/andrewalexander/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewalexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewalexander/subscriptions","organizations_url":"https://api.github.com/users/andrewalexander/orgs","repos_url":"https://api.github.com/users/andrewalexander/repos","events_url":"https://api.github.com/users/andrewalexander/events{/privacy}","received_events_url":"https://api.github.com/users/andrewalexander/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewalexander/cloud-custodian","description":"Policy rules engine for aws management, policies in yaml for query, filter, and take actions on resources","fork":true,"url":"https://api.github.com/repos/andrewalexander/cloud-custodian","forks_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/forks","keys_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/teams","hooks_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/hooks","issue_events_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/issues/events{/number}","events_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/events","assignees_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/assignees{/user}","branches_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/branches{/branch}","tags_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/tags","blobs_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/languages","stargazers_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/stargazers","contributors_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/contributors","subscribers_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/subscribers","subscription_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/subscription","commits_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/contents/{+path}","compare_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/merges","archive_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/downloads","issues_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/issues{/number}","pulls_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/labels{/name}","releases_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/releases{/id}","deployments_url":"https://api.github.com/repos/andrewalexander/cloud-custodian/deployments","created_at":"2016-08-29T19:04:06Z","updated_at":"2016-08-29T19:04:08Z","pushed_at":"2016-12-16T22:25:58Z","git_url":"git://github.com/andrewalexander/cloud-custodian.git","ssh_url":"git@github.com:andrewalexander/cloud-custodian.git","clone_url":"https://github.com/andrewalexander/cloud-custodian.git","svn_url":"https://github.com/andrewalexander/cloud-custodian","homepage":"","size":6025,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"capitalone:master","ref":"master","sha":"8100fc8e7df9eff289fbf023f43f162f0c454673","user":{"login":"capitalone","id":8644615,"avatar_url":"https://avatars.githubusercontent.com/u/8644615?v=3","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://avatars.githubusercontent.com/u/8644615?v=3","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":"2016-12-15T01:02:43Z","pushed_at":"2016-12-16T23:23:46Z","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":"http://www.capitalone.io/cloud-custodian/","size":9476,"stargazers_count":517,"watchers_count":517,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":110,"mirror_url":null,"open_issues_count":130,"forks":110,"open_issues":130,"watchers":517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707"},"html":{"href":"https://github.com/capitalone/cloud-custodian/pull/707"},"issue":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/issues/707"},"comments":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/issues/707/comments"},"review_comments":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/pulls/707/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/707/commits"},"statuses":{"href":"https://api.github.com/repos/capitalone/cloud-custodian/statuses/1c87339603c1399c882d2d60e00c69a04f9cb6e9"}}}}
{"actor":{"display_login":"kapilt"}}