)]}'
{"neutron/common/ovn/utils.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":461,"context_line":""},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"def get_port_id_from_gwc_row(row):"},{"line_number":464,"context_line":"    \"\"\"Returns a port_id from gwc row"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    The Gateway_Chassis row stores router port_id in"},{"line_number":467,"context_line":"    the row name attribute:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_efb431f4","line":464,"range":{"start_line":464,"start_character":7,"end_line":464,"end_character":14},"updated":"2020-03-06 11:55:51.000000000","message":"nit: Return","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":461,"context_line":""},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"def get_port_id_from_gwc_row(row):"},{"line_number":464,"context_line":"    \"\"\"Returns a port_id from gwc row"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    The Gateway_Chassis row stores router port_id in"},{"line_number":467,"context_line":"    the row name attribute:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_a4d41bea","line":464,"range":{"start_line":464,"start_character":7,"end_line":464,"end_character":14},"in_reply_to":"1fa4df85_efb431f4","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    :param row: A Gateway_Chassis table row."},{"line_number":472,"context_line":"    :returns: String containing router port_id."},{"line_number":473,"context_line":"    \"\"\""},{"line_number":474,"context_line":"    return row.name.split(\u0027_\u0027)[0][len(constants.LRP_PREFIX):]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_4fa785be","line":474,"updated":"2020-03-06 11:55:51.000000000","message":"Suggestion: I think it\u0027s better to compile a regular expression to parse the row name and return the port_id from there.","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    :param row: A Gateway_Chassis table row."},{"line_number":472,"context_line":"    :returns: String containing router port_id."},{"line_number":473,"context_line":"    \"\"\""},{"line_number":474,"context_line":"    return row.name.split(\u0027_\u0027)[0][len(constants.LRP_PREFIX):]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_84d9df22","line":474,"in_reply_to":"1fa4df85_4fa785be","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    :param row: A Gateway_Chassis table row."},{"line_number":472,"context_line":"    :returns: String containing router port_id."},{"line_number":473,"context_line":"    \"\"\""},{"line_number":474,"context_line":"    return re.search("},{"line_number":475,"context_line":"        r\u0027(%s)([\\w-]+)_([\\w-]+)\u0027 % constants.LRP_PREFIX,"},{"line_number":476,"context_line":"        row.name).group(2)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_7334a393","line":474,"updated":"2020-03-07 22:13:34.000000000","message":"If this is something that happens a lot, it is more efficient to globally do something like:\n\n RE_PORT_FROM_GWC \u003d re.compile(r\u0027(%s)([\\w-]+)_([\\w-]+)\u0027 % constants.LRP_PREFIX)\n\nso we only have to create the regex once, then here do:\n\n return RE_PORT_FROM_GWC.search(row.name).group(2)\n\nAlso, if the regex doesn\u0027t match, then search will return None and calling .group() on it will raise an AttributeError, and it doesn\u0027t look like the caller expects/handles this.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":471,"context_line":"    :param row: A Gateway_Chassis table row."},{"line_number":472,"context_line":"    :returns: String containing router port_id."},{"line_number":473,"context_line":"    \"\"\""},{"line_number":474,"context_line":"    return re.search("},{"line_number":475,"context_line":"        r\u0027(%s)([\\w-]+)_([\\w-]+)\u0027 % constants.LRP_PREFIX,"},{"line_number":476,"context_line":"        row.name).group(2)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_6468ffb9","line":474,"in_reply_to":"1fa4df85_7334a393","updated":"2020-03-13 11:21:22.000000000","message":"Ok, I moved regex to the constants.\n\nAbout AttributeError - updated the caller.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/impl_idl_ovn.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e6554439ae268fe6ac7e41d0e7054da4546f5b4d","unresolved":false,"context_lines":[{"line_number":464,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":465,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":468,"context_line":"            available_chassis \u003d list(filter(f, available_chassis))"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"            if available_chassis \u003d\u003d set(original_state):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_d55ce61b","line":467,"range":{"start_line":467,"start_character":25,"end_line":467,"end_character":45},"updated":"2020-02-04 12:57:02.000000000","message":"Like not having required physnet configured.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                # The same situation as was before. Nothing"},{"line_number":477,"context_line":"                # to be rescheduled."},{"line_number":478,"context_line":"                continue"},{"line_number":479,"context_line":"            if len(available_chassis) \u003d\u003d 0:"},{"line_number":480,"context_line":"                # There is no chassis that could host"},{"line_number":481,"context_line":"                # this gateway."},{"line_number":482,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_01c59d35","line":479,"range":{"start_line":479,"start_character":15,"end_line":479,"end_character":43},"updated":"2020-02-17 18:52:53.000000000","message":"small nit:\n  if not available_chassis:","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                # The same situation as was before. Nothing"},{"line_number":477,"context_line":"                # to be rescheduled."},{"line_number":478,"context_line":"                continue"},{"line_number":479,"context_line":"            if len(available_chassis) \u003d\u003d 0:"},{"line_number":480,"context_line":"                # There is no chassis that could host"},{"line_number":481,"context_line":"                # this gateway."},{"line_number":482,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_cf5010d8","line":479,"range":{"start_line":479,"start_character":15,"end_line":479,"end_character":43},"in_reply_to":"3fa7e38b_01c59d35","updated":"2020-02-24 12:04:58.000000000","message":"++","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        for port, physnet in port_physnet_dict.items():"},{"line_number":451,"context_line":"            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)"},{"line_number":452,"context_line":"            actual_gw_chassis \u003d self.get_gateway_chassis_binding(lrp_name)"},{"line_number":453,"context_line":"            original_state \u003d copy.copy(actual_gw_chassis)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":456,"context_line":"            # or has been deleted."}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_cf3cd530","line":453,"range":{"start_line":453,"start_character":12,"end_line":453,"end_character":26},"updated":"2020-03-06 11:55:51.000000000","message":"You don\u0027t need copying if you use original_state on L460.\n\n original_state \u003d self.get_gateway_chassis_binding(lrp_name)\n actual_gw_chassis \u003d [chassis for chassis in original_state if ...]","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        for port, physnet in port_physnet_dict.items():"},{"line_number":451,"context_line":"            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)"},{"line_number":452,"context_line":"            actual_gw_chassis \u003d self.get_gateway_chassis_binding(lrp_name)"},{"line_number":453,"context_line":"            original_state \u003d copy.copy(actual_gw_chassis)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":456,"context_line":"            # or has been deleted."}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_44c1a7e4","line":453,"range":{"start_line":453,"start_character":12,"end_line":453,"end_character":26},"in_reply_to":"1fa4df85_cf3cd530","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            f \u003d lambda x, p\u003dphysnet: not utils.is_gateway_chassis_invalid("},{"line_number":458,"context_line":"                    x, all_gw_chassis,"},{"line_number":459,"context_line":"                    p, chassis_with_physnets)"},{"line_number":460,"context_line":"            actual_gw_chassis \u003d list(filter(f, actual_gw_chassis))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"            # Check if gw ports are fully scheduled."},{"line_number":463,"context_line":"            if len(actual_gw_chassis) \u003e\u003d ovn_const.MAX_GW_CHASSIS:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_4f90e54a","line":460,"range":{"start_line":460,"start_character":37,"end_line":460,"end_character":43},"updated":"2020-03-06 11:55:51.000000000","message":"It sucks our pep8 doesn\u0027t catch this :)","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":454,"context_line":""},{"line_number":455,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":456,"context_line":"            # or has been deleted."},{"line_number":457,"context_line":"            f \u003d lambda x, p\u003dphysnet: not utils.is_gateway_chassis_invalid("},{"line_number":458,"context_line":"                    x, all_gw_chassis,"},{"line_number":459,"context_line":"                    p, chassis_with_physnets)"},{"line_number":460,"context_line":"            actual_gw_chassis \u003d list(filter(f, actual_gw_chassis))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"            # Check if gw ports are fully scheduled."},{"line_number":463,"context_line":"            if len(actual_gw_chassis) \u003e\u003d ovn_const.MAX_GW_CHASSIS:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_8fa6ddaa","line":460,"range":{"start_line":457,"start_character":0,"end_line":460,"end_character":66},"updated":"2020-03-06 11:55:51.000000000","message":"actual_gw_chassis \u003d [\n    chassis for chassis in actual_gw_chassis\n    if not utils.is_gateway_chassis_invalid(\n        chassis, all_gw_chassis, physnet, chassis_with_physnet)]","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":454,"context_line":""},{"line_number":455,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":456,"context_line":"            # or has been deleted."},{"line_number":457,"context_line":"            f \u003d lambda x, p\u003dphysnet: not utils.is_gateway_chassis_invalid("},{"line_number":458,"context_line":"                    x, all_gw_chassis,"},{"line_number":459,"context_line":"                    p, chassis_with_physnets)"},{"line_number":460,"context_line":"            actual_gw_chassis \u003d list(filter(f, actual_gw_chassis))"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"            # Check if gw ports are fully scheduled."},{"line_number":463,"context_line":"            if len(actual_gw_chassis) \u003e\u003d ovn_const.MAX_GW_CHASSIS:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_a48c1bd7","line":460,"range":{"start_line":457,"start_character":0,"end_line":460,"end_character":66},"in_reply_to":"1fa4df85_8fa6ddaa","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            # If there are no gateways with \u0027enable-chassis-as-gw\u0027 cms option"},{"line_number":468,"context_line":"            # then try to schedule on all gateways with physnets connected,"},{"line_number":469,"context_line":"            # and filter required physnet."},{"line_number":470,"context_line":"            chassis_on_env \u003d (all_gw_chassis if all_gw_chassis else"},{"line_number":471,"context_line":"                              list(chassis_with_physnets.keys()))"},{"line_number":472,"context_line":"            # Add all gw chassis available in the environment."},{"line_number":473,"context_line":"            available_chassis.update(chassis_on_env)"},{"line_number":474,"context_line":"            # Make sure that already configured chassis are in the set."}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_4fbea5b4","line":471,"range":{"start_line":470,"start_character":12,"end_line":471,"end_character":65},"updated":"2020-03-06 11:55:51.000000000","message":"chassis_on_env \u003d all_gw_chassis or list(chassis_with_physnets.keys())","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            # If there are no gateways with \u0027enable-chassis-as-gw\u0027 cms option"},{"line_number":468,"context_line":"            # then try to schedule on all gateways with physnets connected,"},{"line_number":469,"context_line":"            # and filter required physnet."},{"line_number":470,"context_line":"            chassis_on_env \u003d (all_gw_chassis if all_gw_chassis else"},{"line_number":471,"context_line":"                              list(chassis_with_physnets.keys()))"},{"line_number":472,"context_line":"            # Add all gw chassis available in the environment."},{"line_number":473,"context_line":"            available_chassis.update(chassis_on_env)"},{"line_number":474,"context_line":"            # Make sure that already configured chassis are in the set."}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_8491dff3","line":471,"range":{"start_line":470,"start_character":12,"end_line":471,"end_character":65},"in_reply_to":"1fa4df85_4fbea5b4","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            chassis_on_env \u003d (all_gw_chassis if all_gw_chassis else"},{"line_number":471,"context_line":"                              list(chassis_with_physnets.keys()))"},{"line_number":472,"context_line":"            # Add all gw chassis available in the environment."},{"line_number":473,"context_line":"            available_chassis.update(chassis_on_env)"},{"line_number":474,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":475,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":476,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_4f68e51b","line":473,"range":{"start_line":473,"start_character":12,"end_line":473,"end_character":52},"updated":"2020-03-06 11:55:51.000000000","message":"instead of storing the result in chassis_on_env, you can directly create a set out of it as you don\u0027t need chassis_on_env later.\n\n available_chassis \u003d set(chassis_on_env \u003d all_gw_chassis or chassis_with_physnets.keys())","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            chassis_on_env \u003d (all_gw_chassis if all_gw_chassis else"},{"line_number":471,"context_line":"                              list(chassis_with_physnets.keys()))"},{"line_number":472,"context_line":"            # Add all gw chassis available in the environment."},{"line_number":473,"context_line":"            available_chassis.update(chassis_on_env)"},{"line_number":474,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":475,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":476,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_07a41107","line":473,"range":{"start_line":473,"start_character":12,"end_line":473,"end_character":52},"in_reply_to":"1fa4df85_4f68e51b","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":478,"context_line":"            available_chassis \u003d list(filter(f, available_chassis))"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            if sorted(available_chassis) \u003d\u003d sorted(set(original_state)):"},{"line_number":481,"context_line":"                # The same situation as was before. Nothing"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_cfc93559","line":478,"range":{"start_line":478,"start_character":32,"end_line":478,"end_character":66},"updated":"2020-03-06 11:55:51.000000000","message":"ditto L460","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":478,"context_line":"            available_chassis \u003d list(filter(f, available_chassis))"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            if sorted(available_chassis) \u003d\u003d sorted(set(original_state)):"},{"line_number":481,"context_line":"                # The same situation as was before. Nothing"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_4779a991","line":478,"range":{"start_line":478,"start_character":32,"end_line":478,"end_character":66},"in_reply_to":"1fa4df85_cfc93559","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":478,"context_line":"            available_chassis \u003d list(filter(f, available_chassis))"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            if sorted(available_chassis) \u003d\u003d sorted(set(original_state)):"},{"line_number":481,"context_line":"                # The same situation as was before. Nothing"},{"line_number":482,"context_line":"                # to be rescheduled."},{"line_number":483,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_6fc4c140","line":480,"range":{"start_line":480,"start_character":15,"end_line":480,"end_character":22},"updated":"2020-03-06 11:55:51.000000000","message":"We don\u0027t need this, do we? set is ordered by default","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":478,"context_line":"            available_chassis \u003d list(filter(f, available_chassis))"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            if sorted(available_chassis) \u003d\u003d sorted(set(original_state)):"},{"line_number":481,"context_line":"                # The same situation as was before. Nothing"},{"line_number":482,"context_line":"                # to be rescheduled."},{"line_number":483,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_a7441d48","line":480,"range":{"start_line":480,"start_character":15,"end_line":480,"end_character":22},"in_reply_to":"1fa4df85_6fc4c140","updated":"2020-03-06 16:10:05.000000000","message":"But we convert list to set.\nI can remove it from sorted(set(original_state)).","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"61f833ba8406df532efe64f64aa280eb7f0f5bc2","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":478,"context_line":"            available_chassis \u003d list(filter(f, available_chassis))"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            if sorted(available_chassis) \u003d\u003d sorted(set(original_state)):"},{"line_number":481,"context_line":"                # The same situation as was before. Nothing"},{"line_number":482,"context_line":"                # to be rescheduled."},{"line_number":483,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_737ca382","line":480,"range":{"start_line":480,"start_character":15,"end_line":480,"end_character":22},"in_reply_to":"1fa4df85_6fc4c140","updated":"2020-03-06 18:20:10.000000000","message":"I thought sets were inherently unordered?\n\n\u003e\u003e\u003e set([\"zoo\", \"apple\", \"bob\", \"cart\", \"yellow\", \"donkey\"])\nset([\u0027donkey\u0027, \u0027apple\u0027, \u0027yellow\u0027, \u0027zoo\u0027, \u0027cart\u0027, \u0027bob\u0027])","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            \u0027Gateway_Chassis\u0027, (\u0027chassis_name\u0027, \u0027\u003d\u0027, chassis_name))"},{"line_number":444,"context_line":"        return gw_chassis.execute(check_error\u003dTrue)"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"    def get_unhosted_gateways(self, port_physnet_dict, chassis_with_physnets,"},{"line_number":447,"context_line":"                              all_gw_chassis):"},{"line_number":448,"context_line":"        unhosted_gateways \u003d set()"},{"line_number":449,"context_line":"        for port, physnet in port_physnet_dict.items():"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_4473834e","line":446,"range":{"start_line":446,"start_character":55,"end_line":446,"end_character":76},"updated":"2020-03-13 11:21:22.000000000","message":"Some data about numbers:\n\nchassis_with_physnets - all chassis with physnets\n\nall_gw_chassis - all chassis that have cms option set (so its \u003c\u003d chassis_with_physnets)\n\nport_physnet_dict - if this is triggered by for example: delete chassis event, this is limited to gateway ports that are on this chassis, if new chassis is added to the system - this dict is with LRP ports.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            \u0027Gateway_Chassis\u0027, (\u0027chassis_name\u0027, \u0027\u003d\u0027, chassis_name))"},{"line_number":444,"context_line":"        return gw_chassis.execute(check_error\u003dTrue)"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"    def get_unhosted_gateways(self, port_physnet_dict, chassis_with_physnets,"},{"line_number":447,"context_line":"                              all_gw_chassis):"},{"line_number":448,"context_line":"        unhosted_gateways \u003d set()"},{"line_number":449,"context_line":"        for port, physnet in port_physnet_dict.items():"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_50fcf8b3","line":446,"updated":"2020-03-07 22:13:34.000000000","message":"This looks expensive, but I don\u0027t have a feel for how big port_physnet_dict, chassis_with_physnets, and all_gw_chassis can get, just that get_gateway_chassis_binding is going to be \u003c\u003d 5.\n\nI\u0027m adding some notes on all of the iterations below just to organize my thoughts mostly, since I\u0027m not sure what the actual potential numbers are. I don\u0027t expect responses to each individual one or anything. :)\n\nI tried removing a bit of the redundancy with this:\n\n    def get_unhosted_gateways(self, port_physnet_dict, chassis_with_physnets,\n                              all_gw_chassis):\n        unhosted_gateways \u003d set()\n        for port, physnet in port_physnet_dict.items():\n            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)\n            original_state \u003d set(self.get_gateway_chassis_binding(lrp_name))\n\n            # Filter out chassis that lost physnet, the cms option,\n            # or has been deleted.\n            actual_gw_chassis \u003d set(\n                chassis for chassis in original_state\n                if not utils.is_gateway_chassis_invalid(\n                    chassis, all_gw_chassis, physnet, chassis_with_physnets))\n\n            # Check if gw ports are fully scheduled.\n            if len(actual_gw_chassis) \u003e\u003d ovn_const.MAX_GW_CHASSIS:\n                continue\n\n            # If there are no gateways with \u0027enable-chassis-as-gw\u0027 cms option\n            # then try to schedule on all gateways with physnets connected,\n            # and filter required physnet.\n            available_chassis \u003d {\n                c for c in all_gw_chassis or chassis_with_physnets.keys()\n                if not utils.is_gateway_chassis_invalid(\n                    c, all_gw_chassis, physnet, chassis_with_physnets)}\n            available_chassis.update(actual_gw_chassis)\n\n            if not available_chassis or available_chassis \u003d\u003d original_state:\n                # There is no chassis that could host this gateway or\n                # The same situation as was before. Nothing\n                # to be rescheduled.\n                continue\n            unhosted_gateways.add(lrp_name)\n        return unhosted_gateways\n\nIt\u0027s a little faster, but it doesn\u0027t really address any of the algorithmic issues if any of those lists get big.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    def get_unhosted_gateways(self, port_physnet_dict, chassis_with_physnets,"},{"line_number":447,"context_line":"                              all_gw_chassis):"},{"line_number":448,"context_line":"        unhosted_gateways \u003d set()"},{"line_number":449,"context_line":"        for port, physnet in port_physnet_dict.items():"},{"line_number":450,"context_line":"            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)"},{"line_number":451,"context_line":"            original_state \u003d self.get_gateway_chassis_binding(lrp_name)"},{"line_number":452,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_e733e812","line":449,"updated":"2020-03-07 22:13:34.000000000","message":"Iterates over all ports","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    def get_unhosted_gateways(self, port_physnet_dict, chassis_with_physnets,"},{"line_number":447,"context_line":"                              all_gw_chassis):"},{"line_number":448,"context_line":"        unhosted_gateways \u003d set()"},{"line_number":449,"context_line":"        for port, physnet in port_physnet_dict.items():"},{"line_number":450,"context_line":"            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)"},{"line_number":451,"context_line":"            original_state \u003d self.get_gateway_chassis_binding(lrp_name)"},{"line_number":452,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_241a0717","line":449,"in_reply_to":"1fa4df85_e733e812","updated":"2020-03-13 11:21:22.000000000","message":"It iterates over all *gateway* ports or gateway ports that are impacted on chassis failure.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        unhosted_gateways \u003d set()"},{"line_number":449,"context_line":"        for port, physnet in port_physnet_dict.items():"},{"line_number":450,"context_line":"            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)"},{"line_number":451,"context_line":"            original_state \u003d self.get_gateway_chassis_binding(lrp_name)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":454,"context_line":"            # or has been deleted."}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_872234b8","line":451,"range":{"start_line":451,"start_character":34,"end_line":451,"end_character":61},"updated":"2020-03-07 22:13:34.000000000","message":"Iterates over all Logical ports, then chassis on found port, then the list of those chassis again to remove the priority from _get_logical_router_port_gateway_cahssis","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        unhosted_gateways \u003d set()"},{"line_number":449,"context_line":"        for port, physnet in port_physnet_dict.items():"},{"line_number":450,"context_line":"            lrp_name \u003d \u0027%s%s\u0027 % (ovn_const.LRP_PREFIX, port)"},{"line_number":451,"context_line":"            original_state \u003d self.get_gateway_chassis_binding(lrp_name)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":454,"context_line":"            # or has been deleted."}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_e4294ff2","line":451,"range":{"start_line":451,"start_character":34,"end_line":451,"end_character":61},"in_reply_to":"1fa4df85_872234b8","updated":"2020-03-13 11:21:22.000000000","message":"It iterates over all LRP, not LP, so the scope shouldn\u0027t be that big.\n\nThen for each LRP it gets a LRP row and extracts candidate list and its priorities (max 5 in the list).","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            # Filter out chassis that lost physnet, the cms option,"},{"line_number":454,"context_line":"            # or has been deleted."},{"line_number":455,"context_line":"            actual_gw_chassis \u003d ["},{"line_number":456,"context_line":"                chassis for chassis in original_state"},{"line_number":457,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":458,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_4728bc95","line":455,"updated":"2020-03-07 22:13:34.000000000","message":"iterates over those chassis again","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":454,"context_line":"            # or has been deleted."},{"line_number":455,"context_line":"            actual_gw_chassis \u003d ["},{"line_number":456,"context_line":"                chassis for chassis in original_state"},{"line_number":457,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":458,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"            # Check if gw ports are fully scheduled."}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_e71c4879","line":457,"range":{"start_line":457,"start_character":29,"end_line":457,"end_character":55},"updated":"2020-03-07 22:13:34.000000000","message":"potentially iterates over all_gw_chassis and chassis_physnets for each chassis returned above","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            # then try to schedule on all gateways with physnets connected,"},{"line_number":466,"context_line":"            # and filter required physnet."},{"line_number":467,"context_line":"            available_chassis \u003d set("},{"line_number":468,"context_line":"                all_gw_chassis or list(chassis_with_physnets.keys()))"},{"line_number":469,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":470,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":471,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_072084ab","line":468,"range":{"start_line":468,"start_character":15,"end_line":468,"end_character":69},"updated":"2020-03-07 22:13:34.000000000","message":"another iteration of all_gw_chassis\n\nalso, you don\u0027t need to convert keys() to list here, because it just needs to be iterable for set()","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            # then try to schedule on all gateways with physnets connected,"},{"line_number":466,"context_line":"            # and filter required physnet."},{"line_number":467,"context_line":"            available_chassis \u003d set("},{"line_number":468,"context_line":"                all_gw_chassis or list(chassis_with_physnets.keys()))"},{"line_number":469,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":470,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":471,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_c4f693fa","line":468,"range":{"start_line":468,"start_character":15,"end_line":468,"end_character":69},"in_reply_to":"1fa4df85_072084ab","updated":"2020-03-13 11:21:22.000000000","message":"You\u0027re right about convert keys() to list, its not needed.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":469,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":470,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":473,"context_line":"            available_chassis \u003d ["},{"line_number":474,"context_line":"                chassis for chassis in available_chassis"},{"line_number":475,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":476,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_67105858","line":473,"range":{"start_line":472,"start_character":34,"end_line":473,"end_character":13},"updated":"2020-03-07 22:13:34.000000000","message":"List comprehension when could be a set comprehension so it doesn\u0027t need to be converted back to a set again for comparison later.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":469,"context_line":"            # Make sure that already configured chassis are in the set."},{"line_number":470,"context_line":"            available_chassis.update(actual_gw_chassis)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":473,"context_line":"            available_chassis \u003d ["},{"line_number":474,"context_line":"                chassis for chassis in available_chassis"},{"line_number":475,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":476,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_c4a8d3dc","line":473,"range":{"start_line":472,"start_character":34,"end_line":473,"end_character":13},"in_reply_to":"1fa4df85_67105858","updated":"2020-03-13 11:21:22.000000000","message":"You\u0027re right. I\u0027ll do set comprehension here.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":472,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":473,"context_line":"            available_chassis \u003d ["},{"line_number":474,"context_line":"                chassis for chassis in available_chassis"},{"line_number":475,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":476,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"            if set(available_chassis) \u003d\u003d set(original_state):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_47019c05","line":475,"range":{"start_line":475,"start_character":23,"end_line":475,"end_character":55},"updated":"2020-03-07 22:13:34.000000000","message":"potentially iterates over all_gw_chassis and chassis_physnets for each chassis above, which could be all_gw_chassis, so O(n^2) for all_gw_chassis (* ports).","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"91487b5e80f79b8de5e857daee5a57f3c7c848b0","unresolved":false,"context_lines":[{"line_number":472,"context_line":"            # Filter out not suitable chassis for this gw port."},{"line_number":473,"context_line":"            available_chassis \u003d ["},{"line_number":474,"context_line":"                chassis for chassis in available_chassis"},{"line_number":475,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":476,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"            if set(available_chassis) \u003d\u003d set(original_state):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_44f9434b","line":475,"range":{"start_line":475,"start_character":23,"end_line":475,"end_character":55},"in_reply_to":"1fa4df85_47019c05","updated":"2020-03-13 11:21:22.000000000","message":"You\u0027re right. That has been *partially* fixed by filtering invalid chassis while setting available_chassis set.","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d774525ef4f420b42d8dc5a924d5425cd0bfb7d1","unresolved":false,"context_lines":[{"line_number":475,"context_line":"                if not utils.is_gateway_chassis_invalid("},{"line_number":476,"context_line":"                    chassis, all_gw_chassis, physnet, chassis_with_physnets)]"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"            if set(available_chassis) \u003d\u003d set(original_state):"},{"line_number":479,"context_line":"                # The same situation as was before. Nothing"},{"line_number":480,"context_line":"                # to be rescheduled."},{"line_number":481,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_022e3291","line":478,"range":{"start_line":478,"start_character":15,"end_line":478,"end_character":18},"updated":"2020-03-07 22:13:34.000000000","message":"unnecessary w/ suggestion above for set comprehension","commit_id":"b3299e6e8b2c1e95e608bc70c70e82c406a4b08a"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e6554439ae268fe6ac7e41d0e7054da4546f5b4d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_355e9a14","line":82,"range":{"start_line":81,"start_character":12,"end_line":82,"end_character":71},"updated":"2020-02-04 12:57:02.000000000","message":"If the health checks are enabled the external_id field: neutron:liveness_check_at is always updated.\nIn order to filter that case:\n1) I check if there is a change in ovn-bridge-mappings\n2) I check if there is a change in CMS options (enable_as_gw_chassis).","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"9ec3d524855ffaabe4c2c59bbcc4be6960c443f2","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_273ae296","line":82,"range":{"start_line":81,"start_character":12,"end_line":82,"end_character":71},"in_reply_to":"3fa7e38b_331b0f1e","updated":"2020-02-05 09:17:41.000000000","message":"Yes, so for now I would stay with this convention.\nCan we try to fix this in ovsdbapp after? From the other perspective I don\u0027t know if by fixing it we would break something else in other side.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"796d86b4c53002ccf5b96bfb2641a50b8a6b2ff6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a6cca296","line":82,"range":{"start_line":81,"start_character":12,"end_line":82,"end_character":71},"in_reply_to":"3fa7e38b_355e9a14","updated":"2020-02-04 16:20:13.000000000","message":"It shouldn\u0027t be possible for old/row values to ever match since old contains only the old values that were changed by the transaction and nothing else (hence catching AttributeError/KeyError). Checking that a value exists in old is sufficient for seeing if something changed.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"25cd1a00dd1e5fb0d430fef252ec1be219fada08","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_331b0f1e","line":82,"range":{"start_line":81,"start_character":12,"end_line":82,"end_character":71},"in_reply_to":"3fa7e38b_a17d6c71","updated":"2020-02-04 21:50:58.000000000","message":"Huh. Thanks for the heads-up and sorry for the misdirection. :) Could have sworn it used to only show the changed keys, but clearly it doesn\u0027t now anyway.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"ca2c4566c2b208acd17b0999737bd97698983ec3","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a17d6c71","line":82,"range":{"start_line":81,"start_character":12,"end_line":82,"end_character":71},"in_reply_to":"3fa7e38b_a6cca296","updated":"2020-02-04 16:25:33.000000000","message":"Please take a look. Thats from my devstack.\n\nThe old contains the whole external_ids dict even only the value for \u0027neutron:liveness_check_at\u0027 has changed.\n\nSo I needed do it this way, because previously [1] it matched all the time.\n\n[1] https://review.opendev.org/#/c/705331/1/networking_ovn/ovsdb/ovsdb_monitor.py\n\n\n(Pdb++) old.external_ids\n{\u0027datapath-type\u0027: \u0027\u0027, \u0027iface-types\u0027: \u0027erspan,geneve,gre,internal,ip6erspan,ip6gre,lisp,patch,stt,system,tap,vxlan\u0027, \u0027is-interconn\u0027: \u0027false\u0027, \u0027neutron:liveness_check_at\u0027: \u00272020-02-04T11:06:43.228834+00:00\u0027, \u0027ovn-bridge-mappings\u0027: \u0027public:br-ex\u0027, \u0027ovn-chassis-mac-mappings\u0027: \u0027\u0027, \u0027ovn-cms-options\u0027: \u0027enable-chassis-as-gw\u0027}\n\n(Pdb++) row.external_ids\n{\u0027datapath-type\u0027: \u0027\u0027, \u0027iface-types\u0027: \u0027erspan,geneve,gre,internal,ip6erspan,ip6gre,lisp,patch,stt,system,tap,vxlan\u0027, \u0027is-interconn\u0027: \u0027false\u0027, \u0027neutron:liveness_check_at\u0027: \u00272020-02-04T11:35:42.448380+00:00\u0027, \u0027ovn-bridge-mappings\u0027: \u0027public:br-ex\u0027, \u0027ovn-chassis-mac-mappings\u0027: \u0027\u0027, \u0027ovn-cms-options\u0027: \u0027enable-chassis-as-gw\u0027}\n\n\nThe only difference here is the \u0027neutron:liveness_check_at\u0027.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"796d86b4c53002ccf5b96bfb2641a50b8a6b2ff6","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except (AttributeError, KeyError):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_c6cf5e88","line":84,"updated":"2020-02-04 16:20:13.000000000","message":"same","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"25cd1a00dd1e5fb0d430fef252ec1be219fada08","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except (AttributeError, KeyError):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e7161158","line":84,"in_reply_to":"3fa7e38b_c6cf5e88","updated":"2020-02-04 21:50:58.000000000","message":"You don\u0027t want to get fancy? :p\n\n return operator.ne(*map(utils.is_gateway_chassis, [old, row]))\n\n(I joke, no one should ever do this)","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"77aed2bc541458111eb6b0b5b23f1e3bdbff99d1","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except (AttributeError, KeyError):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_c710ae4f","line":84,"in_reply_to":"3fa7e38b_e7161158","updated":"2020-02-05 09:11:24.000000000","message":"Wow that look cool actually! :D","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"25cd1a00dd1e5fb0d430fef252ec1be219fada08","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except (AttributeError, KeyError):"},{"line_number":88,"context_line":"            return False"},{"line_number":89,"context_line":"        return False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_423a73c5","line":87,"range":{"start_line":87,"start_character":32,"end_line":87,"end_character":40},"updated":"2020-02-04 21:50:58.000000000","message":"Can we still get a KeyError anywhere since using get() with defaults here and in is_gateway_chassis?","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"77aed2bc541458111eb6b0b5b23f1e3bdbff99d1","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except (AttributeError, KeyError):"},{"line_number":88,"context_line":"            return False"},{"line_number":89,"context_line":"        return False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_47a11ef6","line":87,"range":{"start_line":87,"start_character":32,"end_line":87,"end_character":40},"in_reply_to":"3fa7e38b_423a73c5","updated":"2020-02-05 09:11:24.000000000","message":"No. Thanks. I\u0027ll remove it. ++","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"ca2c4566c2b208acd17b0999737bd97698983ec3","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self.driver.update_segment_host_mapping(host, phy_nets)"},{"line_number":101,"context_line":"        if utils.is_ovn_l3(self.l3_plugin):"},{"line_number":102,"context_line":"            self.l3_plugin.schedule_unhosted_gateways()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class PortBindingChassisUpdateEvent(row_event.RowEvent):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f54d6293","line":102,"range":{"start_line":102,"start_character":27,"end_line":102,"end_character":53},"updated":"2020-02-04 16:25:33.000000000","message":"If row update/delete we could add it chassis name to limit impacted ports.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"25cd1a00dd1e5fb0d430fef252ec1be219fada08","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self.driver.update_segment_host_mapping(host, phy_nets)"},{"line_number":101,"context_line":"        if utils.is_ovn_l3(self.l3_plugin):"},{"line_number":102,"context_line":"            self.l3_plugin.schedule_unhosted_gateways()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class PortBindingChassisUpdateEvent(row_event.RowEvent):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_22b4171d","line":102,"range":{"start_line":102,"start_character":27,"end_line":102,"end_character":53},"in_reply_to":"3fa7e38b_f54d6293","updated":"2020-02-04 21:50:58.000000000","message":"Sounds useful.","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_a1b60926","line":81,"range":{"start_line":81,"start_character":58,"end_line":81,"end_character":64},"updated":"2020-02-17 18:52:53.000000000","message":"This is the default value, you don\u0027t need to specify it.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_4f5e60e7","line":81,"range":{"start_line":81,"start_character":58,"end_line":81,"end_character":64},"in_reply_to":"3fa7e38b_a1b60926","updated":"2020-02-24 12:04:58.000000000","message":"ah right","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_612ed15c","line":82,"range":{"start_line":82,"start_character":64,"end_line":82,"end_character":68},"updated":"2020-02-17 18:52:53.000000000","message":"ditto","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_0f706872","line":82,"range":{"start_line":82,"start_character":64,"end_line":82,"end_character":68},"in_reply_to":"3fa7e38b_612ed15c","updated":"2020-02-24 12:04:58.000000000","message":"also right :)","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_415635d0","line":83,"updated":"2020-02-17 18:52:53.000000000","message":"Sorry, I don\u0027t understand this check. Why is this needed??\n\nThanks in advance!","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027, None) !\u003d"},{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027, None)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_2f276467","line":83,"in_reply_to":"3fa7e38b_415635d0","updated":"2020-02-24 12:04:58.000000000","message":"If there is a difference in ovn-bridge mappings between old chassis state and new chassis state that (potentially) we need to recalculate gateway chassis. Perhaps a provider network has gone from one chassis and we need to move gateways.\n\nIn that condition match_fn() matches and we can go.\n\nWe have in the meantime a lof of ChassisEvent generated by health monitor, mostly about updating ovn_const.OVN_LIVENESS_CHECK_EXT_ID_KEY field in chassis.external_ids. In such condition we can skip this event handling.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":109,"context_line":"            elif event \u003d\u003d self.ROW_UPDATE:"},{"line_number":110,"context_line":"                old_mappings \u003d old.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":111,"context_line":"                                                    None)"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    None)"},{"line_number":114,"context_line":"                for mapping in old_mappings.split(\u0027,\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_8133cdc3","line":111,"range":{"start_line":111,"start_character":52,"end_line":111,"end_character":56},"updated":"2020-02-17 18:52:53.000000000","message":"ditto","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":109,"context_line":"            elif event \u003d\u003d self.ROW_UPDATE:"},{"line_number":110,"context_line":"                old_mappings \u003d old.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":111,"context_line":"                                                    None)"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    None)"},{"line_number":114,"context_line":"                for mapping in old_mappings.split(\u0027,\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_afefd4e7","line":111,"range":{"start_line":111,"start_character":52,"end_line":111,"end_character":56},"in_reply_to":"3fa7e38b_8133cdc3","updated":"2020-02-24 12:04:58.000000000","message":"++","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                old_mappings \u003d old.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":111,"context_line":"                                                    None)"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    None)"},{"line_number":114,"context_line":"                for mapping in old_mappings.split(\u0027,\u0027):"},{"line_number":115,"context_line":"                    if mapping not in new_mappings:"},{"line_number":116,"context_line":"                        kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_2138d99c","line":113,"range":{"start_line":113,"start_character":52,"end_line":113,"end_character":56},"updated":"2020-02-17 18:52:53.000000000","message":"ditto","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                old_mappings \u003d old.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":111,"context_line":"                                                    None)"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    None)"},{"line_number":114,"context_line":"                for mapping in old_mappings.split(\u0027,\u0027):"},{"line_number":115,"context_line":"                    if mapping not in new_mappings:"},{"line_number":116,"context_line":"                        kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_cfec90f5","line":113,"range":{"start_line":113,"start_character":52,"end_line":113,"end_character":56},"in_reply_to":"3fa7e38b_2138d99c","updated":"2020-02-24 12:04:58.000000000","message":"++","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                                    None)"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    None)"},{"line_number":114,"context_line":"                for mapping in old_mappings.split(\u0027,\u0027):"},{"line_number":115,"context_line":"                    if mapping not in new_mappings:"},{"line_number":116,"context_line":"                        kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":117,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_a14b6927","line":114,"range":{"start_line":114,"start_character":31,"end_line":114,"end_character":43},"updated":"2020-02-17 18:52:53.000000000","message":"Be careful: this could be None. You need to check this first.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                                    None)"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    None)"},{"line_number":114,"context_line":"                for mapping in old_mappings.split(\u0027,\u0027):"},{"line_number":115,"context_line":"                    if mapping not in new_mappings:"},{"line_number":116,"context_line":"                        kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":117,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_ef7cec21","line":114,"range":{"start_line":114,"start_character":31,"end_line":114,"end_character":43},"in_reply_to":"3fa7e38b_a14b6927","updated":"2020-02-24 12:04:58.000000000","message":"Yes, you\u0027re right Rodolfo, Thanks for having eyes open!","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except AttributeError:"},{"line_number":88,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_6fe361a5","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":35},"updated":"2020-03-06 11:55:51.000000000","message":"if f(old) !\u003d f(row)","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":83,"context_line":"                return True"},{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except AttributeError:"},{"line_number":88,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_87b7a13a","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":35},"in_reply_to":"1fa4df85_6fe361a5","updated":"2020-03-06 16:10:05.000000000","message":"Done","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except AttributeError:"},{"line_number":88,"context_line":"            return False"},{"line_number":89,"context_line":"        return False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_efe8b17c","line":87,"range":{"start_line":87,"start_character":15,"end_line":87,"end_character":29},"updated":"2020-03-06 11:55:51.000000000","message":"This is for cases where chassis row doesn\u0027t have external_ids? It always does, doesn\u0027t it?","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            f \u003d utils.is_gateway_chassis"},{"line_number":85,"context_line":"            if not f(old) \u003d\u003d f(row):"},{"line_number":86,"context_line":"                return True"},{"line_number":87,"context_line":"        except AttributeError:"},{"line_number":88,"context_line":"            return False"},{"line_number":89,"context_line":"        return False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_e439b3d6","line":87,"range":{"start_line":87,"start_character":15,"end_line":87,"end_character":29},"in_reply_to":"1fa4df85_efe8b17c","updated":"2020-03-06 16:10:05.000000000","message":"Thanks, you\u0027re right!\n\n1) It does, its in schema\n2) It shouldn\u0027t raise AttributeError due to logic in:\nhttps://github.com/openstack/neutron/blob/master/neutron/common/ovn/utils.py#L453","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # deleted we can limit the scope and"},{"line_number":104,"context_line":"            # reschedule only ports from this chassis."},{"line_number":105,"context_line":"            # In other cases we need to reschedule all gw ports."},{"line_number":106,"context_line":"            kwargs \u003d {}"},{"line_number":107,"context_line":"            if event \u003d\u003d self.ROW_DELETE:"},{"line_number":108,"context_line":"                kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":109,"context_line":"            elif event \u003d\u003d self.ROW_UPDATE:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_4f69c5f6","line":106,"range":{"start_line":106,"start_character":12,"end_line":106,"end_character":23},"updated":"2020-03-06 11:55:51.000000000","message":"How about:\n\n event_from_chassis \u003d None\n\nand then set it if needed. Seems like there is always only this parameter.","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # deleted we can limit the scope and"},{"line_number":104,"context_line":"            # reschedule only ports from this chassis."},{"line_number":105,"context_line":"            # In other cases we need to reschedule all gw ports."},{"line_number":106,"context_line":"            kwargs \u003d {}"},{"line_number":107,"context_line":"            if event \u003d\u003d self.ROW_DELETE:"},{"line_number":108,"context_line":"                kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":109,"context_line":"            elif event \u003d\u003d self.ROW_UPDATE:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_64a143f8","line":106,"range":{"start_line":106,"start_character":12,"end_line":106,"end_character":23},"in_reply_to":"1fa4df85_4f69c5f6","updated":"2020-03-06 16:10:05.000000000","message":"Ok, that is fine!","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a202dd8f872a15dc2ed58c2199416e1de3d91bbf","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":109,"context_line":"            elif event \u003d\u003d self.ROW_UPDATE:"},{"line_number":110,"context_line":"                old_mappings \u003d old.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":111,"context_line":"                                                    set()) or set()"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    set()) or set()"},{"line_number":114,"context_line":"                if old_mappings:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_af8b99c0","line":111,"range":{"start_line":111,"start_character":52,"end_line":111,"end_character":67},"updated":"2020-03-06 11:55:51.000000000","message":"Does it mean ovn-bridge-mappings can be set to None and it\u0027s a valid value?","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e291689d9e50220927fff1b3e1125d9e28e88aa4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                kwargs \u003d {\u0027event_from_chassis\u0027: row.name}"},{"line_number":109,"context_line":"            elif event \u003d\u003d self.ROW_UPDATE:"},{"line_number":110,"context_line":"                old_mappings \u003d old.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":111,"context_line":"                                                    set()) or set()"},{"line_number":112,"context_line":"                new_mappings \u003d row.external_ids.get(\u0027ovn-bridge-mappings\u0027,"},{"line_number":113,"context_line":"                                                    set()) or set()"},{"line_number":114,"context_line":"                if old_mappings:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_aa15c741","line":111,"range":{"start_line":111,"start_character":52,"end_line":111,"end_character":67},"in_reply_to":"1fa4df85_af8b99c0","updated":"2020-03-06 16:10:05.000000000","message":"We cover two situations here:\n\n1) ovn-bridge-mappings could be not set at all - there is no connectivity to external nets, then we\u0027ll use set()\n\nand \n\n2) ovn-bridge-mappings could be set as empty string, so that we should also set it to set()","commit_id":"72dd2a0fce240588658d68cd52ae903b11b54222"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"b5ee3f9baf3f95464a9325585e84c99888be6d53","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        super(ChassisEvent, self).__init__(events, table, None)"},{"line_number":74,"context_line":"        self.event_name \u003d \u0027ChassisEvent\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def handle_ha_chassis_group_changes(self, event, row, old):"},{"line_number":77,"context_line":"        \"\"\"Handle HA Chassis Group changes."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        This method handles the inclusion and removal of Chassis to/from"},{"line_number":80,"context_line":"        the default HA Chassis Group."},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        if not self.driver._ovn_client.is_external_ports_supported():"},{"line_number":83,"context_line":"            return"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        is_gw_chassis \u003d utils.is_gateway_chassis(row)"},{"line_number":86,"context_line":"        # If the Chassis being created is not a gateway, ignore it"},{"line_number":87,"context_line":"        if not is_gw_chassis and event \u003d\u003d self.ROW_CREATE:"},{"line_number":88,"context_line":"            return"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if event \u003d\u003d self.ROW_UPDATE:"},{"line_number":91,"context_line":"            is_old_gw \u003d utils.is_gateway_chassis(old)"},{"line_number":92,"context_line":"            if is_gw_chassis and is_old_gw:"},{"line_number":93,"context_line":"                return"},{"line_number":94,"context_line":"            elif not is_gw_chassis and is_old_gw:"},{"line_number":95,"context_line":"                # Chassis is not a gateway anymore, treat it as deletion"},{"line_number":96,"context_line":"                event \u003d self.ROW_DELETE"},{"line_number":97,"context_line":"            elif is_gw_chassis and not is_old_gw:"},{"line_number":98,"context_line":"                # Chassis is now a gateway, treat it as creation"},{"line_number":99,"context_line":"                event \u003d self.ROW_CREATE"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        if event \u003d\u003d self.ROW_CREATE:"},{"line_number":102,"context_line":"            default_group \u003d self.driver._nb_ovn.ha_chassis_group_get("},{"line_number":103,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME).execute("},{"line_number":104,"context_line":"                check_error\u003dTrue)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":107,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":108,"context_line":"            min_priority \u003d min("},{"line_number":109,"context_line":"                [ch.priority for ch in default_group.ha_chassis],"},{"line_number":110,"context_line":"                default\u003dovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":113,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"},{"line_number":114,"context_line":"                priority\u003dmin_priority - 1).execute(check_error\u003dTrue)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        elif event \u003d\u003d self.ROW_DELETE:"},{"line_number":117,"context_line":"            self.driver._nb_ovn.ha_chassis_group_del_chassis("},{"line_number":118,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME,"},{"line_number":119,"context_line":"                row.name, if_exists\u003dTrue).execute(check_error\u003dTrue)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":122,"context_line":"        if event !\u003d self.ROW_UPDATE:"},{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":125,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":126,"context_line":"            return True"},{"line_number":127,"context_line":"        f \u003d utils.is_gateway_chassis"},{"line_number":128,"context_line":"        return f(old) !\u003d f(row)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def run(self, event, row, old):"},{"line_number":131,"context_line":"        host \u003d row.hostname"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_9cb2d905","line":128,"range":{"start_line":76,"start_character":0,"end_line":128,"end_character":31},"updated":"2020-03-19 12:32:15.000000000","message":"Hey Lucas! I needed to rebase because the HA chassis group patch landed first :)\n\nCan you please take a look if the match_fn() will break your stuff? Thanks!","commit_id":"ebe09aa16fc4c033fd045748203abec48d52c563"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e1acfef361c49cdc124923e903d97c3771a0510e","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        super(ChassisEvent, self).__init__(events, table, None)"},{"line_number":74,"context_line":"        self.event_name \u003d \u0027ChassisEvent\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def handle_ha_chassis_group_changes(self, event, row, old):"},{"line_number":77,"context_line":"        \"\"\"Handle HA Chassis Group changes."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        This method handles the inclusion and removal of Chassis to/from"},{"line_number":80,"context_line":"        the default HA Chassis Group."},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        if not self.driver._ovn_client.is_external_ports_supported():"},{"line_number":83,"context_line":"            return"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        is_gw_chassis \u003d utils.is_gateway_chassis(row)"},{"line_number":86,"context_line":"        # If the Chassis being created is not a gateway, ignore it"},{"line_number":87,"context_line":"        if not is_gw_chassis and event \u003d\u003d self.ROW_CREATE:"},{"line_number":88,"context_line":"            return"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if event \u003d\u003d self.ROW_UPDATE:"},{"line_number":91,"context_line":"            is_old_gw \u003d utils.is_gateway_chassis(old)"},{"line_number":92,"context_line":"            if is_gw_chassis and is_old_gw:"},{"line_number":93,"context_line":"                return"},{"line_number":94,"context_line":"            elif not is_gw_chassis and is_old_gw:"},{"line_number":95,"context_line":"                # Chassis is not a gateway anymore, treat it as deletion"},{"line_number":96,"context_line":"                event \u003d self.ROW_DELETE"},{"line_number":97,"context_line":"            elif is_gw_chassis and not is_old_gw:"},{"line_number":98,"context_line":"                # Chassis is now a gateway, treat it as creation"},{"line_number":99,"context_line":"                event \u003d self.ROW_CREATE"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        if event \u003d\u003d self.ROW_CREATE:"},{"line_number":102,"context_line":"            default_group \u003d self.driver._nb_ovn.ha_chassis_group_get("},{"line_number":103,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME).execute("},{"line_number":104,"context_line":"                check_error\u003dTrue)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":107,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":108,"context_line":"            min_priority \u003d min("},{"line_number":109,"context_line":"                [ch.priority for ch in default_group.ha_chassis],"},{"line_number":110,"context_line":"                default\u003dovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":113,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"},{"line_number":114,"context_line":"                priority\u003dmin_priority - 1).execute(check_error\u003dTrue)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        elif event \u003d\u003d self.ROW_DELETE:"},{"line_number":117,"context_line":"            self.driver._nb_ovn.ha_chassis_group_del_chassis("},{"line_number":118,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME,"},{"line_number":119,"context_line":"                row.name, if_exists\u003dTrue).execute(check_error\u003dTrue)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":122,"context_line":"        if event !\u003d self.ROW_UPDATE:"},{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":125,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":126,"context_line":"            return True"},{"line_number":127,"context_line":"        f \u003d utils.is_gateway_chassis"},{"line_number":128,"context_line":"        return f(old) !\u003d f(row)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def run(self, event, row, old):"},{"line_number":131,"context_line":"        host \u003d row.hostname"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_4216bc4b","line":128,"range":{"start_line":76,"start_character":0,"end_line":128,"end_character":31},"in_reply_to":"1fa4df85_9cb2d905","updated":"2020-03-19 13:30:27.000000000","message":"Let\u0027s wait for the tests but it should be fine since, for ROW_UPDATE, the only case we care is if the new and old \"is_gateway_chassis\" differs (L92-L93) should be useless now.","commit_id":"ebe09aa16fc4c033fd045748203abec48d52c563"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"6eb807b951e15915a876165084a0c20a54bb794d","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":122,"context_line":"        if event !\u003d self.ROW_UPDATE:"},{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":125,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":126,"context_line":"            return True"},{"line_number":127,"context_line":"        f \u003d utils.is_gateway_chassis"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_3d6ca69a","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":28},"updated":"2020-04-02 16:58:46.000000000","message":"if external_ids isn\u0027t updated, but some other column is (e.g. nb_cfg), I think this will throw an AttributeError. And I think the way that ovsdbapp.event.RowEventHandler.matching_events() is written, this means that any events watched after this event will actually skip getting matched for this event.\n\nCould do\n\n getattr(old, \u0027external_ids\u0027, {}).get(...) !\u003d row.external_ids...\n\nor in general we could start doing checks in update events like:\n\n if not hasattr(old, \u0027thing_we_care_about\u0027);\n     return False\n\nI should probably convert matching_events() to a for loop w/ exception handling just in case there are other cases where this might happen. Treat exceptions as False and LOG_DEBUG them.","commit_id":"db2c8b85c81f54742f2fa2f72f81487ef2c42b5a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"8d68a6ed4d3c7538ecc94402cbcf54c41f9e17ac","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":122,"context_line":"        if event !\u003d self.ROW_UPDATE:"},{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":125,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":126,"context_line":"            return True"},{"line_number":127,"context_line":"        f \u003d utils.is_gateway_chassis"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_cb520235","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":28},"in_reply_to":"df33271e_3d6ca69a","updated":"2020-04-03 12:21:11.000000000","message":"Ok thanks for the info. I\u0027m gonna update the code to add check if external_ids are there.","commit_id":"db2c8b85c81f54742f2fa2f72f81487ef2c42b5a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9944c359f0faa30f65e8b37dfafa1635b501cf9a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        # NOTE(lucasgomes): If the external_ids column wasn\u0027t updated"},{"line_number":125,"context_line":"        # (meaning, Chassis \"gateway\" status didn\u0027t change) just returns"},{"line_number":126,"context_line":"        if not hasattr(old, \u0027external_ids\u0027) and event \u003d\u003d self.ROW_UPDATE:"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":129,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_b59d5859","line":126,"range":{"start_line":126,"start_character":44,"end_line":126,"end_character":72},"updated":"2020-04-03 15:03:24.000000000","message":"nit: not needed since L122 already asserts that the event is going to be ROW_UPDATE :D","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"71c8775a109e2199fb834fcb04799bedbd93913e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        # NOTE(lucasgomes): If the external_ids column wasn\u0027t updated"},{"line_number":125,"context_line":"        # (meaning, Chassis \"gateway\" status didn\u0027t change) just returns"},{"line_number":126,"context_line":"        if not hasattr(old, \u0027external_ids\u0027) and event \u003d\u003d self.ROW_UPDATE:"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":129,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_776bb41e","line":126,"range":{"start_line":126,"start_character":44,"end_line":126,"end_character":72},"in_reply_to":"df33271e_b59d5859","updated":"2020-04-06 07:32:46.000000000","message":"Ah right :) I\u0027ll update it if I\u0027ll need recheck :D","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"41ed7b03b224b413a539fa81020fd158d631f712","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            return True"},{"line_number":124,"context_line":"        # NOTE(lucasgomes): If the external_ids column wasn\u0027t updated"},{"line_number":125,"context_line":"        # (meaning, Chassis \"gateway\" status didn\u0027t change) just returns"},{"line_number":126,"context_line":"        if not hasattr(old, \u0027external_ids\u0027) and event \u003d\u003d self.ROW_UPDATE:"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":129,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_6d2940f1","line":126,"range":{"start_line":126,"start_character":44,"end_line":126,"end_character":72},"in_reply_to":"df33271e_b59d5859","updated":"2020-04-03 18:33:50.000000000","message":"Right!","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"}],"neutron/services/ovn_l3/plugin.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"796d86b4c53002ccf5b96bfb2641a50b8a6b2ff6","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                self._plugin.update_port_status(context, port[\u0027id\u0027], status)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def schedule_unhosted_gateways(self, event_from_chassis\u003dNone):"},{"line_number":319,"context_line":"        # GW ports and its physnets."},{"line_number":320,"context_line":"        port_physnet_dict \u003d self._get_gateway_port_physnet_mapping()"},{"line_number":321,"context_line":"        # All chassis with physnets configured."},{"line_number":322,"context_line":"        chassis_with_physnets \u003d self._sb_ovn.get_chassis_and_physnets()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e6be1aae","line":319,"updated":"2020-02-04 16:20:13.000000000","message":"It took me a minute to realize this is just all comments and renamed variables. Makes it a bit tougher to review when there\u0027s no functional differences. :) It doesn\u0027t look like anything is done with event_from_chassis argument?","commit_id":"850ee194d941c6b14667fc679739da0c3bb54cf9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"2463a7287350981174b7ad53c70fc81c3aaff979","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        chassis_with_physnets \u003d self._sb_ovn.get_chassis_and_physnets()"},{"line_number":338,"context_line":"        # All chassis with enable_as_gw_chassis set"},{"line_number":339,"context_line":"        all_gw_chassis \u003d self._sb_ovn.get_gateway_chassis_from_cms_options()"},{"line_number":340,"context_line":"        # NOTE(mjozefcz): It pass all gw ports, consider filtering it"},{"line_number":341,"context_line":"        # by updated/deleted chassis name, if this function was"},{"line_number":342,"context_line":"        # invoked by ChassisEvent."},{"line_number":343,"context_line":"        unhosted_gateways \u003d self._ovn.get_unhosted_gateways("},{"line_number":344,"context_line":"            port_physnet_dict, chassis_with_physnets,"},{"line_number":345,"context_line":"            all_gw_chassis)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_b68ef430","line":342,"range":{"start_line":340,"start_character":0,"end_line":342,"end_character":34},"updated":"2020-02-05 22:07:31.000000000","message":"This comment now should be deleted.","commit_id":"847b37db7586811aa7e917179dc9da945e42eb1e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        port_physnet_dict \u003d self._get_gateway_port_physnet_mapping()"},{"line_number":321,"context_line":"        # Filter out unwanted ports in case of event."},{"line_number":322,"context_line":"        if event_from_chassis:"},{"line_number":323,"context_line":"            gw_chassis \u003d self._ovn.db_find_rows("},{"line_number":324,"context_line":"                \u0027Gateway_Chassis\u0027, (\u0027chassis_name\u0027, \u0027\u003d\u0027, event_from_chassis))"},{"line_number":325,"context_line":"            gw_chassis \u003d gw_chassis.execute(check_error\u003dTrue)"},{"line_number":326,"context_line":"            if not gw_chassis:"},{"line_number":327,"context_line":"                return"},{"line_number":328,"context_line":"            ports_impacted \u003d [g.name.split(\u0027_\u0027)[0][len(ovn_const.LRP_PREFIX):]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_81cf4d89","line":325,"range":{"start_line":323,"start_character":12,"end_line":325,"end_character":61},"updated":"2020-02-17 18:52:53.000000000","message":"Should this logic be here or in impl_idl_ovn? I\u0027m saying this because the OvsdbNbOvnIdl implementation should not be exposed in the L3 plugin.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        port_physnet_dict \u003d self._get_gateway_port_physnet_mapping()"},{"line_number":321,"context_line":"        # Filter out unwanted ports in case of event."},{"line_number":322,"context_line":"        if event_from_chassis:"},{"line_number":323,"context_line":"            gw_chassis \u003d self._ovn.db_find_rows("},{"line_number":324,"context_line":"                \u0027Gateway_Chassis\u0027, (\u0027chassis_name\u0027, \u0027\u003d\u0027, event_from_chassis))"},{"line_number":325,"context_line":"            gw_chassis \u003d gw_chassis.execute(check_error\u003dTrue)"},{"line_number":326,"context_line":"            if not gw_chassis:"},{"line_number":327,"context_line":"                return"},{"line_number":328,"context_line":"            ports_impacted \u003d [g.name.split(\u0027_\u0027)[0][len(ovn_const.LRP_PREFIX):]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_ef5e2c44","line":325,"range":{"start_line":323,"start_character":12,"end_line":325,"end_character":61},"in_reply_to":"3fa7e38b_81cf4d89","updated":"2020-02-24 12:04:58.000000000","message":"Yes, you\u0027re right. This code should be in impl_idl_ovn. Moving it.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30f924d9338e0348788b511dc7d1f299cfe78559","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            gw_chassis \u003d gw_chassis.execute(check_error\u003dTrue)"},{"line_number":326,"context_line":"            if not gw_chassis:"},{"line_number":327,"context_line":"                return"},{"line_number":328,"context_line":"            ports_impacted \u003d [g.name.split(\u0027_\u0027)[0][len(ovn_const.LRP_PREFIX):]"},{"line_number":329,"context_line":"                              for g in gw_chassis]"},{"line_number":330,"context_line":"            port_physnet_dict \u003d {"},{"line_number":331,"context_line":"                k: v"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_01727d4c","line":328,"range":{"start_line":328,"start_character":30,"end_line":328,"end_character":77},"updated":"2020-02-17 18:52:53.000000000","message":"Sorry, can you point me to the logic creating the port name for a chassis? Because it\u0027s no easy to read it and, IMO, there could be some util methods in common.ovn.utils to convert to and retrieve from.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3b0c8a11447ebc92731966c8cf824c480e40453a","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            gw_chassis \u003d gw_chassis.execute(check_error\u003dTrue)"},{"line_number":326,"context_line":"            if not gw_chassis:"},{"line_number":327,"context_line":"                return"},{"line_number":328,"context_line":"            ports_impacted \u003d [g.name.split(\u0027_\u0027)[0][len(ovn_const.LRP_PREFIX):]"},{"line_number":329,"context_line":"                              for g in gw_chassis]"},{"line_number":330,"context_line":"            port_physnet_dict \u003d {"},{"line_number":331,"context_line":"                k: v"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_2259bbfd","line":328,"range":{"start_line":328,"start_character":30,"end_line":328,"end_character":77},"in_reply_to":"3fa7e38b_01727d4c","updated":"2020-02-24 12:04:58.000000000","message":"Yes, its a bit tricky.\nFor each gateway chassis there is a row:\n\n\n_uuid               : 508981af-2c57-402d-a28c-b64fb7a9744d\nchassis_name        : mjozefcz-rescheduling-chassis-2\nexternal_ids        : {}\nname                : lrp-0eb54a55-8564-46cc-86e2-06296951ca3f_mjozefcz-rescheduling-chassis-2\noptions             : {}\npriority            : 3\n\n\nWhere name is, prefix lrp-\u003crouter_port_id\u003e-\u003cchassis_name\u003e.\n\nIm looking for solution.","commit_id":"4d13ecf15796e02ecf0c86d4260d11c81699e553"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"a225aae6ef6f2e426d20eb693655f8d1a5e9d28f","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def schedule_unhosted_gateways(self, event_from_chassis\u003dNone):"},{"line_number":322,"context_line":"        # GW ports and its physnets."},{"line_number":323,"context_line":"        port_physnet_dict \u003d self._get_gateway_port_physnet_mapping()"},{"line_number":324,"context_line":"        # Filter out unwanted ports in case of event."},{"line_number":325,"context_line":"        if event_from_chassis:"},{"line_number":326,"context_line":"            gw_chassis \u003d self._ovn.get_chassis_gateways("}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_9eedcc8d","line":323,"range":{"start_line":323,"start_character":8,"end_line":323,"end_character":68},"updated":"2020-04-08 12:55:25.000000000","message":"This seems like a lot of work if we might possibly overwrite it if event_from_chassis? Maybe put it in an else? or wrap in if not event_from_chassis?","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"bf2f5aa563084231af5af148ca5a252c9fdf74f6","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def schedule_unhosted_gateways(self, event_from_chassis\u003dNone):"},{"line_number":322,"context_line":"        # GW ports and its physnets."},{"line_number":323,"context_line":"        port_physnet_dict \u003d self._get_gateway_port_physnet_mapping()"},{"line_number":324,"context_line":"        # Filter out unwanted ports in case of event."},{"line_number":325,"context_line":"        if event_from_chassis:"},{"line_number":326,"context_line":"            gw_chassis \u003d self._ovn.get_chassis_gateways("}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_b2a6a552","line":323,"range":{"start_line":323,"start_character":8,"end_line":323,"end_character":68},"in_reply_to":"df33271e_9eedcc8d","updated":"2020-04-08 13:15:17.000000000","message":"If there is event_from_chassis, meaning chassis lost physnet, we need to reschedule its gateways to the other available chassis.\n\nWe *could* filter gateways in _get_gateway_port_physnet_mapping() by required physnet(s) that we need, but the filter will consume a bit also. We can try to make some benchmark.","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"a225aae6ef6f2e426d20eb693655f8d1a5e9d28f","unresolved":false,"context_lines":[{"line_number":331,"context_line":"            for gwc in gw_chassis:"},{"line_number":332,"context_line":"                try:"},{"line_number":333,"context_line":"                    ports_impacted.append(utils.get_port_id_from_gwc_row(gwc))"},{"line_number":334,"context_line":"                except AttributeError:"},{"line_number":335,"context_line":"                    # Malformed GWC format."},{"line_number":336,"context_line":"                    pass"},{"line_number":337,"context_line":"            port_physnet_dict \u003d {"}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_beb6d089","line":334,"updated":"2020-04-08 12:55:25.000000000","message":"Does this happen that the gwc is missing an attribute we access? Best I can tell, we are accessing \u0027name\u0027 which is an index column, so it *must* exist if it is a real row object.","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"bf2f5aa563084231af5af148ca5a252c9fdf74f6","unresolved":false,"context_lines":[{"line_number":331,"context_line":"            for gwc in gw_chassis:"},{"line_number":332,"context_line":"                try:"},{"line_number":333,"context_line":"                    ports_impacted.append(utils.get_port_id_from_gwc_row(gwc))"},{"line_number":334,"context_line":"                except AttributeError:"},{"line_number":335,"context_line":"                    # Malformed GWC format."},{"line_number":336,"context_line":"                    pass"},{"line_number":337,"context_line":"            port_physnet_dict \u003d {"}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_3249f58a","line":334,"in_reply_to":"df33271e_beb6d089","updated":"2020-04-08 13:15:17.000000000","message":"Yes you\u0027re right. This is a kind of \u0027airbag for horse cabs\u0027.","commit_id":"a1735c46d8aa3a3df50818ce176e0632592924a7"}],"neutron/tests/functional/services/ovn_l3/test_plugin.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"2463a7287350981174b7ad53c70fc81c3aaff979","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        ext1 \u003d self._create_ext_network("},{"line_number":143,"context_line":"            \u0027ext1\u0027, \u0027vlan\u0027, \u0027physnet1\u0027, 1, \"10.0.0.1\", \"10.0.0.0/24\")"},{"line_number":144,"context_line":"        # As we have \u0027gateways\u0027 in the system, but without required"},{"line_number":145,"context_line":"        # chassy we should not schedule gw in that case at all."},{"line_number":146,"context_line":"        self._set_redirect_chassis_to_invalid_chassis(ovn_client)"},{"line_number":147,"context_line":"        with mock.patch.object(ovn_client._ovn_scheduler, \u0027select\u0027,"},{"line_number":148,"context_line":"                              return_value\u003d[self.chassis1]), \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_76987c75","line":145,"range":{"start_line":145,"start_character":10,"end_line":145,"end_character":16},"updated":"2020-02-05 22:07:31.000000000","message":"chassis","commit_id":"847b37db7586811aa7e917179dc9da945e42eb1e"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"1122fd68a496d6157fb26fe3dbb968e053fca186","unresolved":false,"context_lines":[{"line_number":566,"context_line":"            \"foo_value\")"},{"line_number":567,"context_line":"        self._test_chassis_helper(\u0027update\u0027, self.row_json, old_row_json)"},{"line_number":568,"context_line":"        self.driver.update_segment_host_mapping.assert_not_called()"},{"line_number":569,"context_line":"        self.l3_plugin.schedule_unhosted_gateways.assert_not_called()"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    def test_chassis_update_event_reschedule_lost_physnet(self):"},{"line_number":572,"context_line":"        old_row_json \u003d copy.deepcopy(self.row_json)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_325189da","line":569,"updated":"2020-03-19 17:03:51.000000000","message":"self.l3_plugin doesn\u0027t exist in this class","commit_id":"ebe09aa16fc4c033fd045748203abec48d52c563"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"8b1f811567fabae8a08c283bd3672a4a0833f243","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        self._test_handle_ha_chassis_group_changes_create("},{"line_number":560,"context_line":"            self.event.ROW_UPDATE)"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"    def test_handle_ha_chassis_group_changes_update_ext_id_not_found(self):"},{"line_number":563,"context_line":"        self.is_gw_ch_mock.side_effect \u003d (True, False)"},{"line_number":564,"context_line":"        old \u003d fakes.FakeOvsdbTable.create_one_ovsdb_table("},{"line_number":565,"context_line":"            attrs\u003d{\u0027name\u0027: \u0027SpongeBob\u0027})"}],"source_content_type":"text/x-python","patch_set":14,"id":"df33271e_01c32bee","side":"PARENT","line":562,"range":{"start_line":562,"start_character":4,"end_line":562,"end_character":75},"updated":"2020-04-03 12:22:48.000000000","message":"This test is not needed and it will fail because I moved the check `if old chassis row has external_ids` to match_fn().","commit_id":"6d619ea7c13e89ec575295f04c63ae316759c50a"}]}
