)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f5de20bba936155a2869b27e70494126ee2f355c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"for loop in another for loop in _notify_l3_agent_port_update"},{"line_number":10,"context_line":"(_dvr_handle_unbound_allowed_addr_pair_add -\u003e update_arp_entry_for_dvr_service_port,"},{"line_number":11,"context_line":"_dvr_handle_unbound_allowed_addr_pair_del -\u003e _dvr_handle_unbound_allowed_addr_pair_del_arp)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Time exponential growth."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bff0334d_bd2326bd","line":11,"updated":"2017-04-10 15:01:49.000000000","message":"Can you just put a high-level comment here, not the actual code calls since someone reading the commit message might not understand it.  Something like:\n\nWhen adding or deleting allowed address pairs with DVR, the\ncode to update the DVR ARP table is called multiple times.\nChange code to only update things once.","commit_id":"851afe1194313bdfd290fe082f6db3f9bdaf3cda"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b55cf5b097860562f9c204abef5d0e23731df89c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"    if updated_port:"},{"line_number":360,"context_line":"        LOG.debug(\"Allowed address pair port binding removed \""},{"line_number":361,"context_line":"                  \"from service port binding: %s\", updated_port)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_del_arp("},{"line_number":364,"context_line":"        plugin, context, port):"},{"line_number":365,"context_line":"    aa_fixed_ips \u003d plugin._get_allowed_address_pair_fixed_ips(context, port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_593a07cc","line":362,"updated":"2017-04-09 09:34:15.000000000","message":"You should add an extra line","commit_id":"61b8506af1cabde41928709779f4a388dda9ad1a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b55cf5b097860562f9c204abef5d0e23731df89c","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        port_host \u003d port.get(portbindings.HOST_ID)"},{"line_number":391,"context_line":"        allowed_address_pairs_list \u003d port.get(\u0027allowed_address_pairs\u0027)"},{"line_number":392,"context_line":"        if allowed_address_pairs_list and port_host:"},{"line_number":393,"context_line":"            for address_pair in allowed_address_pairs_list:"},{"line_number":394,"context_line":"                _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":395,"context_line":"                    l3plugin, context, port, address_pair)"},{"line_number":396,"context_line":"            _dvr_handle_unbound_allowed_addr_pair_del_arp(l3plugin, context, port)"},{"line_number":397,"context_line":"    l3plugin.delete_arp_entry_for_dvr_service_port(context, port)"},{"line_number":398,"context_line":"    removed_routers \u003d l3plugin.get_dvr_routers_to_remove(context, port)"},{"line_number":399,"context_line":"    for info in removed_routers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_19459f43","line":396,"range":{"start_line":393,"start_character":0,"end_line":396,"end_character":82},"updated":"2017-04-09 09:34:15.000000000","message":"Why don\u0027t you move this to the _dvr_handle_unbound_allowed_addr_pair_del function? Including the for loop","commit_id":"61b8506af1cabde41928709779f4a388dda9ad1a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b55cf5b097860562f9c204abef5d0e23731df89c","unresolved":false,"context_lines":[{"line_number":469,"context_line":"            original_port_state \u003d original_port.get(\u0027admin_state_up\u0027)"},{"line_number":470,"context_line":"            if new_port_state and not original_port_state:"},{"line_number":471,"context_line":"                # Case were we activate the port from inactive state."},{"line_number":472,"context_line":"                for address_pair in allowed_address_pairs_list:"},{"line_number":473,"context_line":"                    _dvr_handle_unbound_allowed_addr_pair_add("},{"line_number":474,"context_line":"                        l3plugin, context, new_port, address_pair)"},{"line_number":475,"context_line":"                l3plugin.update_arp_entry_for_dvr_service_port(context, new_port)"},{"line_number":476,"context_line":"                return"},{"line_number":477,"context_line":"            elif original_port_state and not new_port_state:"},{"line_number":478,"context_line":"                # Case were we deactivate the port from active state."}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_79426b40","line":475,"range":{"start_line":472,"start_character":15,"end_line":475,"end_character":81},"updated":"2017-04-09 09:34:15.000000000","message":"Why don\u0027t you move this to the function? Including the for loop","commit_id":"61b8506af1cabde41928709779f4a388dda9ad1a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b55cf5b097860562f9c204abef5d0e23731df89c","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                return"},{"line_number":477,"context_line":"            elif original_port_state and not new_port_state:"},{"line_number":478,"context_line":"                # Case were we deactivate the port from active state."},{"line_number":479,"context_line":"                for address_pair in allowed_address_pairs_list:"},{"line_number":480,"context_line":"                    _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":481,"context_line":"                        l3plugin, context, original_port, address_pair)"},{"line_number":482,"context_line":"                _dvr_handle_unbound_allowed_addr_pair_del_arp("},{"line_number":483,"context_line":"                    l3plugin, context, original_port)"},{"line_number":484,"context_line":"                return"},{"line_number":485,"context_line":"            elif new_port_state and original_port_state:"},{"line_number":486,"context_line":"                # Case were the same port has additional address_pairs"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_f9779b9f","line":483,"range":{"start_line":479,"start_character":0,"end_line":483,"end_character":53},"updated":"2017-04-09 09:34:15.000000000","message":"ditto","commit_id":"61b8506af1cabde41928709779f4a388dda9ad1a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b55cf5b097860562f9c204abef5d0e23731df89c","unresolved":false,"context_lines":[{"line_number":487,"context_line":"                # added."},{"line_number":488,"context_line":"                original_address_pairs_list \u003d original_port.get(\u0027allowed_address_pairs\u0027)"},{"line_number":489,"context_line":"                if original_address_pairs_list !\u003d allowed_address_pairs_list:"},{"line_number":490,"context_line":"                    for address_pair in allowed_address_pairs_list:"},{"line_number":491,"context_line":"                        _dvr_handle_unbound_allowed_addr_pair_add("},{"line_number":492,"context_line":"                            l3plugin, context, new_port, address_pair)"},{"line_number":493,"context_line":"                    l3plugin.update_arp_entry_for_dvr_service_port(context, new_port)"},{"line_number":494,"context_line":"                return"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        is_fixed_ips_changed \u003d ("}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_593fa7b3","line":493,"range":{"start_line":490,"start_character":0,"end_line":493,"end_character":85},"updated":"2017-04-09 09:34:15.000000000","message":"ditto","commit_id":"61b8506af1cabde41928709779f4a388dda9ad1a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cf37381bc3cdd8766fa5a1d863bc0bccf2107d61","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_add(plugin, context, port):"},{"line_number":346,"context_line":"    allowed_address_pairs_list \u003d port.get(\u0027allowed_address_pairs\u0027)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    if allowed_address_pairs_list:"},{"line_number":349,"context_line":"        for address_pair in allowed_address_pairs_list:"},{"line_number":350,"context_line":"            updated_port \u003d \\"},{"line_number":351,"context_line":"                plugin.update_unbound_allowed_address_pair_port_binding("}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_79cb00a5","line":348,"range":{"start_line":346,"start_character":0,"end_line":348,"end_character":34},"updated":"2017-04-14 07:40:42.000000000","message":"If you do:\nallowed_address_pair_list \u003d port.get(\u0027allowed_address_pairs\u0027, [])\nyou don\u0027t need this check.","commit_id":"f102e864ee2096c2e319c67c6b76aee35f9b7a14"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cf37381bc3cdd8766fa5a1d863bc0bccf2107d61","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":361,"context_line":"        plugin, context, port, allowed_address_pair_list):"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    if allowed_address_pair_list:"},{"line_number":364,"context_line":"        for allowed_address_pair in allowed_address_pair_list:"},{"line_number":365,"context_line":"            updated_port \u003d \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_d98d747c","line":362,"updated":"2017-04-14 07:40:42.000000000","message":"Read \"allowed_address_pairs_list\" inside the function.","commit_id":"f102e864ee2096c2e319c67c6b76aee35f9b7a14"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cf37381bc3cdd8766fa5a1d863bc0bccf2107d61","unresolved":false,"context_lines":[{"line_number":360,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":361,"context_line":"        plugin, context, port, allowed_address_pair_list):"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    if allowed_address_pair_list:"},{"line_number":364,"context_line":"        for allowed_address_pair in allowed_address_pair_list:"},{"line_number":365,"context_line":"            updated_port \u003d \\"},{"line_number":366,"context_line":"                plugin.remove_unbound_allowed_address_pair_port_binding("}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_79f2e008","line":363,"range":{"start_line":363,"start_character":7,"end_line":363,"end_character":32},"updated":"2017-04-14 07:40:42.000000000","message":"If you do:\n\nallowed_address_pair_list \u003d port.get(\u0027allowed_address_pairs\u0027, [])\n\nyou don\u0027t need this check.","commit_id":"f102e864ee2096c2e319c67c6b76aee35f9b7a14"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cf37381bc3cdd8766fa5a1d863bc0bccf2107d61","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    if allowed_address_pair_list:"},{"line_number":364,"context_line":"        for allowed_address_pair in allowed_address_pair_list:"},{"line_number":365,"context_line":"            updated_port \u003d \\"},{"line_number":366,"context_line":"                plugin.remove_unbound_allowed_address_pair_port_binding("},{"line_number":367,"context_line":"                    context, port, allowed_address_pair)"},{"line_number":368,"context_line":"            if updated_port:"},{"line_number":369,"context_line":"                LOG.debug(\"Allowed address pair port binding removed \""},{"line_number":370,"context_line":"                          \"from service port binding: %s\", updated_port)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_b9d1885a","line":367,"range":{"start_line":365,"start_character":27,"end_line":367,"end_character":56},"updated":"2017-04-14 07:40:42.000000000","message":"In this project, to avoid \"\\\" line braker, the parenthesis is used instead.\n\nupdated_port \u003d (remove_unbound_allowed_address_pair_port_binding(\n    port, allowed_address_pair))","commit_id":"f102e864ee2096c2e319c67c6b76aee35f9b7a14"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cf37381bc3cdd8766fa5a1d863bc0bccf2107d61","unresolved":false,"context_lines":[{"line_number":397,"context_line":"    if port:"},{"line_number":398,"context_line":"        port_host \u003d port.get(portbindings.HOST_ID)"},{"line_number":399,"context_line":"        if port_host:"},{"line_number":400,"context_line":"            allowed_address_pairs_list \u003d port.get(\u0027allowed_address_pairs\u0027)"},{"line_number":401,"context_line":"            _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":402,"context_line":"                l3plugin, context, port, allowed_address_pairs_list)"},{"line_number":403,"context_line":"    l3plugin.delete_arp_entry_for_dvr_service_port(context, port)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_f9903098","line":400,"range":{"start_line":400,"start_character":12,"end_line":400,"end_character":38},"updated":"2017-04-14 07:40:42.000000000","message":"You don\u0027t need this variable but in \"_dvr_handle_unbound_allowed_addr_pair_del\". Read it inside the function.","commit_id":"f102e864ee2096c2e319c67c6b76aee35f9b7a14"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"498182e893a5649fb92cc45df1c6f93a0834d55e","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            elif original_port_state and not new_port_state:"},{"line_number":481,"context_line":"                # Case were we deactivate the port from active state."},{"line_number":482,"context_line":"                _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":483,"context_line":"                    l3plugin, context, original_port)"},{"line_number":484,"context_line":"                return"},{"line_number":485,"context_line":"            elif new_port_state and original_port_state:"},{"line_number":486,"context_line":"                # Case were the same port has additional address_pairs"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ffa3b31_f1d02ecc","line":483,"updated":"2017-04-16 08:39:14.000000000","message":"This changed the behavior a bit. allowed_address pairs in the old code always came from new_port, but here you\u0027re passing the old ones.","commit_id":"eeab06b2812524b1bf67596cdcb314e690ab3ad7"}],"neutron/tests/unit/scheduler/test_l3_agent_scheduler.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e4c93b12ade4bb4874cfe5e1a6488ef3d8bf0e5e","unresolved":false,"context_lines":[{"line_number":937,"context_line":"        l3_dvrscheduler_db._notify_l3_agent_new_port("},{"line_number":938,"context_line":"            \u0027port\u0027, \u0027after_create\u0027, mock.ANY, **kwargs)"},{"line_number":939,"context_line":"        self.assertEqual("},{"line_number":940,"context_line":"                1, l3plugin.update_arp_entry_for_dvr_service_port.call_count)"},{"line_number":941,"context_line":"        l3plugin.update_arp_entry_for_dvr_service_port.\\"},{"line_number":942,"context_line":"            assert_called_once_with("},{"line_number":943,"context_line":"                self.adminContext, kwargs.get(\u0027port\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_539b1672","line":940,"updated":"2017-09-06 20:51:36.000000000","message":"The code below should check it was called only once with specific arguments.","commit_id":"a9f249050754afc97b6f5cab45ab47826ee4e515"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e4c93b12ade4bb4874cfe5e1a6488ef3d8bf0e5e","unresolved":false,"context_lines":[{"line_number":981,"context_line":"        l3_dvrscheduler_db._notify_l3_agent_port_update("},{"line_number":982,"context_line":"            \u0027port\u0027, \u0027after_update\u0027, mock.ANY, **kwargs)"},{"line_number":983,"context_line":"        self.assertEqual(1,"},{"line_number":984,"context_line":"            l3plugin.update_arp_entry_for_dvr_service_port.call_count)"},{"line_number":985,"context_line":"        l3plugin.dvr_handle_new_service_port.assert_called_once_with("},{"line_number":986,"context_line":"            self.adminContext, kwargs.get(\u0027port\u0027), dest_host\u003d\u0027vm-host2\u0027)"},{"line_number":987,"context_line":"        l3plugin.update_arp_entry_for_dvr_service_port.\\"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_73a05291","line":984,"updated":"2017-09-06 20:51:36.000000000","message":"Same here.","commit_id":"a9f249050754afc97b6f5cab45ab47826ee4e515"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e4c93b12ade4bb4874cfe5e1a6488ef3d8bf0e5e","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"        l3_dvrscheduler_db._notify_l3_agent_port_update("},{"line_number":1035,"context_line":"            \u0027port\u0027, \u0027after_update\u0027, mock.ANY, **kwargs)"},{"line_number":1036,"context_line":"        self.assertEqual(1,"},{"line_number":1037,"context_line":"            l3plugin.update_arp_entry_for_dvr_service_port.call_count)"},{"line_number":1038,"context_line":"        l3plugin.update_arp_entry_for_dvr_service_port.\\"},{"line_number":1039,"context_line":"            assert_called_once_with("},{"line_number":1040,"context_line":"                self.adminContext, kwargs.get(\u0027port\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_33a64aad","line":1037,"updated":"2017-09-06 20:51:36.000000000","message":"Same here.","commit_id":"a9f249050754afc97b6f5cab45ab47826ee4e515"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e4c93b12ade4bb4874cfe5e1a6488ef3d8bf0e5e","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"                 assert_called_once_with(mock.ANY, \u0027foo_id\u0027, source_host))"},{"line_number":1092,"context_line":"                self.assertEqual("},{"line_number":1093,"context_line":"                    1,"},{"line_number":1094,"context_line":"                    l3plugin.delete_arp_entry_for_dvr_service_port.call_count)"},{"line_number":1095,"context_line":"            if fip and not routers_to_remove:"},{"line_number":1096,"context_line":"                (l3plugin.l3_rpc_notifier.routers_updated_on_host."},{"line_number":1097,"context_line":"                 assert_called_once_with(mock.ANY, [\u0027router_id\u0027], source_host))"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_53c2f635","line":1094,"updated":"2017-09-06 20:51:36.000000000","message":"This is one check you\u0027re asking about Rodolfo, right?","commit_id":"a9f249050754afc97b6f5cab45ab47826ee4e515"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e4c93b12ade4bb4874cfe5e1a6488ef3d8bf0e5e","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                (l3plugin.l3_rpc_notifier.routers_updated_on_host."},{"line_number":1097,"context_line":"                 assert_called_once_with(mock.ANY, [\u0027router_id\u0027], source_host))"},{"line_number":1098,"context_line":"            self.assertEqual("},{"line_number":1099,"context_line":"                1, l3plugin.update_arp_entry_for_dvr_service_port.call_count)"},{"line_number":1100,"context_line":"            l3plugin.dvr_handle_new_service_port.assert_called_once_with("},{"line_number":1101,"context_line":"                self.adminContext, kwargs.get(\u0027port\u0027), dest_host\u003dNone)"},{"line_number":1102,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_33bf6aab","line":1099,"updated":"2017-09-06 20:51:36.000000000","message":"And the other?","commit_id":"a9f249050754afc97b6f5cab45ab47826ee4e515"}]}
