)]}'
{"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"c863f3956a665d60c895868346c469a688fca642","unresolved":true,"context_lines":[{"line_number":329,"context_line":"                                           device\u003ddevice,"},{"line_number":330,"context_line":"                                           device_exists\u003ddevice_exists)"},{"line_number":331,"context_line":"                for allowed_address_pair in p.get(\u0027allowed_address_pairs\u0027, []):"},{"line_number":332,"context_line":"                    self._update_arp_entry(allowed_address_pair[\u0027ip_address\u0027],"},{"line_number":333,"context_line":"                                           allowed_address_pair[\u0027mac_address\u0027],"},{"line_number":334,"context_line":"                                           subnet_id,"},{"line_number":335,"context_line":"                                           \u0027add\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"28535ecf_eb31d54f","line":332,"range":{"start_line":332,"start_character":25,"end_line":332,"end_character":42},"updated":"2021-05-18 14:07:38.000000000","message":"so in this router namespace this allowed_address_pair[\u0027ip_address\u0027] will be owned by port device but does allowed_address_pair actually implies this? I thought it means only that this port is allowed to accept traffic for this mac-ip pair. Can you please point to where this func is called on adding new allowed_address_pair to port?","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d9c4ba26c76d60eea7047279809faa4811330254","unresolved":true,"context_lines":[{"line_number":329,"context_line":"                                           device\u003ddevice,"},{"line_number":330,"context_line":"                                           device_exists\u003ddevice_exists)"},{"line_number":331,"context_line":"                for allowed_address_pair in p.get(\u0027allowed_address_pairs\u0027, []):"},{"line_number":332,"context_line":"                    self._update_arp_entry(allowed_address_pair[\u0027ip_address\u0027],"},{"line_number":333,"context_line":"                                           allowed_address_pair[\u0027mac_address\u0027],"},{"line_number":334,"context_line":"                                           subnet_id,"},{"line_number":335,"context_line":"                                           \u0027add\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"4e8ccdaa_a6766439","line":332,"range":{"start_line":332,"start_character":25,"end_line":332,"end_character":42},"in_reply_to":"28535ecf_eb31d54f","updated":"2021-05-18 15:20:14.000000000","message":"Sure, it\u0027s here https://github.com/openstack/neutron/blob/c12588c7be7ef6990284a5161975c2b81ff30f03/neutron/db/l3_dvrscheduler_db.py#L536\n\nAnd it was even restored recently by patch https://github.com/openstack/neutron/commit/e6ddea1aa0c17fd16e746fe49696a675894f7209","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e6aba4d5f73c884977e8a2ee61ce59df2de5d43a","unresolved":true,"context_lines":[{"line_number":329,"context_line":"                                           device\u003ddevice,"},{"line_number":330,"context_line":"                                           device_exists\u003ddevice_exists)"},{"line_number":331,"context_line":"                for allowed_address_pair in p.get(\u0027allowed_address_pairs\u0027, []):"},{"line_number":332,"context_line":"                    self._update_arp_entry(allowed_address_pair[\u0027ip_address\u0027],"},{"line_number":333,"context_line":"                                           allowed_address_pair[\u0027mac_address\u0027],"},{"line_number":334,"context_line":"                                           subnet_id,"},{"line_number":335,"context_line":"                                           \u0027add\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"8cdb13ef_9e6a5522","line":332,"range":{"start_line":332,"start_character":25,"end_line":332,"end_character":42},"in_reply_to":"4e8ccdaa_a6766439","updated":"2021-05-20 07:38:38.000000000","message":"+1, we have this functionality back in the code.","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"}],"neutron/db/allowedaddresspairs_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e6aba4d5f73c884977e8a2ee61ce59df2de5d43a","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        return [self._make_allowed_address_pairs_dict(pair.db_obj)"},{"line_number":67,"context_line":"                for pair in pairs]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_allowed_address_pairs_for_ports(self, context, port_ids):"},{"line_number":70,"context_line":"        pairs \u003d ("},{"line_number":71,"context_line":"            obj_addr_pair.AllowedAddressPair."},{"line_number":72,"context_line":"            get_allowed_address_pairs_for_ports("}],"source_content_type":"text/x-python","patch_set":3,"id":"ef426554_90b16e6c","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":43},"updated":"2021-05-20 07:38:38.000000000","message":"As commented, this method is not needed. This is retrieved in the port DB model.","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e4144ae02fe7bf6570dbcf88e2ddb00138ca6a01","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        return [self._make_allowed_address_pairs_dict(pair.db_obj)"},{"line_number":67,"context_line":"                for pair in pairs]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_allowed_address_pairs_for_ports(self, context, port_ids):"},{"line_number":70,"context_line":"        pairs \u003d ("},{"line_number":71,"context_line":"            obj_addr_pair.AllowedAddressPair."},{"line_number":72,"context_line":"            get_allowed_address_pairs_for_ports("}],"source_content_type":"text/x-python","patch_set":3,"id":"be09fe48_d2b3e043","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":43},"in_reply_to":"ef426554_90b16e6c","updated":"2021-05-20 09:57:30.000000000","message":"Please see my comment in  neutron/db/l3_dvr_db.py","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"3da7abe47830dd0a9e087b2846a098f44d222eb6","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        for port in ports_list:"},{"line_number":1351,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d ("},{"line_number":1352,"context_line":"                self._core_plugin.get_allowed_address_pairs("},{"line_number":1353,"context_line":"                    context, port[\u0027id\u0027]))"},{"line_number":1354,"context_line":"        return ports_list"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"23422f73_d8e9dc71","line":1353,"range":{"start_line":1350,"start_character":8,"end_line":1353,"end_character":41},"updated":"2021-05-14 14:41:49.000000000","message":"It\u0027s a DB query per port :( please consider getting all allowed address pairs from DB at once into a dict and then use values from a dict","commit_id":"6d4ca8f6bb0f86b4b698dd40ada288ecb596ae2b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7609ea46d19fabdba29c29d8927f24bc0c1e7e29","unresolved":false,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        for port in ports_list:"},{"line_number":1351,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d ("},{"line_number":1352,"context_line":"                self._core_plugin.get_allowed_address_pairs("},{"line_number":1353,"context_line":"                    context, port[\u0027id\u0027]))"},{"line_number":1354,"context_line":"        return ports_list"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"f0da942a_def0e362","line":1353,"range":{"start_line":1350,"start_character":8,"end_line":1353,"end_character":41},"in_reply_to":"23422f73_d8e9dc71","updated":"2021-05-17 13:13:49.000000000","message":"Done","commit_id":"6d4ca8f6bb0f86b4b698dd40ada288ecb596ae2b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e6aba4d5f73c884977e8a2ee61ce59df2de5d43a","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        ports_ids \u003d [p[\u0027id\u0027] for p in ports_list]"},{"line_number":1351,"context_line":"        allowed_address_pairs \u003d ("},{"line_number":1352,"context_line":"            self._core_plugin.get_allowed_address_pairs_for_ports("},{"line_number":1353,"context_line":"                context, ports_ids))"},{"line_number":1354,"context_line":"        for port in ports_list:"},{"line_number":1355,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d allowed_address_pairs.get("},{"line_number":1356,"context_line":"                port[\u0027id\u0027], [])"},{"line_number":1357,"context_line":"        return ports_list"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"def is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":3,"id":"d7524ad6_6e4e8fd5","line":1357,"range":{"start_line":1350,"start_character":8,"end_line":1357,"end_character":25},"updated":"2021-05-20 07:38:38.000000000","message":"That should not be needed. If \"allowed_address_pairs\" API extension is enabled, when \"_make_port_dict\" is called, we can process the resource (port in this case) extensions and append this new field to the port definition.\n\nOf course, we need first to set \"process_extensions\u003dTrue\" in L1347.\n\nport DB object has this info already, we don\u0027t need a new DB call.","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d043848f95a8d8f6233f5d5c2e496e872c16895d","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        ports_ids \u003d [p[\u0027id\u0027] for p in ports_list]"},{"line_number":1351,"context_line":"        allowed_address_pairs \u003d ("},{"line_number":1352,"context_line":"            self._core_plugin.get_allowed_address_pairs_for_ports("},{"line_number":1353,"context_line":"                context, ports_ids))"},{"line_number":1354,"context_line":"        for port in ports_list:"},{"line_number":1355,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d allowed_address_pairs.get("},{"line_number":1356,"context_line":"                port[\u0027id\u0027], [])"},{"line_number":1357,"context_line":"        return ports_list"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"def is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9d30933e_41eee1e9","line":1357,"range":{"start_line":1350,"start_character":8,"end_line":1357,"end_character":25},"in_reply_to":"4ca8c1b6_f47ed33e","updated":"2021-05-20 08:13:57.000000000","message":"Are we sure \"process_extensions\u003dTrue\" won\u0027t give another overhead?","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"18320c710e97c45d80abc0b53234f524d6b5eb7d","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        ports_ids \u003d [p[\u0027id\u0027] for p in ports_list]"},{"line_number":1351,"context_line":"        allowed_address_pairs \u003d ("},{"line_number":1352,"context_line":"            self._core_plugin.get_allowed_address_pairs_for_ports("},{"line_number":1353,"context_line":"                context, ports_ids))"},{"line_number":1354,"context_line":"        for port in ports_list:"},{"line_number":1355,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d allowed_address_pairs.get("},{"line_number":1356,"context_line":"                port[\u0027id\u0027], [])"},{"line_number":1357,"context_line":"        return ports_list"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"def is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1720a3d0_a1a0fdf7","line":1357,"range":{"start_line":1350,"start_character":8,"end_line":1357,"end_character":25},"in_reply_to":"69203871_e4ff134b","updated":"2021-05-20 14:24:13.000000000","message":"right, I think I flew over the comment... sorry\n\n(NOT RELATED TO THIS PATCH): I think we can do this in Neutron code, at least in some method calls like this one. \"_make_port_dict\" (and other related methods) can have an optional parameter with a list of required extensions to be processed","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e4144ae02fe7bf6570dbcf88e2ddb00138ca6a01","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        ports_ids \u003d [p[\u0027id\u0027] for p in ports_list]"},{"line_number":1351,"context_line":"        allowed_address_pairs \u003d ("},{"line_number":1352,"context_line":"            self._core_plugin.get_allowed_address_pairs_for_ports("},{"line_number":1353,"context_line":"                context, ports_ids))"},{"line_number":1354,"context_line":"        for port in ports_list:"},{"line_number":1355,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d allowed_address_pairs.get("},{"line_number":1356,"context_line":"                port[\u0027id\u0027], [])"},{"line_number":1357,"context_line":"        return ports_list"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"def is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":3,"id":"69203871_e4ff134b","line":1357,"range":{"start_line":1350,"start_character":8,"end_line":1357,"end_character":25},"in_reply_to":"9d30933e_41eee1e9","updated":"2021-05-20 09:57:30.000000000","message":"AFAIR process_extensions\u003dFalse was introduced to optimize db queries for dvr. See https://bugs.launchpad.net/neutron/+bug/1834308 for details. IIRC it needed e.g. to process QoS things for each of such ports everytime and that\u0027s totally not needed here.\nThat\u0027s why I did it that way and added TODO above so it could be changed if/when neutron_lib will accept list of extensions which should be processed so we could only process that allowedaddresspair extension here.","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"808a79e77f4dfae2df2828174a38bcdea0cf974c","unresolved":true,"context_lines":[{"line_number":1347,"context_line":"                port, process_extensions\u003dFalse)"},{"line_number":1348,"context_line":"            for port in ports"},{"line_number":1349,"context_line":"        ]"},{"line_number":1350,"context_line":"        ports_ids \u003d [p[\u0027id\u0027] for p in ports_list]"},{"line_number":1351,"context_line":"        allowed_address_pairs \u003d ("},{"line_number":1352,"context_line":"            self._core_plugin.get_allowed_address_pairs_for_ports("},{"line_number":1353,"context_line":"                context, ports_ids))"},{"line_number":1354,"context_line":"        for port in ports_list:"},{"line_number":1355,"context_line":"            port[\u0027allowed_address_pairs\u0027] \u003d allowed_address_pairs.get("},{"line_number":1356,"context_line":"                port[\u0027id\u0027], [])"},{"line_number":1357,"context_line":"        return ports_list"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"def is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":3,"id":"4ca8c1b6_f47ed33e","line":1357,"range":{"start_line":1350,"start_character":8,"end_line":1357,"end_character":25},"in_reply_to":"d7524ad6_6e4e8fd5","updated":"2021-05-20 08:07:13.000000000","message":"+1","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"}],"neutron/objects/port/extensions/allowedaddresspairs.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e6aba4d5f73c884977e8a2ee61ce59df2de5d43a","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        return fields"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def get_allowed_address_pairs_for_ports(cls, context, port_ids):"},{"line_number":68,"context_line":"        with db_api.CONTEXT_READER.using(context):"},{"line_number":69,"context_line":"            query \u003d context.session.query(models.AllowedAddressPair).filter("},{"line_number":70,"context_line":"                    models.AllowedAddressPair.port_id.in_(port_ids))"}],"source_content_type":"text/x-python","patch_set":3,"id":"14e34f04_4c233251","line":67,"range":{"start_line":67,"start_character":8,"end_line":67,"end_character":43},"updated":"2021-05-20 07:38:38.000000000","message":"ditto","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e4144ae02fe7bf6570dbcf88e2ddb00138ca6a01","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        return fields"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def get_allowed_address_pairs_for_ports(cls, context, port_ids):"},{"line_number":68,"context_line":"        with db_api.CONTEXT_READER.using(context):"},{"line_number":69,"context_line":"            query \u003d context.session.query(models.AllowedAddressPair).filter("},{"line_number":70,"context_line":"                    models.AllowedAddressPair.port_id.in_(port_ids))"}],"source_content_type":"text/x-python","patch_set":3,"id":"6ccbe561_ca34b8ae","line":67,"range":{"start_line":67,"start_character":8,"end_line":67,"end_character":43},"in_reply_to":"14e34f04_4c233251","updated":"2021-05-20 09:57:30.000000000","message":"Please see my comment in the previous patch","commit_id":"7b59b5069b1402730602b430416a15b1609253ea"}]}
