#NEWLINE# def _create_agent_fdb( self , session , agent , segment , network_id ) : #NEWLINE# #INDENT# agent_fdb_entries = { #NEWLINE# #INDENT# network_id : { #NEWLINE# #INDENT# 'segment_id' : segment [ 'segmentation_id' ] , #NEWLINE# 'network_type' : segment [ 'network_type' ] , #NEWLINE# 'ports' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# tunnel_network_ports = l2pop_db . get_dvr_active_network_ports ( session , network_id ) #NEWLINE# fdb_network_ports = l2pop_db . get_nondvr_active_network_ports ( session , network_id ) #NEWLINE# ports = agent_fdb_entries [ network_id ] [ 'ports' ] #NEWLINE# ports . update ( self . _get_tunnels ( ( fdb_network_ports + tunnel_network_ports ) , agent . host ) ) #NEWLINE# for ( agent_ip , fdbs ) in ports . items ( ) : #NEWLINE# #INDENT# for ( binding , agent ) in self : #NEWLINE# #INDENT# if ( l2pop_db . get_agent_ip ( agent ) == agent_ip ) : #NEWLINE# #INDENT# fdbs . extend ( self . _get_port_fdb_entries ( binding . port ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return agent_fdb_entries