)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bfe3cde40a014ed7aa6e3873ddfee34007ebc5b5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fetch router port subnets in bulk"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a router port is being attached to a network it"},{"line_number":10,"context_line":"must first check that the new subnet(s) do not overlap"},{"line_number":11,"context_line":"with any of the other subnets the router is already"},{"line_number":12,"context_line":"attached to."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_95fd6570","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":49},"updated":"2016-04-20 19:52:59.000000000","message":"should this be: a network port is being attached to a router? :P","commit_id":"9355885d7dab41e48a8ecaaf59b1bd3835f17f27"}],"neutron/db/l3_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4b0ad637504df45b75201c146bd000c418b8bdc9","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            for sub in subnets:"},{"line_number":532,"context_line":"                cidr \u003d sub[\u0027cidr\u0027]"},{"line_number":533,"context_line":"                ipnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":534,"context_line":"                match1 \u003d netaddr.all_matching_cidrs(new_ipnet, [cidr])"},{"line_number":535,"context_line":"                for s in new_subnets:"},{"line_number":536,"context_line":"                    new_cidr \u003d s[\u0027cidr\u0027]"},{"line_number":537,"context_line":"                    match2 \u003d netaddr.all_matching_cidrs(ipnet, [new_cidr])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_31194623","line":534,"range":{"start_line":534,"start_character":52,"end_line":534,"end_character":61},"updated":"2016-03-17 16:23:34.000000000","message":"this will correspond to the last subnet in new_subnet list (#516) which is a problem I beleive","commit_id":"5b5446bcef366c75c58cc3b0f49fb640bc40c775"},{"author":{"_account_id":20742,"name":"Jie Li","email":"JieLi2087@126.com","username":"JieLee"},"change_message_id":"934c1cf422c2a719bad83025bc4b9f161a2a4979","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            for sub in subnets:"},{"line_number":532,"context_line":"                cidr \u003d sub[\u0027cidr\u0027]"},{"line_number":533,"context_line":"                ipnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":534,"context_line":"                match1 \u003d netaddr.all_matching_cidrs(new_ipnet, [cidr])"},{"line_number":535,"context_line":"                for s in new_subnets:"},{"line_number":536,"context_line":"                    new_cidr \u003d s[\u0027cidr\u0027]"},{"line_number":537,"context_line":"                    match2 \u003d netaddr.all_matching_cidrs(ipnet, [new_cidr])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_f7286ee4","line":534,"range":{"start_line":534,"start_character":52,"end_line":534,"end_character":61},"in_reply_to":"1af94dfe_31194623","updated":"2016-03-17 17:00:52.000000000","message":"+1","commit_id":"5b5446bcef366c75c58cc3b0f49fb640bc40c775"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f18685e869c757fae4d93071a9315991f435b5c6","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            for sub in subnets:"},{"line_number":532,"context_line":"                cidr \u003d sub[\u0027cidr\u0027]"},{"line_number":533,"context_line":"                ipnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":534,"context_line":"                match1 \u003d netaddr.all_matching_cidrs(new_ipnet, [cidr])"},{"line_number":535,"context_line":"                for s in new_subnets:"},{"line_number":536,"context_line":"                    new_cidr \u003d s[\u0027cidr\u0027]"},{"line_number":537,"context_line":"                    match2 \u003d netaddr.all_matching_cidrs(ipnet, [new_cidr])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_77629e3f","line":534,"range":{"start_line":534,"start_character":52,"end_line":534,"end_character":61},"in_reply_to":"1af94dfe_31194623","updated":"2016-03-17 17:01:04.000000000","message":"Good catch, looks like I can just move this into the the inner loop.","commit_id":"5b5446bcef366c75c58cc3b0f49fb640bc40c775"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da53db2daab9b09723e3769f3e368ce32a9b5ba0","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                            continue"},{"line_number":526,"context_line":"                        sub_ids.append(ip[\u0027subnet_id\u0027])"},{"line_number":527,"context_line":"            id_filter \u003d {\u0027id\u0027: sub_ids}"},{"line_number":528,"context_line":"            subnets \u003d self._core_plugin.get_subnets(context.elevated(),"},{"line_number":529,"context_line":"                                                    filters\u003did_filter)"},{"line_number":530,"context_line":"            for sub in subnets:"},{"line_number":531,"context_line":"                cidr \u003d sub[\u0027cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_726742b7","line":528,"updated":"2016-03-17 20:20:06.000000000","message":"Shouldn\u0027t we have a unit test for this; to ensure the filter is built correctly and used for the get_subnets() call?","commit_id":"af37b80c78618fc2f47a4fe683894d61441bedb8"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b75980498927a778d896e92e15ffe53f0876480b","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                            continue"},{"line_number":526,"context_line":"                        sub_ids.append(ip[\u0027subnet_id\u0027])"},{"line_number":527,"context_line":"            id_filter \u003d {\u0027id\u0027: sub_ids}"},{"line_number":528,"context_line":"            subnets \u003d self._core_plugin.get_subnets(context.elevated(),"},{"line_number":529,"context_line":"                                                    filters\u003did_filter)"},{"line_number":530,"context_line":"            for sub in subnets:"},{"line_number":531,"context_line":"                cidr \u003d sub[\u0027cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_c3bc8abd","line":528,"in_reply_to":"1af94dfe_726742b7","updated":"2016-03-17 21:34:21.000000000","message":"Yes, there should be a new test(s) that verifies this as well as the loop below.  Would be good to know if it fixes the performance problem before I spend the time on that.","commit_id":"af37b80c78618fc2f47a4fe683894d61441bedb8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cebabd6db77c0514cf19362aa0a4bf7c318418cc","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                                 \"of subnet %(sub_id)s\") % data)"},{"line_number":546,"context_line":"                        raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":547,"context_line":"        except exc.NoResultFound:"},{"line_number":548,"context_line":"            pass"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":551,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_c2bbdbe3","line":548,"updated":"2016-03-18 04:03:18.000000000","message":"Do we have any idea how robust this error handling is now (btw catching NoResultFound when there is no sqlalchemy query involved is pretty nasty)? We may end up finishing the validation partially if something breaks in the middle. Plus,","commit_id":"af37b80c78618fc2f47a4fe683894d61441bedb8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ee26a7ec17c8c9d68a2cbeb289f9b05025ed7632","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                                 \"of subnet %(sub_id)s\") % data)"},{"line_number":546,"context_line":"                        raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":547,"context_line":"        except exc.NoResultFound:"},{"line_number":548,"context_line":"            pass"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":551,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_35d3df05","line":548,"in_reply_to":"1af94dfe_c2bbdbe3","updated":"2016-04-20 06:58:06.000000000","message":"This was to handle concurrent deletes of the subnet. It\u0027s not needed anymore now that we are calling get_subnets and iterating over whatever is returned, which automatically skips deleted ones for us.","commit_id":"af37b80c78618fc2f47a4fe683894d61441bedb8"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"b96d629129e92d940809b4747c95a97b4b730e48","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        for sub in subnets:"},{"line_number":529,"context_line":"            cidr \u003d sub[\u0027cidr\u0027]"},{"line_number":530,"context_line":"            ipnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":531,"context_line":"            for s in new_subnets:"},{"line_number":532,"context_line":"                new_cidr \u003d s[\u0027cidr\u0027]"},{"line_number":533,"context_line":"                new_ipnet \u003d netaddr.IPNetwork(new_cidr)"},{"line_number":534,"context_line":"                match1 \u003d netaddr.all_matching_cidrs(new_ipnet, [cidr])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_e6619906","line":531,"range":{"start_line":531,"start_character":16,"end_line":531,"end_character":17},"updated":"2016-04-20 18:09:05.000000000","message":"My personal pref would be a more meaningful name (e.g. \u0027new_subnet\u0027 or something), but can see its not an issue with this small block.","commit_id":"9355885d7dab41e48a8ecaaf59b1bd3835f17f27"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f45af5895cbc15d4599908843dcde30fe20ac3d7","unresolved":false,"context_lines":[{"line_number":607,"context_line":"            if subnets:"},{"line_number":608,"context_line":"                self._check_for_dup_router_subnets(context, router,"},{"line_number":609,"context_line":"                                                   port[\u0027network_id\u0027],"},{"line_number":610,"context_line":"                                                   subnets)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"            # Keep the restriction against multiple IPv4 subnets"},{"line_number":613,"context_line":"            if len([s for s in subnets if s[\u0027ip_version\u0027] \u003d\u003d 4]) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_3f66f050","line":610,"updated":"2016-04-20 19:09:39.000000000","message":"I suppose what happens here is the change of \u0027ghost\u0027 BadRequests, where subnets have been removed in between","commit_id":"9355885d7dab41e48a8ecaaf59b1bd3835f17f27"}]}
