#NEWLINE# def create_network( self , context , network ) : #NEWLINE# #INDENT# ( result , mech_context ) = self . _create_network_db ( context , network ) #NEWLINE# try : #NEWLINE# #INDENT# self . mechanism_manager . create_network_postcommit ( mech_context ) #NEWLINE# #UNINDENT# except ml2_exc . MechanismDriverError : #NEWLINE# #INDENT# with excutils . save_and_reraise_exception ( ) : #NEWLINE# #INDENT# LOG . error ( _LE ( "mechanism_manager.create_network_postcommit failed, deleting network '%s'" ) , result [ 'id' ] ) #NEWLINE# self . delete_network ( context , result [ 'id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return result