#NEWLINE# @ utils . synchronized ( 'l3-agent-pd' ) #NEWLINE# def add_gw_interface( self , router_id , gw_ifname ) : #NEWLINE# #INDENT# router = self . routers . get ( router ) #NEWLINE# prefix_update = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( not router ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# router [ 'gw_interface' ] = gw_ifname #NEWLINE# for ( subnet_id , pd_info ) in six . iteritems ( router [ 'subnets' ] ) : #NEWLINE# #INDENT# bind_lla_with_mask = pd_info . get_bind_lla_with_mask ( ) #NEWLINE# if pd_info . sync : #NEWLINE# #INDENT# pd_info . sync = False #NEWLINE# if pd_info . client_started : #NEWLINE# #INDENT# if ( pd_info . prefix != pd_info . old_prefix ) : #NEWLINE# #INDENT# prefix_update [ 'subnet_id' ] = pd_info . prefix #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . _delete_lla ( router , bind_lla_with_mask ) #NEWLINE# self . _add_lla ( router , bind_lla_with_mask ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . _add_lla ( router , bind_lla_with_mask ) #NEWLINE# #UNINDENT# #UNINDENT# if prefix_update : #NEWLINE# #INDENT# LOG . debug ( 'Update server with prefixes: %s' , prefix_update ) #NEWLINE# self . notifier ( self . context , prefix_update )