)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The Neutron \"port.status\" field (\"ACTIVE\", \"DOWN\") is set depeding on"},{"line_number":10,"context_line":"the Logical Switch Port \"up\" and \"enabled\" flags. Before this patch,"},{"line_number":11,"context_line":"the \"port.status\" depended only on the \"up\" flag. However, ther user"},{"line_number":12,"context_line":"can set the \"port.admin_state_up\" field that will modify the"},{"line_number":13,"context_line":"\"lsp.enabled\" flag. If the \"port.admin_state_up\" is DOWN, the port"},{"line_number":14,"context_line":"does not transmit and the status should be \"DOWN\"."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"c74e3647_82feee67","line":11,"range":{"start_line":11,"start_character":59,"end_line":11,"end_character":63},"updated":"2023-10-09 21:31:49.000000000","message":"the","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The Neutron \"port.status\" field (\"ACTIVE\", \"DOWN\") is set depeding on"},{"line_number":10,"context_line":"the Logical Switch Port \"up\" and \"enabled\" flags. Before this patch,"},{"line_number":11,"context_line":"the \"port.status\" depended only on the \"up\" flag. However, ther user"},{"line_number":12,"context_line":"can set the \"port.admin_state_up\" field that will modify the"},{"line_number":13,"context_line":"\"lsp.enabled\" flag. If the \"port.admin_state_up\" is DOWN, the port"},{"line_number":14,"context_line":"does not transmit and the status should be \"DOWN\"."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"946c9f65_14cc0d20","line":11,"range":{"start_line":11,"start_character":59,"end_line":11,"end_character":63},"in_reply_to":"c74e3647_82feee67","updated":"2023-10-10 15:00:29.000000000","message":"Done","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ed21dcaed8b5d760b4c156c05407f1dafecacfec","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[OVN] Set the Neutron port status based on \"lsp.up\" and \"lsp.enabled\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The Neutron \"port.status\" field (\"ACTIVE\", \"DOWN\") is set depeding on"},{"line_number":10,"context_line":"the Logical Switch Port \"up\" and \"enabled\" flags. Before this patch,"},{"line_number":11,"context_line":"the \"port.status\" depended only on the \"up\" flag. However, the user"},{"line_number":12,"context_line":"can set the \"port.admin_state_up\" field that will modify the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9d4fd653_b60c9caf","line":9,"range":{"start_line":9,"start_character":58,"end_line":9,"end_character":66},"updated":"2023-10-18 20:05:12.000000000","message":"depending","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57c884b10f25128719d360e0877f92d163d122f2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[OVN] Set the Neutron port status based on \"lsp.up\" and \"lsp.enabled\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The Neutron \"port.status\" field (\"ACTIVE\", \"DOWN\") is set depeding on"},{"line_number":10,"context_line":"the Logical Switch Port \"up\" and \"enabled\" flags. Before this patch,"},{"line_number":11,"context_line":"the \"port.status\" depended only on the \"up\" flag. However, the user"},{"line_number":12,"context_line":"can set the \"port.admin_state_up\" field that will modify the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"c98d6404_8e777b0f","line":9,"range":{"start_line":9,"start_character":58,"end_line":9,"end_character":66},"in_reply_to":"9d4fd653_b60c9caf","updated":"2023-10-19 08:58:53.000000000","message":"Done","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b74f0383e0f5768ccecb0bd8c370f097bfb27406","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"64b1a714_92c2d051","updated":"2023-10-09 07:47:08.000000000","message":"Thanks Rodolfo.\n\nTwo nits in the code but should be good","commit_id":"3664df777f4dbf8d147c7b6338a4e9c8c4d4235d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ed21dcaed8b5d760b4c156c05407f1dafecacfec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"a60307f2_3e19f7d0","updated":"2023-10-18 20:05:12.000000000","message":"It\u0027s good. I left some minor comments just in case you\u0027d like them to pick up (or if you respin for other reasons.) Thanks.","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2029ed9a8dafd2b7bbfc32371654bc1e9e17c958","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"bec82256_d28f0d8a","updated":"2023-10-17 16:50:31.000000000","message":"recheck neutron-fullstack-with-uwsgi","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ba4e9ecb850abfe851210234f6dd492e08ffd7a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"81b2715c_e259cd14","updated":"2023-10-19 13:23:22.000000000","message":"Thanks Rodolfo, mostly nit but I think we could improve the readibility of these is_* methods","commit_id":"06a839fe88349d70fe3f41a6be8abfddcf76898d"}],"neutron/common/ovn/utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ba4e9ecb850abfe851210234f6dd492e08ffd7a","unresolved":true,"context_lines":[{"line_number":310,"context_line":"    :param lsp: ``ovs.db.Row`` with a Logical Switch Port register."},{"line_number":311,"context_line":"    :return: True if the port is enabled, False if not."},{"line_number":312,"context_line":"    \"\"\""},{"line_number":313,"context_line":"    return not lsp.enabled or lsp.enabled \u003d\u003d [True]"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"def is_lsp_up(lsp):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5765c462_29b0668a","line":313,"range":{"start_line":313,"start_character":4,"end_line":313,"end_character":26},"updated":"2023-10-19 13:23:22.000000000","message":"The core OVN method [0] actually checks for the length of the list, if it\u0027s empty or [True] then the port is enabled. Perhaps we could the same here ?\n\nOr at least add a comment/improve docstring explaining the logic. Reading the code as-is looks strange to see \"return not lsp.enabled\" for a method called \"is_lsp_enabled()\".\n\nAs as suggestion, we could implement it as: \n\n```\nIn [7]: def is_lsp_enabled(lsp):\n   ...:     return len(lsp.enabled) \u003d\u003d 0 or lsp.enabled \u003d\u003d [True]\n   ...: \n\nIn [8]: lsp \u003d type(\u0027lsp\u0027, (object,), {\u0027enabled\u0027: []})\n\nIn [9]: is_lsp_enabled(lsp)\nOut[9]: True\n\nIn [10]: lsp \u003d type(\u0027lsp\u0027, (object,), {\u0027enabled\u0027: [False]})\n\nIn [11]: is_lsp_enabled(lsp)\nOut[11]: False\n\nIn [12]: lsp \u003d type(\u0027lsp\u0027, (object,), {\u0027enabled\u0027: [True]})\n\nIn [13]: is_lsp_enabled(lsp)\nOut[13]: True\n```\n\nAlso, if enabled is False (not a list, but boolean) this method returns True which is counter-intuitive:\n\n\n```\nIn [1]: lsp \u003d type(\u0027lsp\u0027, (object,), {\u0027enabled\u0027: False})\n\nIn [2]: def is_lsp_enabled(lsp):\n   ...:     return not lsp.enabled or lsp.enabled \u003d\u003d [True]\n   ...: \n\nIn [3]: is_lsp_enabled(lsp)\nOut[3]: True\n```\n\n\n\n[0] https://github.com/ovn-org/ovn/blob/b5387b3d73165efc37e94f566ee181e88d543ac3/northd/northd.c#L1785-L1791","commit_id":"06a839fe88349d70fe3f41a6be8abfddcf76898d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3a63cd13801166377715f3a8b6e5587dda9b1b20","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    :param lsp: ``ovs.db.Row`` with a Logical Switch Port register."},{"line_number":311,"context_line":"    :return: True if the port is enabled, False if not."},{"line_number":312,"context_line":"    \"\"\""},{"line_number":313,"context_line":"    return not lsp.enabled or lsp.enabled \u003d\u003d [True]"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"def is_lsp_up(lsp):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fa5df17_daabb552","line":313,"range":{"start_line":313,"start_character":4,"end_line":313,"end_character":26},"in_reply_to":"5765c462_29b0668a","updated":"2023-10-19 15:31:19.000000000","message":"Right, this is why I added the link to the OVN northd implementation, to add context to this method. But I\u0027ll add a description to explain that better.\n\nAbout your suggestion, I would like to refer to the field definition [1]. This field is always a list, it could not be a boolean. The possible values are:\n* []: old DDBB without this field, in this case the LSP is enabled and that matches with the check \"if not lsp.enabled\".\n* [True]\n* [False]\n\n\n[1]https://github.com/ovn-org/ovn/blob/b5387b3d73165efc37e94f566ee181e88d543ac3/ovn-nb.ovsschema#L124","commit_id":"06a839fe88349d70fe3f41a6be8abfddcf76898d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ba4e9ecb850abfe851210234f6dd492e08ffd7a","unresolved":true,"context_lines":[{"line_number":322,"context_line":"    :param lsp: ``ovs.db.Row`` with a Logical Switch Port register."},{"line_number":323,"context_line":"    :return: True if the port is UP, False if not."},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    return lsp.up and lsp.up \u003d\u003d [True]"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"def is_snat_enabled(router):"}],"source_content_type":"text/x-python","patch_set":9,"id":"f28f4134_38bd4486","line":325,"range":{"start_line":325,"start_character":11,"end_line":325,"end_character":21},"updated":"2023-10-19 13:23:22.000000000","message":"This is not needed if the only value we care is [True] we could just do, anything else is False.\n\nreturn lsp.up \u003d\u003d [True]","commit_id":"06a839fe88349d70fe3f41a6be8abfddcf76898d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3a63cd13801166377715f3a8b6e5587dda9b1b20","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    :param lsp: ``ovs.db.Row`` with a Logical Switch Port register."},{"line_number":323,"context_line":"    :return: True if the port is UP, False if not."},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    return lsp.up and lsp.up \u003d\u003d [True]"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"def is_snat_enabled(router):"}],"source_content_type":"text/x-python","patch_set":9,"id":"c095b14f_2ef71bb5","line":325,"range":{"start_line":325,"start_character":11,"end_line":325,"end_character":21},"in_reply_to":"f28f4134_38bd4486","updated":"2023-10-19 15:31:19.000000000","message":"You are right, this is a direct match comparison. I don\u0027t need the first part.","commit_id":"06a839fe88349d70fe3f41a6be8abfddcf76898d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"983dcc1144c9f6f1bc25087892a2bcfe52853b4e","unresolved":true,"context_lines":[{"line_number":308,"context_line":"    https://shorturl.at/rBSZ7. The \"enabled\" field can have three values:"},{"line_number":309,"context_line":"    * []: from older OVN versions, in this case the LSP is enabled by default."},{"line_number":310,"context_line":"    * [True]: the LSP is enabled."},{"line_number":311,"context_line":"    * [False]: the LSP is disabled."},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    :param lsp: ``ovs.db.Row`` with a Logical Switch Port register."},{"line_number":314,"context_line":"    :return: True if the port is enabled, False if not."}],"source_content_type":"text/x-python","patch_set":10,"id":"f1808d05_e1057771","line":311,"updated":"2023-10-19 15:48:25.000000000","message":"Great! Much clear now. Thank for that","commit_id":"aead4aa99df4769462ec47045c8d973ae1b0a0a0"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"bbd55fdbbc1c60e1b806e4c774b16b2724b57385","unresolved":true,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        old_up \u003d getattr(old, \u0027up\u0027, None)"},{"line_number":511,"context_line":"        old_enabled \u003d getattr(old, \u0027enabled\u0027, None)"},{"line_number":512,"context_line":"        if old_up and old_up !\u003d True:"},{"line_number":513,"context_line":"            # The port has transitioned from DOWN to UP, and the admin state"},{"line_number":514,"context_line":"            # is UP (lsp.enabled\u003dTrue)"},{"line_number":515,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"09d5eb23_768c8da2","line":512,"range":{"start_line":512,"start_character":22,"end_line":512,"end_character":37},"updated":"2023-09-29 15:55:03.000000000","message":"This should be !\u003d [True]","commit_id":"0c187e1d9c12bbe6c16940f4dba636145caa19e3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f111350cd699268d0d627a1f4f1ab58c00b58a67","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        old_up \u003d getattr(old, \u0027up\u0027, None)"},{"line_number":511,"context_line":"        old_enabled \u003d getattr(old, \u0027enabled\u0027, None)"},{"line_number":512,"context_line":"        if old_up and old_up !\u003d True:"},{"line_number":513,"context_line":"            # The port has transitioned from DOWN to UP, and the admin state"},{"line_number":514,"context_line":"            # is UP (lsp.enabled\u003dTrue)"},{"line_number":515,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"3337c885_17ff3bdf","line":512,"range":{"start_line":512,"start_character":22,"end_line":512,"end_character":37},"in_reply_to":"09d5eb23_768c8da2","updated":"2023-10-02 16:17:25.000000000","message":"Done","commit_id":"0c187e1d9c12bbe6c16940f4dba636145caa19e3"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b74f0383e0f5768ccecb0bd8c370f097bfb27406","unresolved":true,"context_lines":[{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        if row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]:"},{"line_number":481,"context_line":"            self._status_up \u003d True"},{"line_number":482,"context_line":"        else:"},{"line_number":483,"context_line":"            self._status_up \u003d False"},{"line_number":484,"context_line":"        return True"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":4,"id":"b32bb1fd_6925a69f","line":483,"range":{"start_line":480,"start_character":0,"end_line":483,"end_character":35},"updated":"2023-10-09 07:47:08.000000000","message":"nit, could be simplified:\n\n```\nself._status_up \u003d row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]\n```","commit_id":"3664df777f4dbf8d147c7b6338a4e9c8c4d4235d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3ba4e3d52126d3780669eddcf3bf7b67c272e1fa","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        if row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]:"},{"line_number":481,"context_line":"            self._status_up \u003d True"},{"line_number":482,"context_line":"        else:"},{"line_number":483,"context_line":"            self._status_up \u003d False"},{"line_number":484,"context_line":"        return True"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":4,"id":"39d342ea_3b5f8275","line":483,"range":{"start_line":480,"start_character":0,"end_line":483,"end_character":35},"in_reply_to":"b32bb1fd_6925a69f","updated":"2023-10-09 08:47:58.000000000","message":"I always have the same problem when coding: I first implement everything with if/else clauses. But sometimes everything could be easier like this one.\n\nDone.","commit_id":"3664df777f4dbf8d147c7b6338a4e9c8c4d4235d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b74f0383e0f5768ccecb0bd8c370f097bfb27406","unresolved":true,"context_lines":[{"line_number":819,"context_line":"        So unwatch these events."},{"line_number":820,"context_line":"        \"\"\""},{"line_number":821,"context_line":"        self.notify_handler.unwatch_events([self._lsp_create_event,"},{"line_number":822,"context_line":"                                            ])"},{"line_number":823,"context_line":"        self._lsp_create_event \u003d None"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def post_connect(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"c4a5f239_9ddaac59","line":822,"updated":"2023-10-09 07:47:08.000000000","message":"Odd indentation","commit_id":"3664df777f4dbf8d147c7b6338a4e9c8c4d4235d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3ba4e3d52126d3780669eddcf3bf7b67c272e1fa","unresolved":false,"context_lines":[{"line_number":819,"context_line":"        So unwatch these events."},{"line_number":820,"context_line":"        \"\"\""},{"line_number":821,"context_line":"        self.notify_handler.unwatch_events([self._lsp_create_event,"},{"line_number":822,"context_line":"                                            ])"},{"line_number":823,"context_line":"        self._lsp_create_event \u003d None"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def post_connect(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"95820735_07acbc2a","line":822,"in_reply_to":"c4a5f239_9ddaac59","updated":"2023-10-09 08:47:58.000000000","message":"Indeed but pep8 is happy with that. I left a new line just in case we need to add new events, to keep the git history in L822","commit_id":"3664df777f4dbf8d147c7b6338a4e9c8c4d4235d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":286,"context_line":"            # ``LogicalSwitchPortUpdateUpEvent`` events."},{"line_number":287,"context_line":"            return False"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        return bool(lsp.up and lsp.enabled)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":292,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":5,"id":"87127690_b98df8f8","line":289,"updated":"2023-10-09 21:31:49.000000000","message":"I wonder... if up and enabled are optional, AFAIU they will be returned as lists of 0 or 1 item (True or False). Does it mean that enabled\u003d[False] will result in bool(true) here?\n\n(The same is probably true for lsp.up that is not part of your patch.)","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            # ``LogicalSwitchPortUpdateUpEvent`` events."},{"line_number":287,"context_line":"            return False"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        return bool(lsp.up and lsp.enabled)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":292,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ec3466e3_b3bf3fb1","line":289,"in_reply_to":"87127690_b98df8f8","updated":"2023-10-10 15:00:29.000000000","message":"You right. The previous code was incorrectly checking the lsp.up value because this is a list of bool. With newer OVS versions the value is always populated but in a list as you said. I\u0027ll update it.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":472,"context_line":"        self.driver \u003d driver"},{"line_number":473,"context_line":"        table \u003d \u0027Logical_Switch_Port\u0027"},{"line_number":474,"context_line":"        events \u003d (self.ROW_CREATE,)"},{"line_number":475,"context_line":"        super(LogicalSwitchPortCreateEvent, self).__init__(events, table, None)"},{"line_number":476,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortCreateEvent\u0027"},{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bcdbce85_866a1ce0","line":475,"range":{"start_line":475,"start_character":74,"end_line":475,"end_character":78},"updated":"2023-10-09 21:31:49.000000000","message":"(minor) while this doesn\u0027t have a runtime effect on ovsdbapp - since it checks the conditions as `if self.conditions` - I think it\u0027s better to pass an empty value of the expected type for the argument, namely, `tuple()` or `[]`.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":472,"context_line":"        self.driver \u003d driver"},{"line_number":473,"context_line":"        table \u003d \u0027Logical_Switch_Port\u0027"},{"line_number":474,"context_line":"        events \u003d (self.ROW_CREATE,)"},{"line_number":475,"context_line":"        super(LogicalSwitchPortCreateEvent, self).__init__(events, table, None)"},{"line_number":476,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortCreateEvent\u0027"},{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"c4ad490b_a746f2db","line":475,"range":{"start_line":475,"start_character":74,"end_line":475,"end_character":78},"in_reply_to":"bcdbce85_866a1ce0","updated":"2023-10-10 15:00:29.000000000","message":"As you commented, the \"RowEvent.match_fn\" method check first if self.conditions is \"something\". In any case, I\u0027ll update this code passing an empty list.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":476,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortCreateEvent\u0027"},{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        self._status_up \u003d row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]"},{"line_number":481,"context_line":"        return True"},{"line_number":482,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"de3ccdef_a937caa7","line":479,"updated":"2023-10-09 21:31:49.000000000","message":"the interface is supposed to be:\n\n1. `match_fn` returns False or True depending on whether the event is \"of interest\".\n2. then `run` implements the event side effect.\n\nWhy do you need to *store* _status_up here and not just calculate it inside run()?","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":476,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortCreateEvent\u0027"},{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        self._status_up \u003d row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]"},{"line_number":481,"context_line":"        return True"},{"line_number":482,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"f6e7e8da_9538150a","line":479,"in_reply_to":"de3ccdef_a937caa7","updated":"2023-10-10 15:00:29.000000000","message":"Better inside run. This method will always return true in any case.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        self._status_up \u003d row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]"},{"line_number":481,"context_line":"        return True"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":5,"id":"2f4bec6e_5ba2fab1","line":480,"updated":"2023-10-09 21:31:49.000000000","message":"a missing enabled means True. a missing up means True. But in your handler, you will consider a case where at least one of them missing as `status\u003dDOWN`, which is not correct.\n\nHint:\n\n```\n\u003e\u003e\u003e all([])\nTrue\n\u003e\u003e\u003e all([True])\nTrue\n\u003e\u003e\u003e all([False])\nFalse\n\n```","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0e34a39a463d90c2fa52d4d3388d6a61aa195992","unresolved":true,"context_lines":[{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        self._status_up \u003d row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]"},{"line_number":481,"context_line":"        return True"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":5,"id":"76fc26ee_ab180262","line":480,"in_reply_to":"2f4bec6e_5ba2fab1","updated":"2023-10-10 13:21:00.000000000","message":"As discussed elsewhere, a missing `up` is indeed `false` in OVN. But as for `enabled`, my comment stands.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        self._status_up \u003d None"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":480,"context_line":"        self._status_up \u003d row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]"},{"line_number":481,"context_line":"        return True"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5bc7b2a4_4477c7b0","line":480,"in_reply_to":"2f4bec6e_5ba2fab1","updated":"2023-10-10 15:00:29.000000000","message":"I\u0027ve created \"is_lsp_enabled\" and \"is_lsp_up\", mimicking the northd code","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":487,"context_line":"            self.driver.set_port_status_down(row.name)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"class LogicalSwitchPortUpdateUpEvent(row_event.RowEvent):"},{"line_number":491,"context_line":"    \"\"\"Row update event - Logical_Switch_Port \u0027up\u0027 going from False to True"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    This happens when the VM goes up."}],"source_content_type":"text/x-python","patch_set":5,"id":"3d3cd59b_dcf4d357","line":490,"updated":"2023-10-09 21:31:49.000000000","message":"you consolidated Create but not Update. Any reason for this?","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":487,"context_line":"            self.driver.set_port_status_down(row.name)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"class LogicalSwitchPortUpdateUpEvent(row_event.RowEvent):"},{"line_number":491,"context_line":"    \"\"\"Row update event - Logical_Switch_Port \u0027up\u0027 going from False to True"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    This happens when the VM goes up."}],"source_content_type":"text/x-python","patch_set":5,"id":"a450be37_0217e410","line":490,"in_reply_to":"3d3cd59b_dcf4d357","updated":"2023-10-10 15:00:29.000000000","message":"Yes, the conditions are more simple in the create event. However when we update a port, we need to check the previous and the current status of two variables. It is more clear to have two events.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":503,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortUpdateUpEvent\u0027"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":506,"context_line":"        if not (row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]):"},{"line_number":507,"context_line":"            return False"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"        old_up \u003d getattr(old, \u0027up\u0027, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"4e03e9c5_947cfb10","line":506,"updated":"2023-10-09 21:31:49.000000000","message":"so if e.g. enabled\u003dfalse was unset, then you won\u0027t handle the event here. I believe it\u0027s wrong. Same for `up`.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":503,"context_line":"        self.event_name \u003d \u0027LogicalSwitchPortUpdateUpEvent\u0027"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":506,"context_line":"        if not (row.up \u003d\u003d [True] and row.enabled \u003d\u003d [True]):"},{"line_number":507,"context_line":"            return False"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"        old_up \u003d getattr(old, \u0027up\u0027, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"e692909b_face4209","line":506,"in_reply_to":"4e03e9c5_947cfb10","updated":"2023-10-10 15:00:29.000000000","message":"I\u0027ve updated these checks mimicking the northd code","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class LogicalSwitchPortUpdateDownEvent(row_event.RowEvent):"},{"line_number":525,"context_line":"    \"\"\"Row update event - Logical_Switch_Port \u0027up\u0027 or \u0027enable\u0027 going to False"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    This happens when the VM goes down."},{"line_number":528,"context_line":"    New value of Logical_Switch_Port \u0027up\u0027 will be False and the old value will"}],"source_content_type":"text/x-python","patch_set":5,"id":"c916434d_32b95a25","line":525,"updated":"2023-10-09 21:31:49.000000000","message":"enableD","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class LogicalSwitchPortUpdateDownEvent(row_event.RowEvent):"},{"line_number":525,"context_line":"    \"\"\"Row update event - Logical_Switch_Port \u0027up\u0027 or \u0027enable\u0027 going to False"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    This happens when the VM goes down."},{"line_number":528,"context_line":"    New value of Logical_Switch_Port \u0027up\u0027 will be False and the old value will"}],"source_content_type":"text/x-python","patch_set":5,"id":"2f21737c_9cd4915f","line":525,"in_reply_to":"c916434d_32b95a25","updated":"2023-10-10 15:00:29.000000000","message":"Done","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":815,"context_line":"        After the startup, there is no need to watch these events."},{"line_number":816,"context_line":"        So unwatch these events."},{"line_number":817,"context_line":"        \"\"\""},{"line_number":818,"context_line":"        self.notify_handler.unwatch_events([self._lsp_create_event,"},{"line_number":819,"context_line":"                                            ])"},{"line_number":820,"context_line":"        self._lsp_create_event \u003d None"},{"line_number":821,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"059998c3_8cb9d742","line":818,"updated":"2023-10-09 21:31:49.000000000","message":"(nit) please merge the lines 818-9.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":815,"context_line":"        After the startup, there is no need to watch these events."},{"line_number":816,"context_line":"        So unwatch these events."},{"line_number":817,"context_line":"        \"\"\""},{"line_number":818,"context_line":"        self.notify_handler.unwatch_events([self._lsp_create_event,"},{"line_number":819,"context_line":"                                            ])"},{"line_number":820,"context_line":"        self._lsp_create_event \u003d None"},{"line_number":821,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"8328e706_292d2ba0","line":818,"in_reply_to":"059998c3_8cb9d742","updated":"2023-10-10 15:00:29.000000000","message":"I kept that in order to add more events in a future, keeping the git history of L818. But because you are the second reviewer commenting that, I\u0027ll remove it.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":817,"context_line":"        \"\"\""},{"line_number":818,"context_line":"        self.notify_handler.unwatch_events([self._lsp_create_event,"},{"line_number":819,"context_line":"                                            ])"},{"line_number":820,"context_line":"        self._lsp_create_event \u003d None"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def post_connect(self):"},{"line_number":823,"context_line":"        self.unwatch_logical_switch_port_create_events()"}],"source_content_type":"text/x-python","patch_set":5,"id":"d390be44_119e15ff","line":820,"updated":"2023-10-09 21:31:49.000000000","message":"you can `del` the attribute instead of carrying `None` here.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":817,"context_line":"        \"\"\""},{"line_number":818,"context_line":"        self.notify_handler.unwatch_events([self._lsp_create_event,"},{"line_number":819,"context_line":"                                            ])"},{"line_number":820,"context_line":"        self._lsp_create_event \u003d None"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def post_connect(self):"},{"line_number":823,"context_line":"        self.unwatch_logical_switch_port_create_events()"}],"source_content_type":"text/x-python","patch_set":5,"id":"b6d579fc_11e99149","line":820,"in_reply_to":"d390be44_119e15ff","updated":"2023-10-10 15:00:29.000000000","message":"Done","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ed21dcaed8b5d760b4c156c05407f1dafecacfec","unresolved":true,"context_lines":[{"line_number":483,"context_line":""},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"class LogicalSwitchPortUpdateUpEvent(row_event.RowEvent):"},{"line_number":486,"context_line":"    \"\"\"Row update event - Logical_Switch_Port \u0027up\u0027 or \u0027enabled\u0027 going True"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    This happens when the VM goes up."},{"line_number":489,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1b151a25_d0960b8e","line":486,"updated":"2023-10-18 20:05:12.000000000","message":"nit: since a missing `enabled` also means \"enabled\", perhaps it\u0027s better to not use quotes here to avoid the link to the field names (as I think you did in line 465). (If you think this has merit, there is another occurrence in line 518).","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57c884b10f25128719d360e0877f92d163d122f2","unresolved":false,"context_lines":[{"line_number":483,"context_line":""},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"class LogicalSwitchPortUpdateUpEvent(row_event.RowEvent):"},{"line_number":486,"context_line":"    \"\"\"Row update event - Logical_Switch_Port \u0027up\u0027 or \u0027enabled\u0027 going True"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    This happens when the VM goes up."},{"line_number":489,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"a311836c_647ca3c4","line":486,"in_reply_to":"1b151a25_d0960b8e","updated":"2023-10-19 08:58:53.000000000","message":"Done","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ed21dcaed8b5d760b4c156c05407f1dafecacfec","unresolved":true,"context_lines":[{"line_number":500,"context_line":"            return False"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        old_up \u003d getattr(old, \u0027up\u0027, None)"},{"line_number":503,"context_line":"        old_enabled \u003d getattr(old, \u0027enabled\u0027, None)"},{"line_number":504,"context_line":"        if old_up is not None and not utils.is_lsp_up(old):"},{"line_number":505,"context_line":"            # The port has transitioned from DOWN to UP, and the admin state"},{"line_number":506,"context_line":"            # is UP (lsp.enabled\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"f2ae3be3_2ab6e3a5","line":503,"updated":"2023-10-18 20:05:12.000000000","message":"IUUC this will work but isn\u0027t what you *semantically* care about in your conditionals that `old` *hasattr* and not that the exact value (*getattr*)? Can\u0027t we replace e.g. `old_up \u003d getattr(...); if old_up is not None` with `if hasattr(old, ...)`? (Comment also applies to line 533+).","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57c884b10f25128719d360e0877f92d163d122f2","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            return False"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        old_up \u003d getattr(old, \u0027up\u0027, None)"},{"line_number":503,"context_line":"        old_enabled \u003d getattr(old, \u0027enabled\u0027, None)"},{"line_number":504,"context_line":"        if old_up is not None and not utils.is_lsp_up(old):"},{"line_number":505,"context_line":"            # The port has transitioned from DOWN to UP, and the admin state"},{"line_number":506,"context_line":"            # is UP (lsp.enabled\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"e26b88da_024a177b","line":503,"in_reply_to":"f2ae3be3_2ab6e3a5","updated":"2023-10-19 08:58:53.000000000","message":"That\u0027s right, ``hasattr`` is the correct method to use here.","commit_id":"615fe7733740a8ff0ad02cea25bf616e0ccbf93f"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2731d94f5b81ba5953e59cd2e3b6c187af992fd5","unresolved":true,"context_lines":[{"line_number":369,"context_line":"            attrs\u003d{\u0027name\u0027: \u0027Port_Binding\u0027})"},{"line_number":370,"context_line":"        ovsdb_row \u003d fakes.FakeOvsdbRow.create_one_ovsdb_row"},{"line_number":371,"context_line":"        self.driver.nb_ovn.lookup.return_value \u003d ovsdb_row("},{"line_number":372,"context_line":"            attrs\u003d{\u0027up\u0027: True, \u0027enabled\u0027: True})"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Port binding change."},{"line_number":375,"context_line":"        self._test_event("}],"source_content_type":"text/x-python","patch_set":5,"id":"27273243_2f8cc957","line":372,"updated":"2023-10-09 21:31:49.000000000","message":"is it really what lookup returns? I thought it\u0027d be a `list of bool`?","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e72b6b213aa86ccaca76647845f0a9ad6e5127ea","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            attrs\u003d{\u0027name\u0027: \u0027Port_Binding\u0027})"},{"line_number":370,"context_line":"        ovsdb_row \u003d fakes.FakeOvsdbRow.create_one_ovsdb_row"},{"line_number":371,"context_line":"        self.driver.nb_ovn.lookup.return_value \u003d ovsdb_row("},{"line_number":372,"context_line":"            attrs\u003d{\u0027up\u0027: True, \u0027enabled\u0027: True})"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Port binding change."},{"line_number":375,"context_line":"        self._test_event("}],"source_content_type":"text/x-python","patch_set":5,"id":"6ec34024_2004d69c","line":372,"in_reply_to":"27273243_2f8cc957","updated":"2023-10-10 15:00:29.000000000","message":"Right, the test is checking an incorrect value.","commit_id":"7a288f752b28269328106c43df190e221fd88917"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4815b84b5c31e145c26e58d5f71ae205f24c1d31","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            attrs\u003d{\u0027name\u0027: \u0027Port_Binding\u0027})"},{"line_number":370,"context_line":"        ovsdb_row \u003d fakes.FakeOvsdbRow.create_one_ovsdb_row"},{"line_number":371,"context_line":"        self.driver.nb_ovn.lookup.return_value \u003d ovsdb_row("},{"line_number":372,"context_line":"            attrs\u003d{\u0027up\u0027: True, \u0027enabled\u0027: True})"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Port binding change."},{"line_number":375,"context_line":"        self._test_event("}],"source_content_type":"text/x-python","patch_set":5,"id":"1f3e0760_dc1a7349","line":372,"in_reply_to":"6ec34024_2004d69c","updated":"2023-10-10 15:48:12.000000000","message":"Actually no, when you define a boolean field, you need to specify the value (True, False). The ``ovs.db.Row`` object will return a list [True] or [False] because of the field definition in the schema.","commit_id":"7a288f752b28269328106c43df190e221fd88917"}]}
