#NEWLINE# def _fixed_ips_changed( self , context , orig , port , diff_ips ) : #NEWLINE# #INDENT# ( orig_ips , port_ips ) = diff_ips #NEWLINE# if ( port [ 'device_owner' ] == const . DEVICE_OWNER_DVR_INTERFACE ) : #NEWLINE# #INDENT# agent_host = context . host #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# agent_host = context . original_host #NEWLINE# #UNINDENT# if ( not agent_host ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# agent_ip = l2pop_db . get_agent_ip_by_host ( db_api . get_session ( ) , agent_host ) #NEWLINE# orig_mac_ip = [ l2pop_rpc . PortInfo ( mac_address = port [ 'mac_address' ] , ip_address = ip ) for ip in orig_ips ] #NEWLINE# port_mac_ip = [ l2pop_rpc . PortInfo ( mac_address = port [ 'mac_address' ] , ip_address = ip ) for ip in port_ips ] #NEWLINE# upd_fdb_entries = { #NEWLINE# #INDENT# port [ 'network_id' ] : { #NEWLINE# #INDENT# agent_ip : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# ports = upd_fdb_entries [ port [ 'network_id' ] ] [ agent_ip ] #NEWLINE# if orig_mac_ip : #NEWLINE# #INDENT# ports [ 'before' ] = orig_mac_ip #NEWLINE# #UNINDENT# if port_mac_ip : #NEWLINE# #INDENT# ports [ 'after' ] = port_mac_ip #NEWLINE# #UNINDENT# self . L2populationAgentNotify . update_fdb_entries ( self . rpc_ctx , { #NEWLINE# #INDENT# 'chg_ip' : upd_fdb_entries , #NEWLINE# #UNINDENT# } ) #NEWLINE# return True