#NEWLINE# def _remove_redundancy_router_interfaces( self , context , router_id , old_port ) : #NEWLINE# #INDENT# 'To be called in delete_router_interface() BEFORE interface has been\n        removed from router in DB.\n        ' #NEWLINE# ha_settings = self . _get_ha_settings_by_router_id ( context , router_id ) #NEWLINE# if ( ( ha_settings is None ) or ( old_port is None ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# e_context = context . elevated ( ) #NEWLINE# rr_ids = self . _get_redundancy_router_ids ( e_context , router_id ) #NEWLINE# port_info_list = self . _core_plugin . get_ports ( e_context , filters = { #NEWLINE# #INDENT# 'device_id' : rr_ids , #NEWLINE# 'network_id' : [ router_id [ 'network_id' ] ] , #NEWLINE# #UNINDENT# } , fields = [ 'device_id' , 'id' ] ) #NEWLINE# for port_info in port_info_list : #NEWLINE# #INDENT# interface_info = { #NEWLINE# #INDENT# 'port_id' : port_info [ 'id' ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . remove_router_interface ( e_context , port_info [ 'device_id' ] , interface_info ) #NEWLINE# #UNINDENT# self . _delete_ha_group ( e_context , old_port [ 'id' ] )