)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8eb1d544a9d08b19ea718547b15894386d0bf0c0","unresolved":false,"context_lines":[{"line_number":14,"context_line":"longer be restricted to getting floating IPs from the pool they happen"},{"line_number":15,"context_line":"to be connected to since all pools will be hosted on the same external"},{"line_number":16,"context_line":"network.  I will be happy to provide some content for the docs to show"},{"line_number":17,"context_line":"the procedure to add a subnet to the external network."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I2c283f5be0cbb6b5d350cafc1b636c300b796a7b"},{"line_number":20,"context_line":"Closes-Bug: #1312467"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7adec928_45723c4a","line":17,"updated":"2014-05-09 20:45:03.000000000","message":"This is a commit message, not a post to the mailing list!\nOn the mailing list you should rightly notify people that you\u0027re happy to provide contents for docs...","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7b1dde6505b3064bce762c12b5b6b368bf432695","unresolved":false,"context_lines":[{"line_number":14,"context_line":"longer be restricted to getting floating IPs from the pool they happen"},{"line_number":15,"context_line":"to be connected to since all pools will be hosted on the same external"},{"line_number":16,"context_line":"network.  I will be happy to provide some content for the docs to show"},{"line_number":17,"context_line":"the procedure to add a subnet to the external network."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I2c283f5be0cbb6b5d350cafc1b636c300b796a7b"},{"line_number":20,"context_line":"Closes-Bug: #1312467"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7adec928_eda555a2","line":17,"in_reply_to":"7adec928_45723c4a","updated":"2014-05-19 16:36:01.000000000","message":"Ok, I see the tone here is not quite how a commit message should read.","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"}],"neutron/agent/l3_agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7a36c45f1d37913374d16331f9675d798078a378","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        interface_name \u003d None"},{"line_number":459,"context_line":"        if ex_gw_port_id:"},{"line_number":460,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":461,"context_line":"        if ex_gw_port and ex_gw_port !\u003d ri.ex_gw_port:"},{"line_number":462,"context_line":"            self._set_subnet_info(ex_gw_port)"},{"line_number":463,"context_line":"            self.external_gateway_added(ri, ex_gw_port,"},{"line_number":464,"context_line":"                                        interface_name, internal_cidrs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_ca5bbb2c","line":461,"updated":"2014-05-09 19:16:16.000000000","message":"This catches changes in the subnet information on the gw_port and ensures that new subnets get on-link routes and deleted subnets have theirs removed.","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8eb1d544a9d08b19ea718547b15894386d0bf0c0","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            output \u003d self._run(\u0027list\u0027, \u0027dev\u0027, self.name, \u0027scope\u0027, \u0027link\u0027)"},{"line_number":382,"context_line":"            for line in output.split(\u0027\\n\u0027):"},{"line_number":383,"context_line":"                line \u003d line.strip()"},{"line_number":384,"context_line":"                if line and not line.count(\u0027via\u0027) and not line.count(\u0027src\u0027):"},{"line_number":385,"context_line":"                    yield line"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        return [x for x in iterate_routes()]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_45eebcb5","line":384,"updated":"2014-05-09 20:45:03.000000000","message":"I think the routes with \u0027via\u0027 won\u0027t show up if the link is scope, is that right?","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7b1dde6505b3064bce762c12b5b6b368bf432695","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            output \u003d self._run(\u0027list\u0027, \u0027dev\u0027, self.name, \u0027scope\u0027, \u0027link\u0027)"},{"line_number":382,"context_line":"            for line in output.split(\u0027\\n\u0027):"},{"line_number":383,"context_line":"                line \u003d line.strip()"},{"line_number":384,"context_line":"                if line and not line.count(\u0027via\u0027) and not line.count(\u0027src\u0027):"},{"line_number":385,"context_line":"                    yield line"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        return [x for x in iterate_routes()]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_ebddd971","line":384,"in_reply_to":"7adec928_45eebcb5","updated":"2014-05-19 16:36:01.000000000","message":"Looks like you\u0027re right.  Good catch.","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"18bf5e7c6970613afe37a6b0ec765c46d5daee3a","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                if line and not line.count(\u0027src\u0027):"},{"line_number":385,"context_line":"                    yield line"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        return [x for x in iterate_routes()]"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def add_onlink_route(self, cidr):"},{"line_number":390,"context_line":"        self._as_root(\u0027replace\u0027, cidr, \u0027dev\u0027, self.name, \u0027scope\u0027, \u0027link\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7adec928_11accc9f","line":387,"updated":"2014-05-23 21:04:38.000000000","message":"pedant me says the generator here actually adds a bit of overhead.\npractical me can\u0027t be bothered however","commit_id":"fc7cffedbe60ae9da7963373e9072c55700fce5f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"40c30eaed0708930d9f09c12ed92bdbbe083a1bb","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                if line and not line.count(\u0027src\u0027):"},{"line_number":385,"context_line":"                    yield line"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        return [x for x in iterate_routes()]"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def add_onlink_route(self, cidr):"},{"line_number":390,"context_line":"        self._as_root(\u0027replace\u0027, cidr, \u0027dev\u0027, self.name, \u0027scope\u0027, \u0027link\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_3d302f56","line":387,"in_reply_to":"7adec928_11accc9f","updated":"2014-05-23 22:20:20.000000000","message":"It probably does add a little.  I liked the readability of the generator the best and I\u0027m willing to take a tiny overhead for it.\n\nIt was the call to strip that pushed me toward a generator.  The line should be stripped before the string is tested in a boolean context.  I couldn\u0027t find an elegant way to fit that in to a list comprehension.  I suppose I could have done the old...\n\nlist \u003d []\nfor line in ...:\n    ...\n    list.append(line)\n\nreturn list","commit_id":"fc7cffedbe60ae9da7963373e9072c55700fce5f"}],"neutron/db/l3_db.py":[{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"1eaef490c85e9ae6ded6a14d2e0748932a3c8834","unresolved":false,"context_lines":[{"line_number":929,"context_line":"            for port in ports:"},{"line_number":930,"context_line":"                fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"                if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                    LOG.info(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                             port[\u0027id\u0027])"},{"line_number":934,"context_line":"                    continue"},{"line_number":935,"context_line":"                elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_2ae4543a","line":932,"updated":"2014-05-07 21:25:39.000000000","message":"would this be better as \"Ignoring router port %s: multiple IPs\"?","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b64e678943eec826cafd2c2fb50b00dae50d6002","unresolved":false,"context_lines":[{"line_number":929,"context_line":"            for port in ports:"},{"line_number":930,"context_line":"                fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"                if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                    LOG.info(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                             port[\u0027id\u0027])"},{"line_number":934,"context_line":"                    continue"},{"line_number":935,"context_line":"                elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_4c928458","line":932,"in_reply_to":"7adec928_2ae4543a","updated":"2014-05-08 18:12:10.000000000","message":"My patch doesn\u0027t actually modify this code except to indent it to place it under the \"def iterate_ports()\".  I\u0027d say that change is out of the scope of this patch.","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"c9465e7b29d7d2ed54fab4bf7c00daf76ff8d32d","unresolved":false,"context_lines":[{"line_number":929,"context_line":"            for port in ports:"},{"line_number":930,"context_line":"                fixed_ips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":931,"context_line":"                if len(fixed_ips) \u003e 1:"},{"line_number":932,"context_line":"                    LOG.info(_(\"Ignoring multiple IPs on router port %s\"),"},{"line_number":933,"context_line":"                             port[\u0027id\u0027])"},{"line_number":934,"context_line":"                    continue"},{"line_number":935,"context_line":"                elif not fixed_ips:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_abacb1a1","line":932,"in_reply_to":"7adec928_4c928458","updated":"2014-05-09 22:28:33.000000000","message":"Done","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8eb1d544a9d08b19ea718547b15894386d0bf0c0","unresolved":false,"context_lines":[{"line_number":939,"context_line":"                             port[\u0027id\u0027])"},{"line_number":940,"context_line":"                    continue"},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"                yield (port, port[\u0027network_id\u0027], fixed_ips[0])"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        network_ids \u003d set(network_id for _, network_id, _ in iterate_ports())"},{"line_number":945,"context_line":"        filters \u003d {\u0027network_id\u0027: [id for id in network_ids]}"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_c55e4c76","line":942,"updated":"2014-05-09 20:45:03.000000000","message":"why did you opted for a generator?","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7b1dde6505b3064bce762c12b5b6b368bf432695","unresolved":false,"context_lines":[{"line_number":939,"context_line":"                             port[\u0027id\u0027])"},{"line_number":940,"context_line":"                    continue"},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"                yield (port, port[\u0027network_id\u0027], fixed_ips[0])"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        network_ids \u003d set(network_id for _, network_id, _ in iterate_ports())"},{"line_number":945,"context_line":"        filters \u003d {\u0027network_id\u0027: [id for id in network_ids]}"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_cd009968","line":942,"in_reply_to":"7adec928_c55e4c76","updated":"2014-05-19 16:36:01.000000000","message":"I did that because it allowed me to avoid changing the code above (except to indent it).  Can you think of a good way to turn this in to a list without using a generator?  I could drop the LOG statements and turn it in to a slightly complex list comprehension.\n\nDo you see a good reason to do that?","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8eb1d544a9d08b19ea718547b15894386d0bf0c0","unresolved":false,"context_lines":[{"line_number":941,"context_line":""},{"line_number":942,"context_line":"                yield (port, port[\u0027network_id\u0027], fixed_ips[0])"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        network_ids \u003d set(network_id for _, network_id, _ in iterate_ports())"},{"line_number":945,"context_line":"        filters \u003d {\u0027network_id\u0027: [id for id in network_ids]}"},{"line_number":946,"context_line":"        fields \u003d [\u0027id\u0027, \u0027cidr\u0027, \u0027gateway_ip\u0027, \u0027network_id\u0027]"},{"line_number":947,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_a55b0086","line":944,"updated":"2014-05-09 20:45:03.000000000","message":"I have the impression this method would be a lot more readable if you executed iterate_ports only once.\nThe following snippet assumes the generator is removed from iterate ports and the same method returns a list of tuples.\n\nport_into \u003d iterate_ports()\nnetwork_ids \u003d item[0] for item in port_info\nfilters \u003d {\u0027network_id\u0027: [id for id in network_ids]}\nfields \u003d [\u0027id\u0027, \u0027cidr\u0027, \u0027gateway_ip\u0027, \u0027network_id\u0027]\nall_subnets \u003d self._core_plugin.get_subnets(context, filters, fields)\nsubnets_by_network \u003d dict((id, [subnet for subnet in all_subnets if subnet[\u0027network_id\u0027] \u003d\u003d id]) for id in network_ids)\nfor (port, network_id, fixed_ip) in port_info:\n   \u003c\u003c\u003ccontinue as you wrote it\u003e\u003e\u003e","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7b1dde6505b3064bce762c12b5b6b368bf432695","unresolved":false,"context_lines":[{"line_number":941,"context_line":""},{"line_number":942,"context_line":"                yield (port, port[\u0027network_id\u0027], fixed_ips[0])"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        network_ids \u003d set(network_id for _, network_id, _ in iterate_ports())"},{"line_number":945,"context_line":"        filters \u003d {\u0027network_id\u0027: [id for id in network_ids]}"},{"line_number":946,"context_line":"        fields \u003d [\u0027id\u0027, \u0027cidr\u0027, \u0027gateway_ip\u0027, \u0027network_id\u0027]"},{"line_number":947,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_d0591036","line":944,"in_reply_to":"7adec928_a55b0086","updated":"2014-05-19 16:36:01.000000000","message":"port_info \u003d iterate_ports() works here whether iterate_ports() is a generator or returns a list of tuples.  I\u0027ll change the name from \"iterate_ports\" to \"each_port_with_ip\".\n\nYour suggested change to subnets_by_network turns the algorithm in to an O(nm) algorithm from O(n) + O(m).  It probably wouldn\u0027t be a problem in this case but I\u0027d prefer to keep the latter.","commit_id":"2b6d2d95b494800c8c4463ca2db66187964bf0a3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"18bf5e7c6970613afe37a6b0ec765c46d5daee3a","unresolved":false,"context_lines":[{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        for port, fixed_ip in each_port_with_ip():"},{"line_number":952,"context_line":"            port[\u0027extra_subnets\u0027] \u003d []"},{"line_number":953,"context_line":"            for subnet in subnets_by_network[port[\u0027network_id\u0027]]:"},{"line_number":954,"context_line":"                subnet_info \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":955,"context_line":"                               \u0027cidr\u0027: subnet[\u0027cidr\u0027],"},{"line_number":956,"context_line":"                               \u0027gateway_ip\u0027: subnet[\u0027gateway_ip\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"7adec928_110dac90","line":953,"updated":"2014-05-23 21:04:38.000000000","message":"just to be super pedant...\nthis is not O(n+m) as you suggested in my review on patch set 4.\nSeems to be O(nm) as you first iterate on ports and then on subnets for the port\u0027s network.\n\nAnyway, with so many bits needing optimization in openstack I surely better take my pedantry elsewhere!","commit_id":"fc7cffedbe60ae9da7963373e9072c55700fce5f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"40c30eaed0708930d9f09c12ed92bdbbe083a1bb","unresolved":false,"context_lines":[{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        for port, fixed_ip in each_port_with_ip():"},{"line_number":952,"context_line":"            port[\u0027extra_subnets\u0027] \u003d []"},{"line_number":953,"context_line":"            for subnet in subnets_by_network[port[\u0027network_id\u0027]]:"},{"line_number":954,"context_line":"                subnet_info \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":955,"context_line":"                               \u0027cidr\u0027: subnet[\u0027cidr\u0027],"},{"line_number":956,"context_line":"                               \u0027gateway_ip\u0027: subnet[\u0027gateway_ip\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"7adec928_1c9dc359","line":953,"in_reply_to":"7adec928_110dac90","updated":"2014-05-23 22:20:20.000000000","message":"You are right.  The proper analysis of this is O(nm).  I guess I mentally dropped it to linear from quadratic since it isn\u0027t iterating over every known subnet for each port.  But, it could be.  Good point.\n\nRegardless, this is the right algorithm.  I mean the gist of \"_populate_subnet_for_ports\" is to iterate over the ports and add all of the subnets for each.","commit_id":"fc7cffedbe60ae9da7963373e9072c55700fce5f"}]}
