)]}'
{"neutron/common/ovn/utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1b4cd85aef01368d4d1bc72eb650dd231cd93872","unresolved":true,"context_lines":[{"line_number":554,"context_line":"    return datapath.external_ids[\u0027name\u0027].replace(\u0027neutron-\u0027, \u0027\u0027)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"def is_port_external(port, nb_idl):"},{"line_number":558,"context_line":"    ovn_port \u003d nb_idl.get_lswitch_port(port[\u0027id\u0027])"},{"line_number":559,"context_line":"    if not ovn_port:"},{"line_number":560,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"23dd3a69_6e1e1cbd","line":557,"range":{"start_line":557,"start_character":21,"end_line":557,"end_character":25},"updated":"2021-04-21 16:02:58.000000000","message":"I think we can determine if the port is external using the Neutron port object itself. No need to query OVSDB.\n\nHere\u0027s how we do it in ovn_client.py [0].\n\nWe could move that code here and then use this method in both places, what do you think ?\n\n def is_port_external(port):\n     capabilities \u003d get_port_capabilities(port)\n     vnic_type \u003d port.get(portbindings.VNIC_TYPE,\n                          portbindings.VNIC_NORMAL)\n     return (vnic_type in ovn_const.EXTERNAL_PORT_TYPES and\n             ovn_const.PORT_CAP_SWITCHDEV not in capabilities)\n     \n\n[0] https://github.com/openstack/neutron/blob/abf4cb21f772b7d8689dc5eb1721347d1342c262/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L268-L272","commit_id":"07c2b13dc45807865b5cf1dabf167fa9bd3893f4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d49f84281af600d61231ad09b76cdfc7b65cba2a","unresolved":true,"context_lines":[{"line_number":554,"context_line":"    return datapath.external_ids[\u0027name\u0027].replace(\u0027neutron-\u0027, \u0027\u0027)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"def is_port_external(port, nb_idl):"},{"line_number":558,"context_line":"    ovn_port \u003d nb_idl.get_lswitch_port(port[\u0027id\u0027])"},{"line_number":559,"context_line":"    if not ovn_port:"},{"line_number":560,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba814999_3900aab0","line":557,"range":{"start_line":557,"start_character":21,"end_line":557,"end_character":25},"in_reply_to":"23dd3a69_6e1e1cbd","updated":"2021-04-22 06:39:03.000000000","message":"Right, actually now I see this code (that is also duplicated in other places), I think we need to create a method for it.\n\nBut yes, we can skip the access to the OVB DB.","commit_id":"07c2b13dc45807865b5cf1dabf167fa9bd3893f4"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/qos.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1b4cd85aef01368d4d1bc72eb650dd231cd93872","unresolved":true,"context_lines":[{"line_number":218,"context_line":"    def update_port(self, txn, port, original_port, reset\u003dFalse, delete\u003dFalse,"},{"line_number":219,"context_line":"                    qos_rules\u003dNone, port_type\u003dNone, retrieve_port_type\u003dFalse):"},{"line_number":220,"context_line":"        if (port_type \u003d\u003d ovn_const.LSP_TYPE_EXTERNAL or"},{"line_number":221,"context_line":"                (retrieve_port_type and"},{"line_number":222,"context_line":"                 utils.is_port_external(port, self._driver._nb_idl))):"},{"line_number":223,"context_line":"            # External ports (SR-IOV) QoS is handled by the SR-IOV agent QoS"},{"line_number":224,"context_line":"            # extension."}],"source_content_type":"text/x-python","patch_set":3,"id":"8a74b0b8_07880579","line":221,"range":{"start_line":221,"start_character":17,"end_line":221,"end_character":35},"updated":"2021-04-21 16:02:58.000000000","message":"If we could check if the port is external using the Neutron object itself (since it\u0027s cheap) maybe we do not even need this parameter here ?","commit_id":"07c2b13dc45807865b5cf1dabf167fa9bd3893f4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d49f84281af600d61231ad09b76cdfc7b65cba2a","unresolved":true,"context_lines":[{"line_number":218,"context_line":"    def update_port(self, txn, port, original_port, reset\u003dFalse, delete\u003dFalse,"},{"line_number":219,"context_line":"                    qos_rules\u003dNone, port_type\u003dNone, retrieve_port_type\u003dFalse):"},{"line_number":220,"context_line":"        if (port_type \u003d\u003d ovn_const.LSP_TYPE_EXTERNAL or"},{"line_number":221,"context_line":"                (retrieve_port_type and"},{"line_number":222,"context_line":"                 utils.is_port_external(port, self._driver._nb_idl))):"},{"line_number":223,"context_line":"            # External ports (SR-IOV) QoS is handled by the SR-IOV agent QoS"},{"line_number":224,"context_line":"            # extension."}],"source_content_type":"text/x-python","patch_set":3,"id":"69e0d974_ea6db5d3","line":221,"range":{"start_line":221,"start_character":17,"end_line":221,"end_character":35},"in_reply_to":"8a74b0b8_07880579","updated":"2021-04-22 06:39:03.000000000","message":"Sure, I\u0027ll refactor this.","commit_id":"07c2b13dc45807865b5cf1dabf167fa9bd3893f4"}]}
