#NEWLINE# def _populate_ha_information( self , context , router ) : #NEWLINE# #INDENT# 'To be called when router information, including router interface\n        list, (for the l3_cfg_agent) has been collected so it is extended\n        with ha information.\n        ' #NEWLINE# r_r_b = self . _get_redundancy_router_bindings ( context , redundancy_router_id = router [ 'id' ] ) #NEWLINE# if ( not r_r_b ) : #NEWLINE# #INDENT# if router [ ha . ENABLED ] : #NEWLINE# #INDENT# user_router_id = router [ 'id' ] #NEWLINE# fips = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# user_router_id = user_router_db [ 0 ] . user_router_id #NEWLINE# fips = self . get_floatingips ( context , { #NEWLINE# #INDENT# 'router_id' : [ user_router_id ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# if ( router [ 'id' ] != user_router_id ) : #NEWLINE# #INDENT# user_router_db = self . _get_router ( context , user_router_id ) #NEWLINE# self . _extend_router_dict_ha ( router , user_router_db ) #NEWLINE# #UNINDENT# hags = self . _get_subnet_id_indexed_ha_groups ( context , user_router_id ) #NEWLINE# e_context = context . elevated ( ) #NEWLINE# if router . get ( 'gw_port' ) : #NEWLINE# #INDENT# modified_interfaces = [ ] #NEWLINE# interface_port = self . _populate_port_ha_information ( e_context , router [ 'gw_port' ] , router [ 'id' ] , hags , user_router_id , modified_interfaces ) #NEWLINE# if ( not interface_port ) : #NEWLINE# #INDENT# router [ 'status' ] = cisco_constants . ROUTER_INFO_INCOMPLETE #NEWLINE# return #NEWLINE# #UNINDENT# if modified_interfaces : #NEWLINE# #INDENT# router [ 'gw_port' ] = interface_port #NEWLINE# #UNINDENT# #UNINDENT# modified_interfaces = [ ] #NEWLINE# for itfc in router . get ( l3_constants . INTERFACE_KEY , [ ] ) : #NEWLINE# #INDENT# interface_port = self . _populate_port_ha_information ( e_context , itfc , router [ 'id' ] , hags , user_router_id , modified_interfaces ) #NEWLINE# if ( not interface_port ) : #NEWLINE# #INDENT# router [ 'status' ] = cisco_constants . ROUTER_INFO_INCOMPLETE #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# if modified_interfaces : #NEWLINE# #INDENT# router [ l3_constants . INTERFACE_KEY ] = modified_interfaces #NEWLINE# #UNINDENT# if fips : #NEWLINE# #INDENT# router [ l3_constants . FLOATINGIP_KEY ] = fips