)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a4db7582374947feb2b0e5fc70836321fcb9cfcb","unresolved":true,"context_lines":[{"line_number":10,"context_line":"enabled. Now this register can be updated if the arguments passed to"},{"line_number":11,"context_line":"the creation method differ."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch also adds the ability to retrieve a QoS rule by its"},{"line_number":14,"context_line":"\"external_ids\". QoS rules can be attached to ports and floating IPs;"},{"line_number":15,"context_line":"the \"external_ids\" keys could be:"},{"line_number":16,"context_line":"- \u0027neutron:fip_id\u0027"},{"line_number":17,"context_line":"- \u0027neutron:port_id\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Related-Bug: #1947334"},{"line_number":20,"context_line":"Change-Id: I21b6e8dd603847b9a757799f24b8a7dd63d76a36"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"583c35ec_d67a1b90","line":17,"range":{"start_line":13,"start_character":0,"end_line":17,"end_character":19},"updated":"2022-01-07 20:42:25.000000000","message":"Seems like this no longer applies, this patch is generic.","commit_id":"07f695fcb4b91c62fe0a4880cbacb2ef82db7ae9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"607c02e607774456096ecc97837014f625321185","unresolved":false,"context_lines":[{"line_number":10,"context_line":"enabled. Now this register can be updated if the arguments passed to"},{"line_number":11,"context_line":"the creation method differ."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch also adds the ability to retrieve a QoS rule by its"},{"line_number":14,"context_line":"\"external_ids\". QoS rules can be attached to ports and floating IPs;"},{"line_number":15,"context_line":"the \"external_ids\" keys could be:"},{"line_number":16,"context_line":"- \u0027neutron:fip_id\u0027"},{"line_number":17,"context_line":"- \u0027neutron:port_id\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Related-Bug: #1947334"},{"line_number":20,"context_line":"Change-Id: I21b6e8dd603847b9a757799f24b8a7dd63d76a36"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"0f097d55_57deb917","line":17,"range":{"start_line":13,"start_character":0,"end_line":17,"end_character":19},"in_reply_to":"583c35ec_d67a1b90","updated":"2022-01-10 10:22:11.000000000","message":"Right, we can retrieve the QoS by its external ID but I should not specify the keys.","commit_id":"07f695fcb4b91c62fe0a4880cbacb2ef82db7ae9"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"40ab69212ccc76f6929af7ffafccfe31ad4c085b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"bb94e69a_884fcc89","updated":"2022-01-05 15:41:24.000000000","message":"-1 just because of the oslo dependency","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"868a67dc8b840692d99b95542f962606b3dd60d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"244e2e8d_0f237bd9","updated":"2022-01-14 15:19:42.000000000","message":"Looks good to me. Thanks!","commit_id":"3ad4a1db97f92aa356f6c184d8fec6b447228b9d"}],"ovsdbapp/constants.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"1cd5717f07fee69092bb28490f978b7d2c9c2c8c","unresolved":true,"context_lines":[{"line_number":41,"context_line":"ROUTE_DISCARD \u003d \"discard\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# External IDs constants used by Neutron."},{"line_number":44,"context_line":"OVN_PORT_EXT_ID_KEY \u003d \u0027neutron:port_id\u0027"},{"line_number":45,"context_line":"OVN_FIP_EXT_ID_KEY \u003d \u0027neutron:fip_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"ac8be1a9_387994aa","line":44,"range":{"start_line":44,"start_character":23,"end_line":44,"end_character":30},"updated":"2022-01-05 21:11:02.000000000","message":"Can\u0027t have anything neutron-specific belongs in the ovsdbapp code.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"f1fd4d07f7aadbc0db7f74b9b8710ac11a1be730","unresolved":true,"context_lines":[{"line_number":41,"context_line":"ROUTE_DISCARD \u003d \"discard\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# External IDs constants used by Neutron."},{"line_number":44,"context_line":"OVN_PORT_EXT_ID_KEY \u003d \u0027neutron:port_id\u0027"},{"line_number":45,"context_line":"OVN_FIP_EXT_ID_KEY \u003d \u0027neutron:fip_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"d241a551_5f66fde6","line":44,"range":{"start_line":44,"start_character":23,"end_line":44,"end_character":30},"in_reply_to":"ac8be1a9_387994aa","updated":"2022-01-06 18:11:42.000000000","message":"s// belongs//","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d60dd08f7b4f1009ac38e2d1716da0a8b56fe03f","unresolved":true,"context_lines":[{"line_number":41,"context_line":"ROUTE_DISCARD \u003d \"discard\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# External IDs constants used by Neutron."},{"line_number":44,"context_line":"OVN_PORT_EXT_ID_KEY \u003d \u0027neutron:port_id\u0027"},{"line_number":45,"context_line":"OVN_FIP_EXT_ID_KEY \u003d \u0027neutron:fip_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"c24d7cc9_c3d57613","line":44,"range":{"start_line":44,"start_character":23,"end_line":44,"end_character":30},"in_reply_to":"d241a551_5f66fde6","updated":"2022-01-07 10:22:22.000000000","message":"Ok. So what I need to do is to pass the {key: value} dict in the \"external_ids\" argument, not only the value.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"}],"ovsdbapp/schema/ovn_northbound/commands.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"1cd5717f07fee69092bb28490f978b7d2c9c2c8c","unresolved":true,"context_lines":[{"line_number":327,"context_line":"        self.dscp \u003d dscp"},{"line_number":328,"context_line":"        self.may_exist \u003d may_exist"},{"line_number":329,"context_line":"        self.columns \u003d columns"},{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"2e30ba07_1cf8a77f","line":330,"updated":"2022-01-05 21:11:02.000000000","message":"nit:\n get(\u0027external_ids, {})","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"df4faab0b0422af95c3e3343f001102a18c80a1a","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        self.dscp \u003d dscp"},{"line_number":328,"context_line":"        self.may_exist \u003d may_exist"},{"line_number":329,"context_line":"        self.columns \u003d columns"},{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5bda9320_546fed5d","line":330,"in_reply_to":"176e901a_8db42f28","updated":"2022-01-07 22:21:42.000000000","message":"I would argue that by this logic if we passed external_ids\u003d\"bob\" or any non-dict value we\u0027d still fail, but I\u0027ll accept it. :D","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d60dd08f7b4f1009ac38e2d1716da0a8b56fe03f","unresolved":true,"context_lines":[{"line_number":327,"context_line":"        self.dscp \u003d dscp"},{"line_number":328,"context_line":"        self.may_exist \u003d may_exist"},{"line_number":329,"context_line":"        self.columns \u003d columns"},{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"176e901a_8db42f28","line":330,"in_reply_to":"2e30ba07_1cf8a77f","updated":"2022-01-07 10:22:22.000000000","message":"I need \"external_ids\" to be a dictionary. If, by mistake, we pass external_ids\u003dNone, this method will fail.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ea0880f03fc730bee298d24a09e415502cd6949","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"},{"line_number":334,"context_line":"                                                   const.OVN_FIP_EXT_ID_KEY}:"},{"line_number":335,"context_line":"            try:"},{"line_number":336,"context_line":"                self.extids_key \u003d const.OVN_PORT_EXT_ID_KEY"}],"source_content_type":"text/x-python","patch_set":6,"id":"ddaa6c64_0296e8ae","line":333,"range":{"start_line":333,"start_character":11,"end_line":333,"end_character":28},"updated":"2022-01-05 15:40:14.000000000","message":"We don\u0027t need this, right?","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"1cd5717f07fee69092bb28490f978b7d2c9c2c8c","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"},{"line_number":334,"context_line":"                                                   const.OVN_FIP_EXT_ID_KEY}:"},{"line_number":335,"context_line":"            try:"},{"line_number":336,"context_line":"                self.extids_key \u003d const.OVN_PORT_EXT_ID_KEY"}],"source_content_type":"text/x-python","patch_set":6,"id":"f9907f70_03224141","line":333,"updated":"2022-01-05 21:11:02.000000000","message":"nit: If we are already doing the try/except KeyError below and know external_ids is a dict, do we really need these \"look before you leap\" checks? (we\u0027d have to do a try/except on the FIP_EXT_ID_KEY as well without it).\n\nBonus code golf that is probably slower than raw try/except:\n self.extids_key, self.extids_value \u003d next(((key, external_ids[key]) for key in (const.OVN_PORT_EXT_ID_KEY, const.OVN_FIP_EXT_ID_KEY) if key in external_ids), (None, None))","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3fb237147e5e0b2163ee6c9d6d8949f73247442c","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"},{"line_number":334,"context_line":"                                                   const.OVN_FIP_EXT_ID_KEY}:"},{"line_number":335,"context_line":"            try:"},{"line_number":336,"context_line":"                self.extids_key \u003d const.OVN_PORT_EXT_ID_KEY"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a76f5a6_bfbde5ae","line":333,"range":{"start_line":333,"start_character":11,"end_line":333,"end_character":28},"in_reply_to":"ddaa6c64_0296e8ae","updated":"2022-01-05 17:22:21.000000000","message":"Ah right, the default value will be {}","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d60dd08f7b4f1009ac38e2d1716da0a8b56fe03f","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        external_ids \u003d self.columns.get(\u0027external_ids\u0027) or {}"},{"line_number":331,"context_line":"        self.extids_key \u003d None"},{"line_number":332,"context_line":"        self.extids_value \u003d None"},{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"},{"line_number":334,"context_line":"                                                   const.OVN_FIP_EXT_ID_KEY}:"},{"line_number":335,"context_line":"            try:"},{"line_number":336,"context_line":"                self.extids_key \u003d const.OVN_PORT_EXT_ID_KEY"}],"source_content_type":"text/x-python","patch_set":6,"id":"727cc7aa_5127560e","line":333,"in_reply_to":"f9907f70_03224141","updated":"2022-01-07 10:22:22.000000000","message":"I\u0027ve refactored this section to remove the Neutron constants.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ea0880f03fc730bee298d24a09e415502cd6949","unresolved":true,"context_lines":[{"line_number":333,"context_line":"        if external_ids and external_ids.keys() \u0026 {const.OVN_PORT_EXT_ID_KEY,"},{"line_number":334,"context_line":"                                                   const.OVN_FIP_EXT_ID_KEY}:"},{"line_number":335,"context_line":"            try:"},{"line_number":336,"context_line":"                self.extids_key \u003d const.OVN_PORT_EXT_ID_KEY"},{"line_number":337,"context_line":"                self.extids_value \u003d external_ids[self.extids_key]"},{"line_number":338,"context_line":"            except KeyError:"},{"line_number":339,"context_line":"                self.extids_key \u003d const.OVN_FIP_EXT_ID_KEY"}],"source_content_type":"text/x-python","patch_set":6,"id":"8db99554_ce4645b6","line":336,"range":{"start_line":336,"start_character":16,"end_line":336,"end_character":59},"updated":"2022-01-05 15:40:14.000000000","message":"nit: This should be outside of the try block","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ea0880f03fc730bee298d24a09e415502cd6949","unresolved":true,"context_lines":[{"line_number":373,"context_line":"        self.result \u003d row.uuid"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _update_qos(self, qos_rule):"},{"line_number":376,"context_line":"        if self.direction !\u003d qos_rule.direction:"},{"line_number":377,"context_line":"            qos_rule.direction \u003d self.direction"},{"line_number":378,"context_line":"        if self.priority !\u003d qos_rule.priority:"},{"line_number":379,"context_line":"            qos_rule.priority \u003d self.priority"}],"source_content_type":"text/x-python","patch_set":6,"id":"3200f912_9967f8db","line":376,"range":{"start_line":376,"start_character":6,"end_line":376,"end_character":48},"updated":"2022-01-05 15:40:14.000000000","message":"Just wondering why do we check if the items are the same. Perhaps we can just always set the value regardless if it has changed?","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"df4faab0b0422af95c3e3343f001102a18c80a1a","unresolved":true,"context_lines":[{"line_number":373,"context_line":"        self.result \u003d row.uuid"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _update_qos(self, qos_rule):"},{"line_number":376,"context_line":"        if self.direction !\u003d qos_rule.direction:"},{"line_number":377,"context_line":"            qos_rule.direction \u003d self.direction"},{"line_number":378,"context_line":"        if self.priority !\u003d qos_rule.priority:"},{"line_number":379,"context_line":"            qos_rule.priority \u003d self.priority"}],"source_content_type":"text/x-python","patch_set":6,"id":"041da2c0_d73b5ef3","line":376,"range":{"start_line":376,"start_character":6,"end_line":376,"end_character":48},"in_reply_to":"0214e4eb_329d4568","updated":"2022-01-07 22:21:42.000000000","message":"The Transaction.commit() code for updates should only only send out a transaction if something really changes: https://github.com/openvswitch/ovs/blob/46d44cf3be0dbf4a44cebea3b279b3d16a326796/python/ovs/db/idl.py#L1777\n\nSo in this case we\u0027d locally have a transaction, we\u0027d call commit(), and then it would return with status UNCHANGED.\n\nIt\u0027s also a little new to update an a row locally and directly set it as the result. Usually result is set either in a readonly command, or we set the temporary uuid on an inserted row, and then *after we get the notification and reply from the server that it has been committed*, we use the row built from that notification.\n\nIn this case, we are actually setting the result to a row with changes that have not *necessarily* not been committed by the DB as the result. Though for the most part, code that used it would still be after we\u0027d gotten the reply from the server since we block on commit(), and if there was an error we\u0027d pass that along. So I think it *should* be safe to do.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"357e53a41591a90b23723e5f6d1bd58e52d6a9a8","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        self.result \u003d row.uuid"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _update_qos(self, qos_rule):"},{"line_number":376,"context_line":"        if self.direction !\u003d qos_rule.direction:"},{"line_number":377,"context_line":"            qos_rule.direction \u003d self.direction"},{"line_number":378,"context_line":"        if self.priority !\u003d qos_rule.priority:"},{"line_number":379,"context_line":"            qos_rule.priority \u003d self.priority"}],"source_content_type":"text/x-python","patch_set":6,"id":"09bf1b70_c45351a7","line":376,"range":{"start_line":376,"start_character":6,"end_line":376,"end_character":48},"in_reply_to":"041da2c0_d73b5ef3","updated":"2022-01-10 10:20:10.000000000","message":"Right, in any case, this operation should return the register UUID, not the register itself. I\u0027ll change it.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"f726398a806f008e9d424b7ac6b4fef4698e6a3f","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        self.result \u003d row.uuid"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _update_qos(self, qos_rule):"},{"line_number":376,"context_line":"        if self.direction !\u003d qos_rule.direction:"},{"line_number":377,"context_line":"            qos_rule.direction \u003d self.direction"},{"line_number":378,"context_line":"        if self.priority !\u003d qos_rule.priority:"},{"line_number":379,"context_line":"            qos_rule.priority \u003d self.priority"}],"source_content_type":"text/x-python","patch_set":6,"id":"17e7d292_8177c4d4","line":376,"range":{"start_line":376,"start_character":6,"end_line":376,"end_character":48},"in_reply_to":"09bf1b70_c45351a7","updated":"2022-01-10 14:01:50.000000000","message":"With current ovsdbapp AddCommand code, returning a RowView or Row works and doesn\u0027t call get_insert_uuid() which in this case should return None and lookup a Row and by the uuid and return a RowView. So I think either way should work","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3fb237147e5e0b2163ee6c9d6d8949f73247442c","unresolved":true,"context_lines":[{"line_number":373,"context_line":"        self.result \u003d row.uuid"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _update_qos(self, qos_rule):"},{"line_number":376,"context_line":"        if self.direction !\u003d qos_rule.direction:"},{"line_number":377,"context_line":"            qos_rule.direction \u003d self.direction"},{"line_number":378,"context_line":"        if self.priority !\u003d qos_rule.priority:"},{"line_number":379,"context_line":"            qos_rule.priority \u003d self.priority"}],"source_content_type":"text/x-python","patch_set":6,"id":"0214e4eb_329d4568","line":376,"range":{"start_line":376,"start_character":6,"end_line":376,"end_character":48},"in_reply_to":"3200f912_9967f8db","updated":"2022-01-05 17:22:21.000000000","message":"You are right. But I\u0027m not sure how the transaction will handle this cache element. If there is no change, will this library force a DB transaction to update the value? Maybe this is a question for Terry.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"84194ddbb6f816b1386f4e6f13c39e793d70c621","unresolved":true,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def qos_match(self, row):"},{"line_number":333,"context_line":"        if self.external_ids:"},{"line_number":334,"context_line":"            return self.external_ids.items() \u003c\u003d row.external_ids.items()"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":337,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":9,"id":"d8cb1e0a_a422ed90","line":334,"updated":"2022-01-13 17:17:16.000000000","message":"I\u0027m having trouble wrapping my head around this. If the external_ids in the Command are a subset of a particular row, we say we match? So if you create the Command with just one external id and that external id is in the row, then we return that it is a match--no matter what that external_id is?","commit_id":"dd015c8046932990139bdab125fe46239d0a0eac"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"76053b11c8d09c1d43c2cad5b60450b8326cda23","unresolved":true,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def qos_match(self, row):"},{"line_number":333,"context_line":"        if self.external_ids:"},{"line_number":334,"context_line":"            return self.external_ids.items() \u003c\u003d row.external_ids.items()"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":337,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":9,"id":"e19444fe_7d3d4c19","line":334,"in_reply_to":"d8cb1e0a_a422ed90","updated":"2022-01-13 17:30:30.000000000","message":"We can add as many external_ids as we need. In Neutron in particular we are using one single ID. Depending on if the qos is for a port or a FIP, we set port:port_id or fip:fip_id\n\nIf we then call again this method with the same external_id (or just the specific port:port_id or fip:fip_id), we\u0027ll try to match it. Same as in https://review.opendev.org/c/openstack/ovsdbapp/+/822138/9/ovsdbapp/schema/ovn_northbound/commands.py#453","commit_id":"dd015c8046932990139bdab125fe46239d0a0eac"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a0f6d71af6a0da03795d12077ac7fe462745515d","unresolved":true,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def qos_match(self, row):"},{"line_number":333,"context_line":"        if self.external_ids:"},{"line_number":334,"context_line":"            return self.external_ids.items() \u003c\u003d row.external_ids.items()"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":337,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":9,"id":"f1069fcd_ae9fd5e0","line":334,"in_reply_to":"e19444fe_7d3d4c19","updated":"2022-01-13 17:31:07.000000000","message":"I don\u0027t know if that actually replies to your question... Does it?","commit_id":"dd015c8046932990139bdab125fe46239d0a0eac"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ce2a9ab904e9228058b39e329e93cbdf56f6337","unresolved":true,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def qos_match(self, row):"},{"line_number":333,"context_line":"        if self.external_ids:"},{"line_number":334,"context_line":"            return self.external_ids.items() \u003c\u003d row.external_ids.items()"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":337,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":9,"id":"ac7c338e_1dcde4bb","line":334,"in_reply_to":"f1069fcd_ae9fd5e0","updated":"2022-01-13 17:39:49.000000000","message":"Ok now I understand. From the IRC conversation:\n\n\u003cotherwiseguy\u003e ralonsoh: It just seems weird that literally any external id matching would cause it to match. I could imagine there being multiple external_id fields in existing rows that are non-unique, so the new code would just go through and update potentially 100s of matching rules just because some client had something like {\u0027field_metadata\u0027: \u0027value\u0027} in it or something. \n\u003cotherwiseguy\u003e When this Command is about adding a single item.\n\n\nThat means we can have repeated external_ids key:value pairs, that something acceptable. Of course, I\u0027m just considering the Neutron specific case. I\u0027ll push a patch to explicitly define the key:value to be matched in external_ids, not only reading the external_ids passed.","commit_id":"dd015c8046932990139bdab125fe46239d0a0eac"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"60b5579530e345cfe3d39fe73aa8da2d72ca5962","unresolved":true,"context_lines":[{"line_number":334,"context_line":"        self.external_ids_match \u003d external_ids_match"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def qos_match(self, row):"},{"line_number":337,"context_line":"        if self.external_ids_match:"},{"line_number":338,"context_line":"            return self.external_ids_match.items() \u003c\u003d row.external_ids.items()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":341,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":10,"id":"8179f59d_d4af5ecc","line":338,"range":{"start_line":337,"start_character":0,"end_line":338,"end_character":78},"updated":"2022-01-17 14:57:55.000000000","message":"So if the external ids are the same, regardless of \u0027direction\u0027, \u0027priority\u0027 and \u0027match\u0027, they\u0027re considered the same qos rule?","commit_id":"3ad4a1db97f92aa356f6c184d8fec6b447228b9d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b049ba7ef210e29a7a0535342481ea842f3a36f9","unresolved":true,"context_lines":[{"line_number":334,"context_line":"        self.external_ids_match \u003d external_ids_match"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def qos_match(self, row):"},{"line_number":337,"context_line":"        if self.external_ids_match:"},{"line_number":338,"context_line":"            return self.external_ids_match.items() \u003c\u003d row.external_ids.items()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":341,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":10,"id":"0ef7e594_d596f8b5","line":338,"range":{"start_line":337,"start_character":0,"end_line":338,"end_character":78},"in_reply_to":"1a66937b_48ac0637","updated":"2022-01-17 15:26:08.000000000","message":"Exactly, this is now a \"create or update\" method.\n\nIf we pass a \"external_id\", this will be considered first always, regardless of the tuple (direction, priority, match). Of course, if you don\u0027t pass these values, the mentioned tuple will be tested.","commit_id":"3ad4a1db97f92aa356f6c184d8fec6b447228b9d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"7de10c73197a8dcebaaa7d56f144a7b7c4d4ba2f","unresolved":true,"context_lines":[{"line_number":334,"context_line":"        self.external_ids_match \u003d external_ids_match"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def qos_match(self, row):"},{"line_number":337,"context_line":"        if self.external_ids_match:"},{"line_number":338,"context_line":"            return self.external_ids_match.items() \u003c\u003d row.external_ids.items()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        return (self.direction \u003d\u003d row.direction and"},{"line_number":341,"context_line":"                self.priority \u003d\u003d row.priority and"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a66937b_48ac0637","line":338,"range":{"start_line":337,"start_character":0,"end_line":338,"end_character":78},"in_reply_to":"8179f59d_d4af5ecc","updated":"2022-01-17 15:15:49.000000000","message":"I believe the idea is that if a specific external_id key ,which is defined to mark this rule as unique, matches, then match it and potentially update it. It essentially turns QosAddCommand to QosAddOrUpdateCommand.","commit_id":"3ad4a1db97f92aa356f6c184d8fec6b447228b9d"}],"ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"1cd5717f07fee69092bb28490f978b7d2c9c2c8c","unresolved":true,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import netaddr"},{"line_number":14,"context_line":"from oslo_utils import uuidutils"},{"line_number":15,"context_line":"import testscenarios"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from ovsdbapp.backend.ovs_idl import idlutils"}],"source_content_type":"text/x-python","patch_set":6,"id":"68b3f58e_8ec8c9df","line":14,"updated":"2022-01-05 21:11:02.000000000","message":"agree with kuba, we try not to use any oslo in ovsdbapp (except oslotest)","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"40ab69212ccc76f6929af7ffafccfe31ad4c085b","unresolved":true,"context_lines":[{"line_number":423,"context_line":"        self.assertEqual(row3.action, {\u0027dscp\u0027: 24})"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def test_qos_add_may_exist_check_external_ids(self):"},{"line_number":426,"context_line":"        _uuid \u003d uuidutils.generate_uuid()"},{"line_number":427,"context_line":"        for key in (const.OVN_FIP_EXT_ID_KEY, const.OVN_PORT_EXT_ID_KEY):"},{"line_number":428,"context_line":"            args \u003d (\u0027from-lport\u0027, 0, \u0027output \u003d\u003d \"fake_port\" \u0026\u0026 ip\u0027)"},{"line_number":429,"context_line":"            kwargs \u003d {\u0027rate\u0027: 1000, \u0027burst\u0027: 800, \u0027dscp\u0027: 16}"}],"source_content_type":"text/x-python","patch_set":6,"id":"9feb00ae_708e9ccf","line":426,"updated":"2022-01-05 15:41:24.000000000","message":"maybe just use uuid module here to avoid dependency on oslo","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"71e223c999d1c9308cef0ad45ee3bf46ac49c4ff","unresolved":true,"context_lines":[{"line_number":423,"context_line":"        self.assertEqual(row3.action, {\u0027dscp\u0027: 24})"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def test_qos_add_may_exist_check_external_ids(self):"},{"line_number":426,"context_line":"        _uuid \u003d uuidutils.generate_uuid()"},{"line_number":427,"context_line":"        for key in (const.OVN_FIP_EXT_ID_KEY, const.OVN_PORT_EXT_ID_KEY):"},{"line_number":428,"context_line":"            args \u003d (\u0027from-lport\u0027, 0, \u0027output \u003d\u003d \"fake_port\" \u0026\u0026 ip\u0027)"},{"line_number":429,"context_line":"            kwargs \u003d {\u0027rate\u0027: 1000, \u0027burst\u0027: 800, \u0027dscp\u0027: 16}"}],"source_content_type":"text/x-python","patch_set":6,"id":"83be2d8e_5cd7d55c","line":426,"in_reply_to":"9feb00ae_708e9ccf","updated":"2022-01-05 16:44:39.000000000","message":"I\u0027m fine with this to avoid a dependency just for one method. I\u0027ll push a new patch.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"}],"test-requirements.txt":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5ea0880f03fc730bee298d24a09e415502cd6949","unresolved":true,"context_lines":[{"line_number":6,"context_line":"isort\u003d\u003d4.3.21 # MIT"},{"line_number":7,"context_line":"python-subunit\u003e\u003d1.0.0 # Apache-2.0/BSD"},{"line_number":8,"context_line":"oslotest\u003e\u003d3.2.0 # Apache-2.0"},{"line_number":9,"context_line":"oslo.utils\u003e\u003d3.33.0"},{"line_number":10,"context_line":"stestr\u003e\u003d2.0.0 # Apache-2.0"},{"line_number":11,"context_line":"testscenarios\u003e\u003d0.4 # Apache-2.0/BSD"},{"line_number":12,"context_line":"testtools\u003e\u003d2.2.0 # MIT"}],"source_content_type":"text/plain","patch_set":6,"id":"0f3f16c1_7cdd2c72","line":9,"updated":"2022-01-05 15:40:14.000000000","message":"IIRC the idea was to not have a dependency on oslo in ovsdbapp because it\u0027s used also outside of openstack world.","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d60dd08f7b4f1009ac38e2d1716da0a8b56fe03f","unresolved":false,"context_lines":[{"line_number":6,"context_line":"isort\u003d\u003d4.3.21 # MIT"},{"line_number":7,"context_line":"python-subunit\u003e\u003d1.0.0 # Apache-2.0/BSD"},{"line_number":8,"context_line":"oslotest\u003e\u003d3.2.0 # Apache-2.0"},{"line_number":9,"context_line":"oslo.utils\u003e\u003d3.33.0"},{"line_number":10,"context_line":"stestr\u003e\u003d2.0.0 # Apache-2.0"},{"line_number":11,"context_line":"testscenarios\u003e\u003d0.4 # Apache-2.0/BSD"},{"line_number":12,"context_line":"testtools\u003e\u003d2.2.0 # MIT"}],"source_content_type":"text/plain","patch_set":6,"id":"67b3b4be_5c6b466f","line":9,"in_reply_to":"0f3f16c1_7cdd2c72","updated":"2022-01-07 10:22:22.000000000","message":"Done","commit_id":"4808f75351771483e297ee5dfbbaa2e0b37f2930"}]}
