)]}'
{"neutron/agent/l3_agent.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ed9188479504e84dc325b0ea82c81dab51dcdb81","unresolved":false,"context_lines":[{"line_number":763,"context_line":"        interface_name \u003d None"},{"line_number":764,"context_line":"        if ex_gw_port_id:"},{"line_number":765,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":766,"context_line":"        # gateway port has been added or changed"},{"line_number":767,"context_line":"        if (ex_gw_port and (not ri.ex_gw_port"},{"line_number":768,"context_line":"                            or ex_gw_port[\u0027id\u0027] !\u003d ri.ex_gw_port[\u0027id\u0027])):"},{"line_number":769,"context_line":"            self._set_subnet_info(ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_3c9cee0d","line":766,"updated":"2014-07-27 19:18:52.000000000","message":"What about changes to the ex_gw_port, apart from the id? Any changes to such fields won\u0027t trigger the condition. For example, I think you can change the gateway of the external port without recreating the port, so the id will remain the same. I can\u0027t verify this right now. What do you think?","commit_id":"5144ea4fe7f8aadaec72ffa499413c9478745a76"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"76ccce028a4d77c463864a96ea0adacce475b347","unresolved":false,"context_lines":[{"line_number":763,"context_line":"        interface_name \u003d None"},{"line_number":764,"context_line":"        if ex_gw_port_id:"},{"line_number":765,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":766,"context_line":"        # gateway port has been added or changed"},{"line_number":767,"context_line":"        if (ex_gw_port and (not ri.ex_gw_port"},{"line_number":768,"context_line":"                            or ex_gw_port[\u0027id\u0027] !\u003d ri.ex_gw_port[\u0027id\u0027])):"},{"line_number":769,"context_line":"            self._set_subnet_info(ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_f6cb5947","line":766,"in_reply_to":"baada198_3c9cee0d","updated":"2014-07-28 15:18:00.000000000","message":"+1.  Please justify why only the id is compared here.  I share Assaf\u0027s concern.","commit_id":"5144ea4fe7f8aadaec72ffa499413c9478745a76"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f0a1cee5deff10a06b2e330acb91a2f0f5e2bd8","unresolved":false,"context_lines":[{"line_number":763,"context_line":"        interface_name \u003d None"},{"line_number":764,"context_line":"        if ex_gw_port_id:"},{"line_number":765,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":766,"context_line":"        # gateway port has been added or changed"},{"line_number":767,"context_line":"        if (ex_gw_port and (not ri.ex_gw_port"},{"line_number":768,"context_line":"                            or ex_gw_port[\u0027id\u0027] !\u003d ri.ex_gw_port[\u0027id\u0027])):"},{"line_number":769,"context_line":"            self._set_subnet_info(ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ef16d748","line":766,"in_reply_to":"baada198_64d6ac28","updated":"2014-07-30 03:44:33.000000000","message":"I could go along with your suggestion.  _set_subnet_info will be run more than it is currently but it isn\u0027t an expensive thing to do.  Give it a try.","commit_id":"5144ea4fe7f8aadaec72ffa499413c9478745a76"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"6b21df303143c1674ef1514e444aeff4593be4a4","unresolved":false,"context_lines":[{"line_number":763,"context_line":"        interface_name \u003d None"},{"line_number":764,"context_line":"        if ex_gw_port_id:"},{"line_number":765,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":766,"context_line":"        # gateway port has been added or changed"},{"line_number":767,"context_line":"        if (ex_gw_port and (not ri.ex_gw_port"},{"line_number":768,"context_line":"                            or ex_gw_port[\u0027id\u0027] !\u003d ri.ex_gw_port[\u0027id\u0027])):"},{"line_number":769,"context_line":"            self._set_subnet_info(ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_64d6ac28","line":766,"in_reply_to":"baada198_f6cb5947","updated":"2014-07-28 19:14:52.000000000","message":"ok, In that case how about retain the old code but add the subnet_info through _set_subnet_info(...) before doing the compare rather than after?\n\nThis would become a fair compare then, and would get triggered on any update to the gateway port that plugin sends down. So the code would look like :\n\n.....        \n        self._set_subnet_info(ex_gw_port)\n        if ex_gw_port and ex_gw_port !\u003d ri.ex_gw_port:\n            self.external_gateway_added(ri, ex_gw_port,\n                                        interface_name, internal_cidrs)           \n......","commit_id":"5144ea4fe7f8aadaec72ffa499413c9478745a76"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"76ccce028a4d77c463864a96ea0adacce475b347","unresolved":false,"context_lines":[{"line_number":765,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":766,"context_line":"        # gateway port has been added or changed"},{"line_number":767,"context_line":"        if (ex_gw_port and (not ri.ex_gw_port"},{"line_number":768,"context_line":"                            or ex_gw_port[\u0027id\u0027] !\u003d ri.ex_gw_port[\u0027id\u0027])):"},{"line_number":769,"context_line":"            self._set_subnet_info(ex_gw_port)"},{"line_number":770,"context_line":"            self.external_gateway_added(ri, ex_gw_port,"},{"line_number":771,"context_line":"                                        interface_name, internal_cidrs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_f6c43942","line":768,"updated":"2014-07-28 15:18:00.000000000","message":"Please add a unit test case that exercises this defect.","commit_id":"5144ea4fe7f8aadaec72ffa499413c9478745a76"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ea27ecd61a99c8f5d43348e51c7df725b1e0b3c0","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"        else:"},{"line_number":1055,"context_line":"            LOG.error(_(\u0027DVR: no map match_port found!\u0027))"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":1058,"context_line":"                            internal_cidrs, snat_ports):"},{"line_number":1059,"context_line":"        \"\"\"Create SNAT namespace.\"\"\""},{"line_number":1060,"context_line":"        snat_ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ff97d3e8","side":"PARENT","line":1057,"updated":"2014-08-03 20:31:40.000000000","message":"The removal of internal_cidrs belongs in a separate patch.","commit_id":"03e0989a0fc688ba701e0b5e845ed74e8ea30394"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"29831d24c1729de4e78331fa552d16ff99236712","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"        else:"},{"line_number":1055,"context_line":"            LOG.error(_(\u0027DVR: no map match_port found!\u0027))"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":1058,"context_line":"                            internal_cidrs, snat_ports):"},{"line_number":1059,"context_line":"        \"\"\"Create SNAT namespace.\"\"\""},{"line_number":1060,"context_line":"        snat_ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_69a3eeb0","side":"PARENT","line":1057,"in_reply_to":"baada198_4540f005","updated":"2014-08-04 19:59:04.000000000","message":"+2 to Assaf\u0027s comment.  His argument is not against refactoring this.  His argument is that it is out of the scope of this patch.  A patch should be focused on one thing and avoid fixing multiple independent problems.  It makes patches easier to review and merge that way.\n\nIncidentally, this refactor has been on my list to do.  I\u0027ve got a couple of minutes, I\u0027ll insert a commit before this one to refactor this an you\u0027ll see that they are easier to review as independent patches.","commit_id":"03e0989a0fc688ba701e0b5e845ed74e8ea30394"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"287962423e53dce9dab59a3e2df0234d26dcbbfe","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"        else:"},{"line_number":1055,"context_line":"            LOG.error(_(\u0027DVR: no map match_port found!\u0027))"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":1058,"context_line":"                            internal_cidrs, snat_ports):"},{"line_number":1059,"context_line":"        \"\"\"Create SNAT namespace.\"\"\""},{"line_number":1060,"context_line":"        snat_ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4540f005","side":"PARENT","line":1057,"in_reply_to":"baada198_ff97d3e8","updated":"2014-08-03 23:06:41.000000000","message":"Assaf: this patch includes a new method within the same call tree. Rather than proliferate passing around unused parameter (internal_cidrs) further it is better to include this clean up here. Overall if you see any reason to continue carrying around internal_cidrs in these methods let me know.","commit_id":"03e0989a0fc688ba701e0b5e845ed74e8ea30394"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b140f8bac21a3c8030607a166fa9b19b61638b31","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"            ns_name \u003d ri.ns_name"},{"line_number":1125,"context_line":"            floating_ips \u003d self.get_floating_ips(ri)"},{"line_number":1126,"context_line":"            preserve_ips \u003d [ip[\u0027floating_ip_address\u0027] +"},{"line_number":1127,"context_line":"                            FLOATING_IP_CIDR_SUFFIX for ip in floating_ips]"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"        self._external_gateway_added(ri, ex_gw_port, interface_name,"},{"line_number":1130,"context_line":"                                     ns_name, preserve_ips)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b772df0f","line":1127,"updated":"2014-08-04 01:52:46.000000000","message":"better to avoid duplicating code with external_gateway_added.","commit_id":"4bf3bf0c587a8e496dd0524db4bf947cdafdf693"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"29831d24c1729de4e78331fa552d16ff99236712","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"            ns_name \u003d ri.ns_name"},{"line_number":1125,"context_line":"            floating_ips \u003d self.get_floating_ips(ri)"},{"line_number":1126,"context_line":"            preserve_ips \u003d [ip[\u0027floating_ip_address\u0027] +"},{"line_number":1127,"context_line":"                            FLOATING_IP_CIDR_SUFFIX for ip in floating_ips]"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"        self._external_gateway_added(ri, ex_gw_port, interface_name,"},{"line_number":1130,"context_line":"                                     ns_name, preserve_ips)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_495d4aeb","line":1127,"in_reply_to":"baada198_b772df0f","updated":"2014-08-04 19:59:04.000000000","message":"The return on investment may not be worth it.  Small number of lines duplicated twice doesn\u0027t hit my threshold for a must-refactor.  I\u0027m happy to leave it up to Rajeev.\n\nnit:  I would like to see the two formatted the same.  Here, you wrap FLOATING_IP_CIDR_SUFFIX to the next line when it would fit on the previous line.","commit_id":"4bf3bf0c587a8e496dd0524db4bf947cdafdf693"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ca3a2c3b59ea1c49ea69b63c9ef922dff60a4306","unresolved":false,"context_lines":[{"line_number":770,"context_line":"                # gateway port has been added"},{"line_number":771,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":772,"context_line":"            elif ex_gw_port !\u003d ri.ex_gw_port:"},{"line_number":773,"context_line":"                #gateway port has been changed"},{"line_number":774,"context_line":"                self.external_gateway_updated(ri, ex_gw_port, interface_name)"},{"line_number":775,"context_line":"        elif not ex_gw_port and ri.ex_gw_port:"},{"line_number":776,"context_line":"            #gateway port has been removed"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5e74f303","line":773,"updated":"2014-08-05 18:04:10.000000000","message":"nit: add space after #","commit_id":"48fec2d6bfd1abc62d3697d43a63f6f00e5d88a1"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"e20d399e84da287a6381f40dea445ceb04833f95","unresolved":false,"context_lines":[{"line_number":770,"context_line":"                # gateway port has been added"},{"line_number":771,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":772,"context_line":"            elif ex_gw_port !\u003d ri.ex_gw_port:"},{"line_number":773,"context_line":"                #gateway port has been changed"},{"line_number":774,"context_line":"                self.external_gateway_updated(ri, ex_gw_port, interface_name)"},{"line_number":775,"context_line":"        elif not ex_gw_port and ri.ex_gw_port:"},{"line_number":776,"context_line":"            #gateway port has been removed"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_afd92d58","line":773,"in_reply_to":"baada198_5e74f303","updated":"2014-08-06 19:42:13.000000000","message":"Done","commit_id":"48fec2d6bfd1abc62d3697d43a63f6f00e5d88a1"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ca3a2c3b59ea1c49ea69b63c9ef922dff60a4306","unresolved":false,"context_lines":[{"line_number":773,"context_line":"                #gateway port has been changed"},{"line_number":774,"context_line":"                self.external_gateway_updated(ri, ex_gw_port, interface_name)"},{"line_number":775,"context_line":"        elif not ex_gw_port and ri.ex_gw_port:"},{"line_number":776,"context_line":"            #gateway port has been removed"},{"line_number":777,"context_line":"            self.external_gateway_removed(ri, ri.ex_gw_port, interface_name)"},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"        stale_devs \u003d [dev for dev in existing_devices"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7e79b7fa","line":776,"updated":"2014-08-05 18:04:10.000000000","message":"nit: same as above","commit_id":"48fec2d6bfd1abc62d3697d43a63f6f00e5d88a1"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"e20d399e84da287a6381f40dea445ceb04833f95","unresolved":false,"context_lines":[{"line_number":773,"context_line":"                #gateway port has been changed"},{"line_number":774,"context_line":"                self.external_gateway_updated(ri, ex_gw_port, interface_name)"},{"line_number":775,"context_line":"        elif not ex_gw_port and ri.ex_gw_port:"},{"line_number":776,"context_line":"            #gateway port has been removed"},{"line_number":777,"context_line":"            self.external_gateway_removed(ri, ri.ex_gw_port, interface_name)"},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"        stale_devs \u003d [dev for dev in existing_devices"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_cfdca148","line":776,"in_reply_to":"baada198_7e79b7fa","updated":"2014-08-06 19:42:13.000000000","message":"Done","commit_id":"48fec2d6bfd1abc62d3697d43a63f6f00e5d88a1"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d68990b32c403317f51a507d73329645d1c01bc9","unresolved":false,"context_lines":[{"line_number":772,"context_line":"            # gateway port has been added or changed"},{"line_number":773,"context_line":"            self._set_subnet_info(ex_gw_port)"},{"line_number":774,"context_line":"            if not ri.ex_gw_port:"},{"line_number":775,"context_line":"                # gateway port has been added"},{"line_number":776,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":777,"context_line":"            elif ex_gw_port !\u003d ri.ex_gw_port:"},{"line_number":778,"context_line":"                # gateway port has been changed"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_627c6e72","line":775,"updated":"2014-08-07 14:32:45.000000000","message":"IMO, the comments are redundant","commit_id":"3d48df1a789409db59296c177b4ecaab87096d32"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"6f52c4b9fa9e94030e5f2247039f8b27601da7b4","unresolved":false,"context_lines":[{"line_number":772,"context_line":"            # gateway port has been added or changed"},{"line_number":773,"context_line":"            self._set_subnet_info(ex_gw_port)"},{"line_number":774,"context_line":"            if not ri.ex_gw_port:"},{"line_number":775,"context_line":"                # gateway port has been added"},{"line_number":776,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":777,"context_line":"            elif ex_gw_port !\u003d ri.ex_gw_port:"},{"line_number":778,"context_line":"                # gateway port has been changed"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_43a5a901","line":775,"in_reply_to":"baada198_627c6e72","updated":"2014-08-07 17:08:35.000000000","message":"Done","commit_id":"3d48df1a789409db59296c177b4ecaab87096d32"}],"neutron/tests/unit/test_l3_agent.py":[{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ca3a2c3b59ea1c49ea69b63c9ef922dff60a4306","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                      \u0027ip_cidr\u0027: \u002720.0.0.30/24\u0027}"},{"line_number":390,"context_line":"        interface_name \u003d agent.get_external_device_name(ex_gw_port[\u0027id\u0027])"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        self.device_exists.return_value \u003d False"},{"line_number":393,"context_line":"        fake_fip \u003d {\u0027floatingips\u0027: [{\u0027id\u0027: _uuid(),"},{"line_number":394,"context_line":"                                     \u0027floating_ip_address\u0027: \u0027192.168.1.34\u0027,"},{"line_number":395,"context_line":"                                     \u0027fixed_ip_address\u0027: \u0027192.168.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7e60d734","line":392,"updated":"2014-08-05 18:04:10.000000000","message":"shouldn\u0027t device_exists return \u0027True\u0027 on an update case?","commit_id":"48fec2d6bfd1abc62d3697d43a63f6f00e5d88a1"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"e20d399e84da287a6381f40dea445ceb04833f95","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                      \u0027ip_cidr\u0027: \u002720.0.0.30/24\u0027}"},{"line_number":390,"context_line":"        interface_name \u003d agent.get_external_device_name(ex_gw_port[\u0027id\u0027])"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        self.device_exists.return_value \u003d False"},{"line_number":393,"context_line":"        fake_fip \u003d {\u0027floatingips\u0027: [{\u0027id\u0027: _uuid(),"},{"line_number":394,"context_line":"                                     \u0027floating_ip_address\u0027: \u0027192.168.1.34\u0027,"},{"line_number":395,"context_line":"                                     \u0027fixed_ip_address\u0027: \u0027192.168.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_2f16fdf2","line":392,"in_reply_to":"baada198_7e60d734","updated":"2014-08-06 19:42:13.000000000","message":"Done","commit_id":"48fec2d6bfd1abc62d3697d43a63f6f00e5d88a1"}]}
