#NEWLINE# def _remove_redundancy_routers( self , context , router_ids , ports , delete_ha_groups = False ) : #NEWLINE# #INDENT# 'Deletes all interfaces of the specified redundancy routers\n        and then the redundancy routers themselves.\n        ' #NEWLINE# subnets_info = [ { #NEWLINE# #INDENT# 'subnet_id' : port [ 'fixed_ips' ] [ 0 ] [ 'subnet_id' ] , #NEWLINE# #UNINDENT# } for port in ports ] #NEWLINE# for r_id in router_ids : #NEWLINE# #INDENT# for i in range ( len ( subnets_info ) ) : #NEWLINE# #INDENT# self . remove_router_interface ( context , r_id , subnets_info [ i ] ) #NEWLINE# LOG . debug ( 'Removed interface on %(s_id)s to redundancy router with %(r_id)s' , { #NEWLINE# #INDENT# 's_id' : ports [ i ] [ 'network_id' ] , #NEWLINE# 'r_id' : r_id , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( delete_ha_groups and ( r_id == router_ids [ 0 ] ) ) : #NEWLINE# #INDENT# self . _delete_ha_group ( context , ports [ i ] [ 'id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# self . delete_router ( context , r_id ) #NEWLINE# LOG . debug ( 'Deleted redundancy router %s' , r_id )