)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ea27e8a98b927528841744a0dbf67ee0b297847c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a6a2ebe6_5d67b3a8","updated":"2023-04-24 10:20:11.000000000","message":"-1 only for visibility\n1) Why don\u0027t you add a task in the maintenance class? Why are you executing this before spawning the MaintenanceThread?\n2) Some testing (minimal but something) should be required.","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"},{"author":{"_account_id":34451,"name":"Fernando Royo","email":"froyo@redhat.com","username":"froyo"},"change_message_id":"d59cfffaa8b3dcc0e96617948f1c33e1377ae498","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2016689f_d6d8104d","updated":"2023-04-21 08:40:30.000000000","message":"LGTM!","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"a617aa24c6782262a018fe1a405f4c79c018d04f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"58aa121e_98bf917b","in_reply_to":"235766ee_5cfc063d","updated":"2023-05-02 18:21:37.000000000","message":"I think it would indeed be better as a maintenance task. I also added a functional test!\nAbout updating instead of recreating, I did this following Flavio\u0027s explanation on the code: https://opendev.org/openstack/neutron/src/commit/85b3a17d601b72748c1159e08e21c443ae293a26/neutron/services/logapi/drivers/ovn/driver.py#L123","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"9bec9b52780cc0dbee9473fd35dfd5547b6f44ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"235766ee_5cfc063d","in_reply_to":"a6a2ebe6_5d67b3a8","updated":"2023-04-24 10:21:09.000000000","message":"Ah, is that possible to change the rate instead of deleting and then adding the meters? That will require one tnx per register instead 2.","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"382c71792f41330e0e1219a96c828373d8f1f16a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"105199e4_bac1fc90","updated":"2023-05-03 14:29:51.000000000","message":"Just one comment. Looks good to me. Thanks","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"a617aa24c6782262a018fe1a405f4c79c018d04f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4e44986c_014252b9","updated":"2023-05-02 18:21:37.000000000","message":"Thanks Lucas and Rodolfo for the reviews!","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"9a1262400ff7eaa128d23dec8e1b7492f4fb4623","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5eba0109_5bff6543","updated":"2023-05-05 17:06:34.000000000","message":"Thanks for the reviews! I think I solved the problems addressed. Feel free to comment.","commit_id":"0e39b95f4667949fb2871dce1acf2452b6f12cd3"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cf23b993f4767c0a720fa181cff09a0cfeb625b4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2758026e_0aa9adce","updated":"2023-05-08 14:11:58.000000000","message":"It looks good, I wold just have the transaction argument for the new method to be optional in the OVNClient class.","commit_id":"890c6522880022b0c6a561c974e9ceb81380c77f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bd6fa88ab37da11beb528d79aa44f59a94bc85dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"5caf27f9_7c5a5d8c","updated":"2023-05-08 15:46:30.000000000","message":"Thank you! LGTM!","commit_id":"c3602ac19b62b77d3cb763746e124881d4c061e4"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cde455337f2ffda35ed1a3bb309715940e33ad11","unresolved":true,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            # Logging properties should be updated after neutron-server reloads"},{"line_number":379,"context_line":"            if self.log_driver:"},{"line_number":380,"context_line":"                self.log_driver.update_ovn_fair_meter()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"            self._maintenance_thread \u003d maintenance.MaintenanceThread()"},{"line_number":383,"context_line":"            self._maintenance_thread.add_periodics("}],"source_content_type":"text/x-python","patch_set":2,"id":"d37275db_5100e618","line":380,"updated":"2023-04-24 10:20:31.000000000","message":"Can we make this a maintenance task instead of having it in the post fork ?\n\nReason being that we already do similar things in the maintenance task e.g, when the IGMP configuration is enable/disable in the config file we need to change existing resources [0].\n\nAlso, the maintenance task runs on it\u0027s own thread so it does not slow the startup speed time.\n\n[0] https://github.com/openstack/neutron/blob/f93c9be1c1058e210b551d7200882aa983c2332a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py#L522","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"be72377b4939b76170d3c4970874224aec027f69","unresolved":true,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            # Logging properties should be updated after neutron-server reloads"},{"line_number":379,"context_line":"            if self.log_driver:"},{"line_number":380,"context_line":"                self.log_driver.update_ovn_fair_meter()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"            self._maintenance_thread \u003d maintenance.MaintenanceThread()"},{"line_number":383,"context_line":"            self._maintenance_thread.add_periodics("}],"source_content_type":"text/x-python","patch_set":2,"id":"39ebb47e_ee0f2b65","line":380,"in_reply_to":"5b9580da_d98306cd","updated":"2023-04-24 10:38:16.000000000","message":"lol indeed. I just saw the timestamp of the comments and both are on the same minute haha","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ee5dbe8273c49f7420a02469f4ff8246db8e2a05","unresolved":true,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            # Logging properties should be updated after neutron-server reloads"},{"line_number":379,"context_line":"            if self.log_driver:"},{"line_number":380,"context_line":"                self.log_driver.update_ovn_fair_meter()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"            self._maintenance_thread \u003d maintenance.MaintenanceThread()"},{"line_number":383,"context_line":"            self._maintenance_thread.add_periodics("}],"source_content_type":"text/x-python","patch_set":2,"id":"5b9580da_d98306cd","line":380,"in_reply_to":"d37275db_5100e618","updated":"2023-04-24 10:22:33.000000000","message":"I think we had the same idea at the same time.","commit_id":"cdd7804b69b48e7b45c3f73f4b9fb671664af8cc"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aa8aa0e5198e277b697e4f750ef0f57a1f61f29c","unresolved":true,"context_lines":[{"line_number":1038,"context_line":"                    \"Meter\", (\"name\", \"\u003d\", meter_name)).execute("},{"line_number":1039,"context_line":"                        check_error\u003dTrue)"},{"line_number":1040,"context_line":"                if not meter:"},{"line_number":1041,"context_line":"                    raise periodics.NeverAgain()"},{"line_number":1042,"context_line":"                meter \u003d meter[0]"},{"line_number":1043,"context_line":"                try:"},{"line_number":1044,"context_line":"                    meter_band \u003d self._nb_idl.lookup(\"Meter_Band\","}],"source_content_type":"text/x-python","patch_set":3,"id":"c628bb25_cfbc4a03","line":1041,"range":{"start_line":1041,"start_character":20,"end_line":1041,"end_character":48},"updated":"2023-05-03 14:33:53.000000000","message":"Please, don\u0027t raise an exception from inside a transaction.","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aa8aa0e5198e277b697e4f750ef0f57a1f61f29c","unresolved":true,"context_lines":[{"line_number":1049,"context_line":"                            meter_band.burst_size \u003d\u003d"},{"line_number":1050,"context_line":"                            cfg.CONF.network_log.burst_limit)):"},{"line_number":1051,"context_line":"                        # Meter (and its meter-band) unchanged: noop."},{"line_number":1052,"context_line":"                        raise periodics.NeverAgain()"},{"line_number":1053,"context_line":"                except idlutils.RowNotFound:"},{"line_number":1054,"context_line":"                    pass"},{"line_number":1055,"context_line":"                LOG.info(\"Updating outdated log fair meter %s\", meter_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"b967334b_76c627cc","line":1052,"range":{"start_line":1052,"start_character":24,"end_line":1052,"end_character":52},"updated":"2023-05-03 14:33:53.000000000","message":"Same here.","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"43297ae0e52d340911f52aa398241878f83d7c81","unresolved":true,"context_lines":[{"line_number":1062,"context_line":"                    burst_size\u003dcfg.CONF.network_log.burst_limit,"},{"line_number":1063,"context_line":"                    may_exist\u003dFalse,"},{"line_number":1064,"context_line":"                    external_ids\u003d{ovn_const.OVN_DEVICE_OWNER_EXT_ID_KEY:"},{"line_number":1065,"context_line":"                                  log_const.LOGGING_PLUGIN}))"},{"line_number":1066,"context_line":"        raise periodics.NeverAgain()"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"f19dc0d6_c44be7c0","line":1065,"updated":"2023-05-03 14:24:07.000000000","message":"Quick question, this method is very similar to the _create_ovn_fair_meter() method from the OVNDriver class for the log driver. Is it something that we could reuse here ?\n\nBecause now, we do have these two places where the meters are created but, if in the future we update one of them we would need to make sure that we update the other too to keep it the same, it can be error-prone.\n\nThat\u0027s why if we could have a single method used on both it would be ideal. Similar to how the maintenance task fix problems trying to invoke the methods from OVN client (e.g self._ovn_client.create_network, self._ovn_client.udpate_network, etc... when fixing a network).\n\nJust a suggestion.\n\n[0] https://github.com/openstack/neutron/blob/afbc31ea31ed54098a41ab4cd9952188df0b5580/neutron/services/logapi/drivers/ovn/driver.py#L96-L138","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"9a1262400ff7eaa128d23dec8e1b7492f4fb4623","unresolved":false,"context_lines":[{"line_number":1062,"context_line":"                    burst_size\u003dcfg.CONF.network_log.burst_limit,"},{"line_number":1063,"context_line":"                    may_exist\u003dFalse,"},{"line_number":1064,"context_line":"                    external_ids\u003d{ovn_const.OVN_DEVICE_OWNER_EXT_ID_KEY:"},{"line_number":1065,"context_line":"                                  log_const.LOGGING_PLUGIN}))"},{"line_number":1066,"context_line":"        raise periodics.NeverAgain()"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"307785cb_06e142c4","line":1065,"in_reply_to":"8e8ee6e6_c6c70907","updated":"2023-05-05 17:06:34.000000000","message":"Done","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aa8aa0e5198e277b697e4f750ef0f57a1f61f29c","unresolved":true,"context_lines":[{"line_number":1062,"context_line":"                    burst_size\u003dcfg.CONF.network_log.burst_limit,"},{"line_number":1063,"context_line":"                    may_exist\u003dFalse,"},{"line_number":1064,"context_line":"                    external_ids\u003d{ovn_const.OVN_DEVICE_OWNER_EXT_ID_KEY:"},{"line_number":1065,"context_line":"                                  log_const.LOGGING_PLUGIN}))"},{"line_number":1066,"context_line":"        raise periodics.NeverAgain()"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"8e8ee6e6_c6c70907","line":1065,"in_reply_to":"f19dc0d6_c44be7c0","updated":"2023-05-03 14:33:53.000000000","message":"+1","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cf23b993f4767c0a720fa181cff09a0cfeb625b4","unresolved":true,"context_lines":[{"line_number":1031,"context_line":"        if log_driver.OVNDriver.network_logging_supported(self._nb_idl):"},{"line_number":1032,"context_line":"            meter_name \u003d ("},{"line_number":1033,"context_line":"                cfg.CONF.network_log.local_output_log_base or \"acl_log_meter\")"},{"line_number":1034,"context_line":"            with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":1035,"context_line":"                self._ovn_client.create_ovn_fair_meter(txn, meter_name,"},{"line_number":1036,"context_line":"                                                       from_reload\u003dFalse)"},{"line_number":1037,"context_line":"        raise periodics.NeverAgain()"}],"source_content_type":"text/x-python","patch_set":6,"id":"fb7f7088_ae5d884c","line":1034,"range":{"start_line":1034,"start_character":12,"end_line":1034,"end_character":67},"updated":"2023-05-08 14:11:58.000000000","message":"See comment in ovn_client.py, I think the create_ovn_fair_meter() can have make the transaction argument optional. The OVNClient already have a helper method (called _transaction()) to handle it.","commit_id":"890c6522880022b0c6a561c974e9ceb81380c77f"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"a6c8cdf44f5e11c5a60bd9e58513828c18f79ec5","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"        if log_driver.OVNDriver.network_logging_supported(self._nb_idl):"},{"line_number":1032,"context_line":"            meter_name \u003d ("},{"line_number":1033,"context_line":"                cfg.CONF.network_log.local_output_log_base or \"acl_log_meter\")"},{"line_number":1034,"context_line":"            with self._nb_idl.transaction(check_error\u003dTrue) as txn:"},{"line_number":1035,"context_line":"                self._ovn_client.create_ovn_fair_meter(txn, meter_name,"},{"line_number":1036,"context_line":"                                                       from_reload\u003dFalse)"},{"line_number":1037,"context_line":"        raise periodics.NeverAgain()"}],"source_content_type":"text/x-python","patch_set":6,"id":"f51bc684_bee721c6","line":1034,"range":{"start_line":1034,"start_character":12,"end_line":1034,"end_character":67},"in_reply_to":"fb7f7088_ae5d884c","updated":"2023-05-08 15:50:54.000000000","message":"Done","commit_id":"890c6522880022b0c6a561c974e9ceb81380c77f"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"96284712558e4ed60b37a75971a0ced32057f7db","unresolved":true,"context_lines":[{"line_number":2665,"context_line":"        meter \u003d self._nb_idl.db_find_rows("},{"line_number":2666,"context_line":"            \"Meter\", (\"name\", \"\u003d\", meter_name)).execute(check_error\u003dTrue)"},{"line_number":2667,"context_line":"        if from_reload and not meter:"},{"line_number":2668,"context_line":"            return"},{"line_number":2669,"context_line":"        if meter:"},{"line_number":2670,"context_line":"            meter \u003d meter[0]"},{"line_number":2671,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"08d31035_1cd44de3","line":2668,"updated":"2023-05-08 08:11:04.000000000","message":"I\u0027m fairly new to this code so I may not understand it well but why if we run it from maintenance task (from_reload\u003d\u003dTrue) and meter is not found we don\u0027t create it?","commit_id":"0e39b95f4667949fb2871dce1acf2452b6f12cd3"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"b76bc6cbd277b9d0abd1e4d71cc509f089ad0d90","unresolved":true,"context_lines":[{"line_number":2665,"context_line":"        meter \u003d self._nb_idl.db_find_rows("},{"line_number":2666,"context_line":"            \"Meter\", (\"name\", \"\u003d\", meter_name)).execute(check_error\u003dTrue)"},{"line_number":2667,"context_line":"        if from_reload and not meter:"},{"line_number":2668,"context_line":"            return"},{"line_number":2669,"context_line":"        if meter:"},{"line_number":2670,"context_line":"            meter \u003d meter[0]"},{"line_number":2671,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"66a09856_13d30f0f","line":2668,"in_reply_to":"08d31035_1cd44de3","updated":"2023-05-08 08:22:15.000000000","message":"The meter is created when a log object is created, it is not there by default. So I think we don\u0027t want to create the meter if it wasn\u0027t already created by a log object. The maintenance task is meant to modify the meter if burst and rate limit values were modified in the configuration.","commit_id":"0e39b95f4667949fb2871dce1acf2452b6f12cd3"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"afc239876d2cbc5aedf3119f59bfc3a417d1192a","unresolved":true,"context_lines":[{"line_number":2665,"context_line":"        meter \u003d self._nb_idl.db_find_rows("},{"line_number":2666,"context_line":"            \"Meter\", (\"name\", \"\u003d\", meter_name)).execute(check_error\u003dTrue)"},{"line_number":2667,"context_line":"        if from_reload and not meter:"},{"line_number":2668,"context_line":"            return"},{"line_number":2669,"context_line":"        if meter:"},{"line_number":2670,"context_line":"            meter \u003d meter[0]"},{"line_number":2671,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ad30a50f_c63f08fe","line":2668,"in_reply_to":"66a09856_13d30f0f","updated":"2023-05-08 08:33:47.000000000","message":"ok, got it. Thx.\nMaybe we should have small comment about it in code to make it clear for future developers?","commit_id":"0e39b95f4667949fb2871dce1acf2452b6f12cd3"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cf23b993f4767c0a720fa181cff09a0cfeb625b4","unresolved":false,"context_lines":[{"line_number":2665,"context_line":"        meter \u003d self._nb_idl.db_find_rows("},{"line_number":2666,"context_line":"            \"Meter\", (\"name\", \"\u003d\", meter_name)).execute(check_error\u003dTrue)"},{"line_number":2667,"context_line":"        if from_reload and not meter:"},{"line_number":2668,"context_line":"            return"},{"line_number":2669,"context_line":"        if meter:"},{"line_number":2670,"context_line":"            meter \u003d meter[0]"},{"line_number":2671,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"6595dc1d_a380380e","line":2668,"in_reply_to":"ad30a50f_c63f08fe","updated":"2023-05-08 14:11:58.000000000","message":"Done","commit_id":"0e39b95f4667949fb2871dce1acf2452b6f12cd3"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cf23b993f4767c0a720fa181cff09a0cfeb625b4","unresolved":true,"context_lines":[{"line_number":2657,"context_line":"        of the meter. Current implementation needs only one \u0027fair\u0027 meter row"},{"line_number":2658,"context_line":"        which is then referred by multiple ACL rows."},{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"        :param ovn_txn: ovn northbound idl transaction."},{"line_number":2661,"context_line":"        :param meter_name: ovn northbound meter name."},{"line_number":2662,"context_line":"        :param from_reload: whether we update the meter values or create them."},{"line_number":2663,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"2a725051_bca8ecb0","line":2660,"updated":"2023-05-08 14:11:58.000000000","message":"Can you make the transaction object optional to be aligned with other methods in this class. And IMHO a better interface for OVN Client.\n\nThen it could just be called as \"ovn_client.create_ovn_fair_meter(...)\" without having to create a context manager with a OVN transaction before invoking the method. Or, if there\u0027s one already it can be called as ovn_client.create_ovn_fair_meter(..., txn\u003d\u003ctransaction obj\u003e)\n\nWe have a wrapper called _transaction() in this class to help with this, see for example: \n\nhttps://github.com/openstack/neutron/blob/0de3059d4627b95c79ac6eb0fb9e8a1cf13b2039/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L1314-L1325\n\nhttps://github.com/openstack/neutron/blob/0de3059d4627b95c79ac6eb0fb9e8a1cf13b2039/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L1674-L1686\n\nhttps://github.com/openstack/neutron/blob/0de3059d4627b95c79ac6eb0fb9e8a1cf13b2039/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L1791-L1795\n\n(there\u0027s many more)","commit_id":"890c6522880022b0c6a561c974e9ceb81380c77f"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"a6c8cdf44f5e11c5a60bd9e58513828c18f79ec5","unresolved":false,"context_lines":[{"line_number":2657,"context_line":"        of the meter. Current implementation needs only one \u0027fair\u0027 meter row"},{"line_number":2658,"context_line":"        which is then referred by multiple ACL rows."},{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"        :param ovn_txn: ovn northbound idl transaction."},{"line_number":2661,"context_line":"        :param meter_name: ovn northbound meter name."},{"line_number":2662,"context_line":"        :param from_reload: whether we update the meter values or create them."},{"line_number":2663,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"225db017_ee047382","line":2660,"in_reply_to":"2a725051_bca8ecb0","updated":"2023-05-08 15:50:54.000000000","message":"Done","commit_id":"890c6522880022b0c6a561c974e9ceb81380c77f"}],"neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_maintenance.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aa8aa0e5198e277b697e4f750ef0f57a1f61f29c","unresolved":true,"context_lines":[{"line_number":31,"context_line":"from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import maintenance"},{"line_number":32,"context_line":"from neutron.tests.functional import base"},{"line_number":33,"context_line":"from neutron.tests.functional.services.logapi.drivers.ovn.test_driver \\"},{"line_number":34,"context_line":"    import LogApiTestCaseBase"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from neutron.tests.unit.api import test_extensions"},{"line_number":37,"context_line":"from neutron.tests.unit.extensions import test_extraroute"}],"source_content_type":"text/x-python","patch_set":3,"id":"57c025b3_11719676","line":34,"range":{"start_line":34,"start_character":11,"end_line":34,"end_character":29},"updated":"2023-05-03 14:33:53.000000000","message":"Please, don\u0027t import a class, import the whole module.","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"9a1262400ff7eaa128d23dec8e1b7492f4fb4623","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import maintenance"},{"line_number":32,"context_line":"from neutron.tests.functional import base"},{"line_number":33,"context_line":"from neutron.tests.functional.services.logapi.drivers.ovn.test_driver \\"},{"line_number":34,"context_line":"    import LogApiTestCaseBase"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from neutron.tests.unit.api import test_extensions"},{"line_number":37,"context_line":"from neutron.tests.unit.extensions import test_extraroute"}],"source_content_type":"text/x-python","patch_set":3,"id":"338fbd52_f324fba9","line":34,"range":{"start_line":34,"start_character":11,"end_line":34,"end_character":29},"in_reply_to":"57c025b3_11719676","updated":"2023-05-05 17:06:34.000000000","message":"Done","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"382c71792f41330e0e1219a96c828373d8f1f16a","unresolved":true,"context_lines":[{"line_number":962,"context_line":"        # Check a meter and fair meter exist"},{"line_number":963,"context_line":"        self.assertTrue(self.nb_api._tables[\u0027Meter\u0027].rows)"},{"line_number":964,"context_line":"        self.assertTrue(self.nb_api._tables[\u0027Meter_Band\u0027].rows)"},{"line_number":965,"context_line":"        self.assertEqual(25,"},{"line_number":966,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].burst_size)"},{"line_number":967,"context_line":"        self.assertEqual(100,"},{"line_number":968,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].rate)"},{"line_number":969,"context_line":"        # Update burst and rate limit values on the configuration"},{"line_number":970,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027burst_limit\u0027, 50,"}],"source_content_type":"text/x-python","patch_set":3,"id":"21eece11_c4f32e1e","line":967,"range":{"start_line":965,"start_character":0,"end_line":967,"end_character":29},"updated":"2023-05-03 14:29:51.000000000","message":"25 and 100 are magic numbers to me. Where are they coming from?","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"aa8aa0e5198e277b697e4f750ef0f57a1f61f29c","unresolved":true,"context_lines":[{"line_number":962,"context_line":"        # Check a meter and fair meter exist"},{"line_number":963,"context_line":"        self.assertTrue(self.nb_api._tables[\u0027Meter\u0027].rows)"},{"line_number":964,"context_line":"        self.assertTrue(self.nb_api._tables[\u0027Meter_Band\u0027].rows)"},{"line_number":965,"context_line":"        self.assertEqual(25,"},{"line_number":966,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].burst_size)"},{"line_number":967,"context_line":"        self.assertEqual(100,"},{"line_number":968,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].rate)"},{"line_number":969,"context_line":"        # Update burst and rate limit values on the configuration"},{"line_number":970,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027burst_limit\u0027, 50,"}],"source_content_type":"text/x-python","patch_set":3,"id":"c53c924c_f97ee047","line":967,"range":{"start_line":965,"start_character":0,"end_line":967,"end_character":29},"in_reply_to":"21eece11_c4f32e1e","updated":"2023-05-03 14:33:53.000000000","message":"good question","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"9a1262400ff7eaa128d23dec8e1b7492f4fb4623","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        # Check a meter and fair meter exist"},{"line_number":963,"context_line":"        self.assertTrue(self.nb_api._tables[\u0027Meter\u0027].rows)"},{"line_number":964,"context_line":"        self.assertTrue(self.nb_api._tables[\u0027Meter_Band\u0027].rows)"},{"line_number":965,"context_line":"        self.assertEqual(25,"},{"line_number":966,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].burst_size)"},{"line_number":967,"context_line":"        self.assertEqual(100,"},{"line_number":968,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].rate)"},{"line_number":969,"context_line":"        # Update burst and rate limit values on the configuration"},{"line_number":970,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027burst_limit\u0027, 50,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7eff3549_9e6d3002","line":967,"range":{"start_line":965,"start_character":0,"end_line":967,"end_character":29},"in_reply_to":"c53c924c_f97ee047","updated":"2023-05-05 17:06:34.000000000","message":"Done","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"382c71792f41330e0e1219a96c828373d8f1f16a","unresolved":true,"context_lines":[{"line_number":967,"context_line":"        self.assertEqual(100,"},{"line_number":968,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].rate)"},{"line_number":969,"context_line":"        # Update burst and rate limit values on the configuration"},{"line_number":970,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027burst_limit\u0027, 50,"},{"line_number":971,"context_line":"                                         group\u003d\u0027network_log\u0027)"},{"line_number":972,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027rate_limit\u0027, 150,"},{"line_number":973,"context_line":"                                         group\u003d\u0027network_log\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"e9080b8e_32c31dc1","line":970,"range":{"start_line":970,"start_character":56,"end_line":970,"end_character":58},"updated":"2023-05-03 14:29:51.000000000","message":"nit: Only if you endup pushing new change. assign these numbers to variables such as expected_burst_limit\u003d50 to make the code more readable and DRY.","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"b76bc6cbd277b9d0abd1e4d71cc509f089ad0d90","unresolved":true,"context_lines":[{"line_number":967,"context_line":"        self.assertEqual(100,"},{"line_number":968,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].rate)"},{"line_number":969,"context_line":"        # Update burst and rate limit values on the configuration"},{"line_number":970,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027burst_limit\u0027, 50,"},{"line_number":971,"context_line":"                                         group\u003d\u0027network_log\u0027)"},{"line_number":972,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027rate_limit\u0027, 150,"},{"line_number":973,"context_line":"                                         group\u003d\u0027network_log\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3c455efe_f07e1659","line":970,"range":{"start_line":970,"start_character":56,"end_line":970,"end_character":58},"in_reply_to":"a27ebf16_e39e957a","updated":"2023-05-08 08:22:15.000000000","message":"oh I missed this one! Thanks for the heads up I will upload a new patchset soon with this fixed.","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"96284712558e4ed60b37a75971a0ced32057f7db","unresolved":true,"context_lines":[{"line_number":967,"context_line":"        self.assertEqual(100,"},{"line_number":968,"context_line":"            [*self.nb_api._tables[\u0027Meter_Band\u0027].rows.values()][0].rate)"},{"line_number":969,"context_line":"        # Update burst and rate limit values on the configuration"},{"line_number":970,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027burst_limit\u0027, 50,"},{"line_number":971,"context_line":"                                         group\u003d\u0027network_log\u0027)"},{"line_number":972,"context_line":"        ovn_config.cfg.CONF.set_override(\u0027rate_limit\u0027, 150,"},{"line_number":973,"context_line":"                                         group\u003d\u0027network_log\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"a27ebf16_e39e957a","line":970,"range":{"start_line":970,"start_character":56,"end_line":970,"end_character":58},"in_reply_to":"e9080b8e_32c31dc1","updated":"2023-05-08 08:11:04.000000000","message":"+1","commit_id":"dfeffa739f3adbdf0b6ab59f5d2a2195554a63d7"}]}
