)]}'
{"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5292e04a51d0bf3e89b2e7aaa1ef713bc6de2ac5","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    context, txn, port, addr_pairs_diff.removed,"},{"line_number":510,"context_line":"                    unset\u003dTrue)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"            # Keep key value pairs that were in the original external ids"},{"line_number":513,"context_line":"            # of the ovn port and we did not touch."},{"line_number":514,"context_line":"            for k, v in ovn_port.external_ids.items():"},{"line_number":515,"context_line":"                external_ids.setdefault(k, v)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"            # NOTE(lizk): Fail port updating if port doesn\u0027t exist. This"},{"line_number":518,"context_line":"            # prevents any new inserted resources to be orphan, such as port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_8c8fae2c","line":515,"range":{"start_line":512,"start_character":0,"end_line":515,"end_character":45},"updated":"2020-09-24 14:15:00.000000000","message":"There\u0027s a builtin function for this, we do not need to iterate:\n\nexternal_ids.update(ovn_port.external_ids)","commit_id":"b8de4ed52194b40bc1216e433e5ad861b2d3f2e8"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"0069b8cd5eac40206b83823fce6de04ce48f9d0c","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    context, txn, port, addr_pairs_diff.removed,"},{"line_number":510,"context_line":"                    unset\u003dTrue)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"            # Keep key value pairs that were in the original external ids"},{"line_number":513,"context_line":"            # of the ovn port and we did not touch."},{"line_number":514,"context_line":"            for k, v in ovn_port.external_ids.items():"},{"line_number":515,"context_line":"                external_ids.setdefault(k, v)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"            # NOTE(lizk): Fail port updating if port doesn\u0027t exist. This"},{"line_number":518,"context_line":"            # prevents any new inserted resources to be orphan, such as port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_9d76b6d7","line":515,"range":{"start_line":512,"start_character":0,"end_line":515,"end_character":45},"in_reply_to":"9f560f44_2784bd5d","updated":"2020-09-24 16:48:26.000000000","message":"That is right. We do not want to simply overwrite the dict with potentially old values. We just want to add key/value pairs that were not created/modified by the update.","commit_id":"b8de4ed52194b40bc1216e433e5ad861b2d3f2e8"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0c834de11bc7b763adb8f8f96640c0d04b05e905","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    context, txn, port, addr_pairs_diff.removed,"},{"line_number":510,"context_line":"                    unset\u003dTrue)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"            # Keep key value pairs that were in the original external ids"},{"line_number":513,"context_line":"            # of the ovn port and we did not touch."},{"line_number":514,"context_line":"            for k, v in ovn_port.external_ids.items():"},{"line_number":515,"context_line":"                external_ids.setdefault(k, v)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"            # NOTE(lizk): Fail port updating if port doesn\u0027t exist. This"},{"line_number":518,"context_line":"            # prevents any new inserted resources to be orphan, such as port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_a73badce","line":515,"range":{"start_line":512,"start_character":0,"end_line":515,"end_character":45},"in_reply_to":"9f560f44_8c8fae2c","updated":"2020-09-24 14:41:42.000000000","message":"I *think* the difference between this and update() is update will update things that already exist in the dict, whereas this will only add items that aren\u0027t there.","commit_id":"b8de4ed52194b40bc1216e433e5ad861b2d3f2e8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"06f23df8d6736e5a94b981e8ba39934826adaa07","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    context, txn, port, addr_pairs_diff.removed,"},{"line_number":510,"context_line":"                    unset\u003dTrue)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"            # Keep key value pairs that were in the original external ids"},{"line_number":513,"context_line":"            # of the ovn port and we did not touch."},{"line_number":514,"context_line":"            for k, v in ovn_port.external_ids.items():"},{"line_number":515,"context_line":"                external_ids.setdefault(k, v)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"            # NOTE(lizk): Fail port updating if port doesn\u0027t exist. This"},{"line_number":518,"context_line":"            # prevents any new inserted resources to be orphan, such as port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_f11b8c18","line":515,"range":{"start_line":512,"start_character":0,"end_line":515,"end_character":45},"in_reply_to":"9f560f44_9d76b6d7","updated":"2020-09-25 12:37:47.000000000","message":"Ah, yeah it does make sense ++","commit_id":"b8de4ed52194b40bc1216e433e5ad861b2d3f2e8"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"644bfcc3edbdcc20b9717c27b554eea7df60391c","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    context, txn, port, addr_pairs_diff.removed,"},{"line_number":510,"context_line":"                    unset\u003dTrue)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"            # Keep key value pairs that were in the original external ids"},{"line_number":513,"context_line":"            # of the ovn port and we did not touch."},{"line_number":514,"context_line":"            for k, v in ovn_port.external_ids.items():"},{"line_number":515,"context_line":"                external_ids.setdefault(k, v)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"            # NOTE(lizk): Fail port updating if port doesn\u0027t exist. This"},{"line_number":518,"context_line":"            # prevents any new inserted resources to be orphan, such as port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_2784bd5d","line":515,"range":{"start_line":512,"start_character":0,"end_line":515,"end_character":45},"in_reply_to":"9f560f44_a73badce","updated":"2020-09-24 14:44:29.000000000","message":"\u003e\u003e port_ext_ids \u003d {1: \u002711\u0027, 2: \u002722\u0027, 3: \u002733\u0027}\n\u003e\u003e\u003e external_ids \u003d {1: \u0027one\u0027, 2: \u0027two\u0027}\n\u003e\u003e\u003e for k, v in port_ext_ids.items():\n...     external_ids.setdefault(k, v)\n\u003e\u003e\u003e external_ids\n{1: \u0027one\u0027, 2: \u0027two\u0027, 3: \u002733\u0027}\n\nvs\n\n\u003e\u003e\u003e external_ids.update(port_ext_ids)\n\u003e\u003e\u003e external_ids\n{\u00271\u0027: \u002711\u0027, \u00272\u0027: \u002722\u0027, \u00273\u0027: \u002733\u0027}","commit_id":"b8de4ed52194b40bc1216e433e5ad861b2d3f2e8"}]}
