)]}'
{"neutron/agent/l2/extensions/fdb_population.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8f2b97cc152f3564837453afb0c09b6b55bf2e3c","unresolved":true,"context_lines":[{"line_number":92,"context_line":"            # check if rule for mac already exists"},{"line_number":93,"context_line":"            if mac in self.device_to_macs[device]:"},{"line_number":94,"context_line":"                return"},{"line_number":95,"context_line":"            if bridge_lib.FdbInterface.add(mac, device):"},{"line_number":96,"context_line":"                LOG.warning(\u0027Unable to add mac %(mac)s to FDB Interface \u0027"},{"line_number":97,"context_line":"                            \u0027%(device)s.\u0027, {\u0027mac\u0027: mac, \u0027device\u0027: device})"},{"line_number":98,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":15,"id":"4540ed9c_31483576","line":95,"updated":"2020-12-22 10:19:25.000000000","message":"I was first wondering why You want to log warning in case when bridge_lib.FdbInterface.add() will return some value. And if it shouldn\u0027t be kept in try...except... block here as it was before?\n\nBut then I checked bridge_lib and I found out that this add() method is decorated with catch_exceptions decorator which will always return 0 or 1. Maybe this should be documented here to make it easier for readers in the future?\nOr maybe we should change that behaviour as it isn\u0027t really \"pythonic\" IMO","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1c016c3944cc099e27d4fb8afe9573846cae34e9","unresolved":true,"context_lines":[{"line_number":92,"context_line":"            # check if rule for mac already exists"},{"line_number":93,"context_line":"            if mac in self.device_to_macs[device]:"},{"line_number":94,"context_line":"                return"},{"line_number":95,"context_line":"            if bridge_lib.FdbInterface.add(mac, device):"},{"line_number":96,"context_line":"                LOG.warning(\u0027Unable to add mac %(mac)s to FDB Interface \u0027"},{"line_number":97,"context_line":"                            \u0027%(device)s.\u0027, {\u0027mac\u0027: mac, \u0027device\u0027: device})"},{"line_number":98,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":15,"id":"99d70439_95071e32","line":95,"in_reply_to":"4540ed9c_31483576","updated":"2020-12-22 11:25:15.000000000","message":"I also found this a bit misleading","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"305f0c91f36a459127ad744b947bf09a30276e45","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # check if rule for mac already exists"},{"line_number":93,"context_line":"            if mac in self.device_to_macs[device]:"},{"line_number":94,"context_line":"                return"},{"line_number":95,"context_line":"            if bridge_lib.FdbInterface.add(mac, device):"},{"line_number":96,"context_line":"                LOG.warning(\u0027Unable to add mac %(mac)s to FDB Interface \u0027"},{"line_number":97,"context_line":"                            \u0027%(device)s.\u0027, {\u0027mac\u0027: mac, \u0027device\u0027: device})"},{"line_number":98,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":15,"id":"c8d045e1_5b2255eb","line":95,"in_reply_to":"551aa981_c881d671","updated":"2021-01-04 11:52:37.000000000","message":"It\u0027s better now IMO. Thx","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5487b5edc34d0a218a71c256b4889c5d028fbb06","unresolved":true,"context_lines":[{"line_number":92,"context_line":"            # check if rule for mac already exists"},{"line_number":93,"context_line":"            if mac in self.device_to_macs[device]:"},{"line_number":94,"context_line":"                return"},{"line_number":95,"context_line":"            if bridge_lib.FdbInterface.add(mac, device):"},{"line_number":96,"context_line":"                LOG.warning(\u0027Unable to add mac %(mac)s to FDB Interface \u0027"},{"line_number":97,"context_line":"                            \u0027%(device)s.\u0027, {\u0027mac\u0027: mac, \u0027device\u0027: device})"},{"line_number":98,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":15,"id":"551aa981_c881d671","line":95,"in_reply_to":"99d70439_95071e32","updated":"2020-12-22 16:46:03.000000000","message":"I agree with you. I reused \"catch_exceptions\" from bridge_lib. This decorator \"Catch bridge command exceptions and mimic $? output\" (from the description). That means, 0 for OK and 1 for errors; just the opposite to Python.\n\nI implement \"catch_exceptions\" in [1] to avoid changing the code using BridgeDevice. Maybe I should invert the output of this decorator and refactor any code using BridgeDevice methods.\n\n[1]https://review.opendev.org/c/openstack/neutron/+/733843/8/neutron/agent/linux/bridge_lib.py","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8f2b97cc152f3564837453afb0c09b6b55bf2e3c","unresolved":true,"context_lines":[{"line_number":107,"context_line":"                return"},{"line_number":108,"context_line":"            for device in devices:"},{"line_number":109,"context_line":"                if mac in self.device_to_macs[device]:"},{"line_number":110,"context_line":"                    if bridge_lib.FdbInterface.delete(mac, device):"},{"line_number":111,"context_line":"                        LOG.warning(\u0027Unable to delete mac %(mac)s from FDB \u0027"},{"line_number":112,"context_line":"                                    \u0027Interface %(device)s.\u0027,"},{"line_number":113,"context_line":"                                    {\u0027mac\u0027: mac, \u0027device\u0027: device})"}],"source_content_type":"text/x-python","patch_set":15,"id":"0025e324_da367420","line":110,"updated":"2020-12-22 10:19:25.000000000","message":"same here","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"}],"neutron/agent/linux/bridge_lib.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"52837909e157c9a70c3c72b55ca459d1be78421a","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        cls._execute_bridge(cmd, namespace, **kwargs)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @staticmethod"},{"line_number":145,"context_line":"    def add( mac, dev, ip_dst\u003dNone, namespace\u003dNone, **kwargs):"},{"line_number":146,"context_line":"        return priv_ip_lib.add_bridge_fdb(mac, dev, ip_dst\u003dip_dst,"},{"line_number":147,"context_line":"                                          namespace\u003dnamespace, **kwargs)"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fffc6b78_efd9abf4","line":145,"updated":"2020-11-20 01:34:46.000000000","message":"pep8: E201 whitespace after \u0027(\u0027","commit_id":"f1cadc05d47e7f04d0f6b6ca551783b6f58e8441"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8f2b97cc152f3564837453afb0c09b6b55bf2e3c","unresolved":true,"context_lines":[{"line_number":138,"context_line":"    @staticmethod"},{"line_number":139,"context_line":"    @catch_exceptions"},{"line_number":140,"context_line":"    def append(mac, dev, dst_ip\u003dNone, namespace\u003dNone, **kwargs):"},{"line_number":141,"context_line":"        return priv_ip_lib.append_bridge_fdb("},{"line_number":142,"context_line":"            mac, dev, dst_ip\u003ddst_ip, namespace\u003dnamespace, **kwargs)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"61c84291_178dfb23","line":141,"updated":"2020-12-22 10:19:25.000000000","message":"if this is decorated with catch_exception, why You need to return anything from it? It will be always changed by that decorator, no?\nAnd same question applies to all other methods changed in that file :)","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5487b5edc34d0a218a71c256b4889c5d028fbb06","unresolved":true,"context_lines":[{"line_number":138,"context_line":"    @staticmethod"},{"line_number":139,"context_line":"    @catch_exceptions"},{"line_number":140,"context_line":"    def append(mac, dev, dst_ip\u003dNone, namespace\u003dNone, **kwargs):"},{"line_number":141,"context_line":"        return priv_ip_lib.append_bridge_fdb("},{"line_number":142,"context_line":"            mac, dev, dst_ip\u003ddst_ip, namespace\u003dnamespace, **kwargs)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"44f16e6a_4bbb3d18","line":141,"in_reply_to":"61c84291_178dfb23","updated":"2020-12-22 16:46:03.000000000","message":"You are right, that makes no sense. If I\u0027m using the decorator that forces a specific returned value, returning anything here is irrelevant.","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"f94558c40774f7ec255e95421951806faa206451","unresolved":true,"context_lines":[{"line_number":183,"context_line":"            if dev and dev !\u003d name:"},{"line_number":184,"context_line":"                continue"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"            master \u003d find_device_name(ip_lib.get_attr(fdb, \u0027NDA_MASTER\u0027),"},{"line_number":187,"context_line":"                                      devices)"},{"line_number":188,"context_line":"            fdb_info \u003d {\u0027mac\u0027: ip_lib.get_attr(fdb, \u0027NDA_LLADDR\u0027),"},{"line_number":189,"context_line":"                        \u0027master\u0027: master,"}],"source_content_type":"text/x-python","patch_set":18,"id":"4e1e3796_8dedf121","line":186,"range":{"start_line":186,"start_character":60,"end_line":186,"end_character":70},"updated":"2021-01-05 10:33:09.000000000","message":"nit: these should be collected in some common place like neutron-lib constants","commit_id":"3df21ee4727d9e9c43fa11670637c5f697b2c0c3"}],"neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8f2b97cc152f3564837453afb0c09b6b55bf2e3c","unresolved":true,"context_lines":[{"line_number":703,"context_line":"        ret \u003d bridge_lib.FdbInterface.append(constants.FLOODING_ENTRY[0],"},{"line_number":704,"context_line":"                                             test_iface, \u00271.1.1.1\u0027)"},{"line_number":705,"context_line":"        self.delete_interface(test_iface)"},{"line_number":706,"context_line":"        return not ret"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    @staticmethod"},{"line_number":709,"context_line":"    def vxlan_mcast_supported():"}],"source_content_type":"text/x-python","patch_set":15,"id":"6a5656a2_b1604854","line":706,"updated":"2020-12-22 10:19:25.000000000","message":"that is also not really done in \"python way\" and is a bit hard to understand at first time if someone don\u0027t know exactly bridge_lib and this strange decorator :)","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5487b5edc34d0a218a71c256b4889c5d028fbb06","unresolved":true,"context_lines":[{"line_number":703,"context_line":"        ret \u003d bridge_lib.FdbInterface.append(constants.FLOODING_ENTRY[0],"},{"line_number":704,"context_line":"                                             test_iface, \u00271.1.1.1\u0027)"},{"line_number":705,"context_line":"        self.delete_interface(test_iface)"},{"line_number":706,"context_line":"        return not ret"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    @staticmethod"},{"line_number":709,"context_line":"    def vxlan_mcast_supported():"}],"source_content_type":"text/x-python","patch_set":15,"id":"7cebdba1_2d02fe92","line":706,"in_reply_to":"6a5656a2_b1604854","updated":"2020-12-22 16:46:03.000000000","message":"I\u0027ll push a patch, before refactoring this patch, to change the output of this decorator.","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"305f0c91f36a459127ad744b947bf09a30276e45","unresolved":true,"context_lines":[{"line_number":703,"context_line":"        ret \u003d bridge_lib.FdbInterface.append(constants.FLOODING_ENTRY[0],"},{"line_number":704,"context_line":"                                             test_iface, \u00271.1.1.1\u0027)"},{"line_number":705,"context_line":"        self.delete_interface(test_iface)"},{"line_number":706,"context_line":"        return not ret"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    @staticmethod"},{"line_number":709,"context_line":"    def vxlan_mcast_supported():"}],"source_content_type":"text/x-python","patch_set":15,"id":"e6629fd4_0d5c2610","line":706,"in_reply_to":"7cebdba1_2d02fe92","updated":"2021-01-04 11:52:37.000000000","message":"Thx","commit_id":"4dea57d4949ce483a2870ce33d2c7954ae48cf83"}],"neutron/privileged/agent/linux/ip_lib.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"52837909e157c9a70c3c72b55ca459d1be78421a","unresolved":false,"context_lines":[{"line_number":797,"context_line":"    return _command_bridge_fdb(\u0027add\u0027, mac, device, ip_dst\u003dip_dst,"},{"line_number":798,"context_line":"                               namespace\u003dnamespace, **kwargs)"},{"line_number":799,"context_line":""},{"line_number":800,"context_line":"@privileged.default.entrypoint"},{"line_number":801,"context_line":"def append_bridge_fdb(mac, device, ip_dst\u003dNone, namespace\u003dNone, **kwargs):"},{"line_number":802,"context_line":"    \"\"\"Add a FDB entry\"\"\""},{"line_number":803,"context_line":"    return _command_bridge_fdb(\u0027append\u0027, mac, device, ip_dst\u003dip_dst,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fffc6b78_4fcb971d","line":800,"updated":"2020-11-20 01:34:46.000000000","message":"pep8: E302 expected 2 blank lines, found 1","commit_id":"f1cadc05d47e7f04d0f6b6ca551783b6f58e8441"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"52837909e157c9a70c3c72b55ca459d1be78421a","unresolved":false,"context_lines":[{"line_number":803,"context_line":"    return _command_bridge_fdb(\u0027append\u0027, mac, device, ip_dst\u003dip_dst,"},{"line_number":804,"context_line":"                               namespace\u003dnamespace, **kwargs)"},{"line_number":805,"context_line":""},{"line_number":806,"context_line":"@privileged.default.entrypoint"},{"line_number":807,"context_line":"def replace_bridge_fdb(mac, device, ip_dst\u003dNone, namespace\u003dNone, **kwargs):"},{"line_number":808,"context_line":"    \"\"\"Add a FDB entry\"\"\""},{"line_number":809,"context_line":"    return _command_bridge_fdb(\u0027replace\u0027, mac, device, ip_dst\u003dip_dst,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fffc6b78_afd043cb","line":806,"updated":"2020-11-20 01:34:46.000000000","message":"pep8: E302 expected 2 blank lines, found 1","commit_id":"f1cadc05d47e7f04d0f6b6ca551783b6f58e8441"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"52837909e157c9a70c3c72b55ca459d1be78421a","unresolved":false,"context_lines":[{"line_number":809,"context_line":"    return _command_bridge_fdb(\u0027replace\u0027, mac, device, ip_dst\u003dip_dst,"},{"line_number":810,"context_line":"                               namespace\u003dnamespace, **kwargs)"},{"line_number":811,"context_line":""},{"line_number":812,"context_line":"@privileged.default.entrypoint"},{"line_number":813,"context_line":"def delete_bridge_fdb(mac, device, ip_dst\u003dNone, namespace\u003dNone, **kwargs):"},{"line_number":814,"context_line":"    \"\"\"Add a FDB entry\"\"\""},{"line_number":815,"context_line":"    return _command_bridge_fdb(\u0027del\u0027, mac, device, ip_dst\u003dip_dst,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fffc6b78_8fd57fbc","line":812,"updated":"2020-11-20 01:34:46.000000000","message":"pep8: E302 expected 2 blank lines, found 1","commit_id":"f1cadc05d47e7f04d0f6b6ca551783b6f58e8441"}],"neutron/tests/functional/agent/linux/test_bridge_lib.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"52837909e157c9a70c3c72b55ca459d1be78421a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class BridgeLibTestCase(base.BaseSudoTestCase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(BridgeLibTestCase, self).setUp()"},{"line_number":37,"context_line":"        self.bridge, self.port_fixture \u003d self.create_bridge_port_fixture()"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fffc6b78_cfd667c4","line":35,"updated":"2020-11-20 01:34:46.000000000","message":"pep8: E303 too many blank lines (2)","commit_id":"f1cadc05d47e7f04d0f6b6ca551783b6f58e8441"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"52837909e157c9a70c3c72b55ca459d1be78421a","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                dev\u003ddevice, namespace\u003dself.namespace).items():"},{"line_number":200,"context_line":"            self.assertEqual(device, _device)"},{"line_number":201,"context_line":"            for _ in (fdb for fdb in fdbs if fdb[\u0027mac\u0027] \u003d\u003d mac_address and"},{"line_number":202,"context_line":"                                             fdb[\u0027dst_ip\u0027] \u003d\u003d ip_address):"},{"line_number":203,"context_line":"                return"},{"line_number":204,"context_line":"            self.fail(msg)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fffc6b78_2fe453ac","line":202,"updated":"2020-11-20 01:34:46.000000000","message":"pep8: E127 continuation line over-indented for visual indent","commit_id":"f1cadc05d47e7f04d0f6b6ca551783b6f58e8441"}]}
