#NEWLINE# @ log . log_method_call #NEWLINE# def create_servicechain_instance( self , context , servicechain_instance ) : #NEWLINE# #INDENT# session = context . session #NEWLINE# with session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# result = super ( ServiceChainPlugin , self ) . create_servicechain_instance ( context , servicechain_instance ) #NEWLINE# sc_context = servicechain_context . ServiceChainInstanceContext ( self , context , result ) #NEWLINE# self . driver_manager . create_servicechain_instance_precommit ( sc_context ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . driver_manager . create_servicechain_instance_postcommit ( sc_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# with excutils . save_and_reraise_exception ( ) : #NEWLINE# #INDENT# LOG . error ( _LE ( 'driver_manager.create_servicechain_instance_postcommit failed, deleting servicechain_instance %s' ) , result [ 'id' ] ) #NEWLINE# self . delete_servicechain_instance ( context , result [ 'id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return result