#NEWLINE# def _sync_base( self ) : #NEWLINE# #INDENT# ctx = context . get_admin_context ( ) #NEWLINE# for network in self . core_plugin . get_networks ( ctx ) : #NEWLINE# #INDENT# mech_context = driver_context . NetworkContext ( self . core_plugin , ctx , network ) #NEWLINE# try : #NEWLINE# #INDENT# self . driver . create_network_postcommit ( mech_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# LOG . warning ( _LW ( 'Create network postcommit failed for network %s' ) , port [ 'id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# for subnet in self . core_plugin . get_subnets ( ctx ) : #NEWLINE# #INDENT# mech_context = driver_context . SubnetContext ( self . core_plugin , ctx , subnet ) #NEWLINE# try : #NEWLINE# #INDENT# self . driver . create_subnet_postcommit ( mech_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# LOG . warning ( _LW ( 'Create subnet postcommit failed for subnet %s' ) , subnet [ 'id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# for port in self . core_plugin . get_ports ( ctx ) : #NEWLINE# #INDENT# ( _ , binding ) = l2_db . get_locked_port_and_binding ( ctx . session , port [ 'id' ] ) #NEWLINE# network = self . core_plugin . get_network ( ctx , port [ 'network_id' ] ) #NEWLINE# mech_context = driver_context . PortContext ( self . core_plugin , ctx , port , network , binding , [ ] ) #NEWLINE# try : #NEWLINE# #INDENT# self . driver . create_port_postcommit ( mech_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# LOG . warning ( _LW ( 'Create port postcommit failed for port %s' ) , port [ 'id' ] )