{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/22527","labels_url":"https://api.github.com/repos/saltstack/salt/issues/22527/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/22527/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/22527/events","html_url":"https://github.com/saltstack/salt/pull/22527","id":67569750,"number":22527,"title":"Boto VPC support for subnet associations","user":{"login":"claudiupopescu","id":10415709,"avatar_url":"https://avatars.githubusercontent.com/u/10415709?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiupopescu","html_url":"https://github.com/claudiupopescu","followers_url":"https://api.github.com/users/claudiupopescu/followers","following_url":"https://api.github.com/users/claudiupopescu/following{/other_user}","gists_url":"https://api.github.com/users/claudiupopescu/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiupopescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiupopescu/subscriptions","organizations_url":"https://api.github.com/users/claudiupopescu/orgs","repos_url":"https://api.github.com/users/claudiupopescu/repos","events_url":"https://api.github.com/users/claudiupopescu/events{/privacy}","received_events_url":"https://api.github.com/users/claudiupopescu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Master%20Change","name":"Master Change","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-10T11:03:33Z","updated_at":"2015-04-11T14:49:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/22527","html_url":"https://github.com/saltstack/salt/pull/22527","diff_url":"https://github.com/saltstack/salt/pull/22527.diff","patch_url":"https://github.com/saltstack/salt/pull/22527.patch"},"body":"Example usage:\r\n```\r\ncustom-route-table:\r\n  boto_vpc.route_table_present:\r\n    - name: my-custom\r\n    - vpc_id: vpc-123456\r\n    - routes:\r\n      - destination_cidr_block: 0.0.0.0/0\r\n        instance_id: i-123456\r\n        interface_id: eni-123456\r\n    - subnets:\r\n      - name: subnet1\r\n      - name: subnet2\r\n```\r\n\r\nThis might not be right, the name in subnets, it repeats itself..\r\nBut it supports subnet_id as well and a combination of both.\r\n\r\nAny suggestions on how to adapt this?"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/91864826","html_url":"https://github.com/saltstack/salt/pull/22527#issuecomment-91864826","issue_url":"https://api.github.com/repos/saltstack/salt/issues/22527","id":91864826,"user":{"login":"ClaudiuPID","id":6681374,"avatar_url":"https://avatars.githubusercontent.com/u/6681374?v=3","gravatar_id":"","url":"https://api.github.com/users/ClaudiuPID","html_url":"https://github.com/ClaudiuPID","followers_url":"https://api.github.com/users/ClaudiuPID/followers","following_url":"https://api.github.com/users/ClaudiuPID/following{/other_user}","gists_url":"https://api.github.com/users/ClaudiuPID/gists{/gist_id}","starred_url":"https://api.github.com/users/ClaudiuPID/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClaudiuPID/subscriptions","organizations_url":"https://api.github.com/users/ClaudiuPID/orgs","repos_url":"https://api.github.com/users/ClaudiuPID/repos","events_url":"https://api.github.com/users/ClaudiuPID/events{/privacy}","received_events_url":"https://api.github.com/users/ClaudiuPID/received_events","type":"User","site_admin":false},"created_at":"2015-04-11T14:49:13Z","updated_at":"2015-04-11T14:49:13Z","body":"According to python documentation:\r\nNote that ```filter(function, iterable)``` is equivalent to the generator expression ```(item for item in iterable if function(item))``` if function is not None and ```(item for item in iterable if item)``` if function is None.\r\n\r\nAnd according to pylint the use of a generator expression, in our case list comprehension is more human readable than filter(). Some disagree with pylint, including me, reason for ignoring this. Plus that I saw usage of filter() in salt code...\r\n\r\nThe import is at the beginning of the file just like in the [module](https://github.com/claudiupopescu/salt/blob/boto_vpc_route_table_subnets/salt/modules/boto_vpc.py). Do you want it to be before the doc string? That would be different than other modules though.\r\n\r\nAh, sorry for using a different account, hope it is not confusing :)"}}