#NEWLINE# def _change_ha_for_gateway( self , context , router , router_db , ha_settings_db , update_spec , expire = False ) : #NEWLINE# #INDENT# if ( router_db . gw_port is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# gw_port = self . _core_plugin . _make_port_dict ( router_db . gw_port ) #NEWLINE# self . _create_ha_group ( context , router , gw_port , ha_settings_db ) #NEWLINE# if ( expire is True ) : #NEWLINE# #INDENT# context . session . expire ( router_db ) #NEWLINE# #UNINDENT# rr_ids = [ ] #NEWLINE# for r_b_db in ha_settings_db . redundancy_bindings : #NEWLINE# #INDENT# spec = { #NEWLINE# #INDENT# EXTERNAL_GW_INFO : copy . copy ( router [ EXTERNAL_GW_INFO ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# spec [ EXTERNAL_GW_INFO ] . pop ( 'external_fixed_ips' , None ) #NEWLINE# spec [ ha . ENABLED ] = False #NEWLINE# self . _update_router_no_notify ( context , r_b_db . redundancy_router_id , { #NEWLINE# #INDENT# 'router' : spec , #NEWLINE# #UNINDENT# } ) #NEWLINE# rr_ids . append ( r_b_db . redundancy_router_id ) #NEWLINE# #UNINDENT# self . notify_routers_updated ( context , rr_ids )