)]}'
{"ovsdbapp/schema/ovn_northbound/commands.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ac5711d3a9177abc05cc0f9413004188807981e","unresolved":true,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @staticmethod"},{"line_number":411,"context_line":"    def _delete_qos(qos_rule, ls):"},{"line_number":412,"context_line":"        for row in list(row for row in ls.qos_rules if"},{"line_number":413,"context_line":"                        row.uuid \u003d\u003d qos_rule.uuid):"},{"line_number":414,"context_line":"            ls.delvalue(\u0027qos_rules\u0027, row)"},{"line_number":415,"context_line":"            row.delete()"}],"source_content_type":"text/x-python","patch_set":2,"id":"80a9fe1c_a7b18516","line":412,"range":{"start_line":412,"start_character":19,"end_line":412,"end_character":23},"updated":"2025-01-10 14:03:28.000000000","message":"I think this is not needed","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"40e51218e66ed6451108d6c16d2466c716c5c8dd","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @staticmethod"},{"line_number":411,"context_line":"    def _delete_qos(qos_rule, ls):"},{"line_number":412,"context_line":"        for row in list(row for row in ls.qos_rules if"},{"line_number":413,"context_line":"                        row.uuid \u003d\u003d qos_rule.uuid):"},{"line_number":414,"context_line":"            ls.delvalue(\u0027qos_rules\u0027, row)"},{"line_number":415,"context_line":"            row.delete()"}],"source_content_type":"text/x-python","patch_set":2,"id":"e5a5b7f2_618a4e20","line":412,"range":{"start_line":412,"start_character":19,"end_line":412,"end_character":23},"in_reply_to":"80a9fe1c_a7b18516","updated":"2025-01-10 15:25:54.000000000","message":"If I remove the list() creation and the inside the loop I remove elements, the generator will fail. If I first create a list, I won\u0027t have this problem.","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"491d97303e9c10347aabeea54a27391682ddbb38","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @staticmethod"},{"line_number":411,"context_line":"    def _delete_qos(qos_rule, ls):"},{"line_number":412,"context_line":"        for row in list(row for row in ls.qos_rules if"},{"line_number":413,"context_line":"                        row.uuid \u003d\u003d qos_rule.uuid):"},{"line_number":414,"context_line":"            ls.delvalue(\u0027qos_rules\u0027, row)"},{"line_number":415,"context_line":"            row.delete()"}],"source_content_type":"text/x-python","patch_set":2,"id":"397f871b_c6189bda","line":412,"range":{"start_line":412,"start_character":19,"end_line":412,"end_character":23},"in_reply_to":"e5a5b7f2_618a4e20","updated":"2025-01-10 15:31:20.000000000","message":"Can you use the list comprehension then instead of making a generator and then doing a list out of it? Like\n```\nfor row in [row for row in ls.qos_rules if row.uuid \u003d\u003d qos_rule.uuid]:\n```","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ac5711d3a9177abc05cc0f9413004188807981e","unresolved":true,"context_lines":[{"line_number":456,"context_line":"            # be present, unlike ``QoSAddCommand`` that explicitly needs"},{"line_number":457,"context_line":"            # ``may_exist\u003dFalse``."},{"line_number":458,"context_line":"            if self.to_delete:"},{"line_number":459,"context_line":"                return self._delete_qos(qos_rule, ls)"},{"line_number":460,"context_line":"            else:"},{"line_number":461,"context_line":"                return self._update_qos(qos_rule)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"d537b074_b8879f41","line":459,"updated":"2025-01-10 14:03:28.000000000","message":"I find it a little bit odd deleting an entry from a DB if some attributes are set to None. Is there more context to this - in which case this behavior is used?","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0457e12f20846fde7d8af90aef872c7a37eedc20","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            # be present, unlike ``QoSAddCommand`` that explicitly needs"},{"line_number":457,"context_line":"            # ``may_exist\u003dFalse``."},{"line_number":458,"context_line":"            if self.to_delete:"},{"line_number":459,"context_line":"                return self._delete_qos(qos_rule, ls)"},{"line_number":460,"context_line":"            else:"},{"line_number":461,"context_line":"                return self._update_qos(qos_rule)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"8abfb3f8_6d8e63d4","line":459,"in_reply_to":"22946271_05684a5c","updated":"2025-01-10 15:33:36.000000000","message":"In other words, how is QoS rule different to any other \"resource\"? Let\u0027s say we have \"resources\" in the database and we perform CRUD operations on them. Create and Update operations validate inputs and fail if they do not meet criteria. Delete deletes the resource. Why would QoS rule be deleted with update and not use Delete instead?","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"06971945ad537eb876d29a15c20f90136f898408","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            # be present, unlike ``QoSAddCommand`` that explicitly needs"},{"line_number":457,"context_line":"            # ``may_exist\u003dFalse``."},{"line_number":458,"context_line":"            if self.to_delete:"},{"line_number":459,"context_line":"                return self._delete_qos(qos_rule, ls)"},{"line_number":460,"context_line":"            else:"},{"line_number":461,"context_line":"                return self._update_qos(qos_rule)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fe263deb_1deb3bd5","line":459,"in_reply_to":"8abfb3f8_6d8e63d4","updated":"2025-01-13 09:37:40.000000000","message":"We still have the delete method and it can be used. The aim of this implementation is to reduce the complexity of the caller code. For example in [1], we can just call QoS update and this call will create/update/delete the QoS register if needed.\n\nIn any case, if we want to keep the explicitness of this library and request to call a delete method to delete the QoS registers, I\u0027ll implement it inside the Neutron code (if accepted).\n\n[1]https://github.com/openstack/neutron/blob/2ef2311593effb1446262931aac0f880ee6b1763/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/qos.py#L314-L320","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"491d97303e9c10347aabeea54a27391682ddbb38","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            # be present, unlike ``QoSAddCommand`` that explicitly needs"},{"line_number":457,"context_line":"            # ``may_exist\u003dFalse``."},{"line_number":458,"context_line":"            if self.to_delete:"},{"line_number":459,"context_line":"                return self._delete_qos(qos_rule, ls)"},{"line_number":460,"context_line":"            else:"},{"line_number":461,"context_line":"                return self._update_qos(qos_rule)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"22946271_05684a5c","line":459,"in_reply_to":"b90675f1_2c95323a","updated":"2025-01-10 15:31:20.000000000","message":"I understand but from the caller perspective setting the values to 0 is an invalid input and should fail as we do during the QoS creation. If we want to delete the QoS rule, we should explicitly call a delete() method and not the update() imho. What do you think about that?","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"40e51218e66ed6451108d6c16d2466c716c5c8dd","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            # be present, unlike ``QoSAddCommand`` that explicitly needs"},{"line_number":457,"context_line":"            # ``may_exist\u003dFalse``."},{"line_number":458,"context_line":"            if self.to_delete:"},{"line_number":459,"context_line":"                return self._delete_qos(qos_rule, ls)"},{"line_number":460,"context_line":"            else:"},{"line_number":461,"context_line":"                return self._update_qos(qos_rule)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"b90675f1_2c95323a","line":459,"in_reply_to":"d537b074_b8879f41","updated":"2025-01-10 15:25:54.000000000","message":"QoS registers [1] can have DSCP and max-bw values. If we undefine (delete) the DSCP mark and the max-bw, this QoS register is no longer needed as it won\u0027t have any action to be done. Actually it is not possible to define bandwidth:rate\u003d0 thus any key in bandwidth must be deleted.\n\nI\u0027ll add a documentation string in the class __init__ definition.\n\n[1]https://man7.org/linux/man-pages/man5/ovn-nb.5.html#QoS_TABLE","commit_id":"18af38be0c7c22c9c98a5050b11f6496ea1f4663"}]}
