#NEWLINE# @ log . log_method_call #NEWLINE# def delete_l2_policy( self , context , l2_policy_id ) : #NEWLINE# #INDENT# session = context . session #NEWLINE# with session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# l2_policy = self . get_l2_policy ( context , l2_policy_id ) #NEWLINE# policy_context = p_context . L2PolicyContext ( session , context , l2_policy ) #NEWLINE# self . policy_driver_manager . delete_l2_policy_precommit ( policy_context ) #NEWLINE# super ( GroupPolicyPlugin , self ) . delete_l2_policy ( context , l2_policy_id ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . policy_driver_manager . delete_l2_policy_postcommit ( policy_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# LOG . exception ( _LE ( 'delete_l2_policy_postcommit failed for l2_policy %s' ) , l2_policy_id )