#NEWLINE# @ log . log_method_call #NEWLINE# def create_policy_rule_set( self , context , policy_rule_set ) : #NEWLINE# #INDENT# session = context . session #NEWLINE# with session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# result = super ( GroupPolicyPlugin , self ) . create_policy_rule_set ( result , policy_rule_set ) #NEWLINE# self . extension_manager . process_create_policy_rule_set ( session , policy_rule_set , result ) #NEWLINE# self . _validate_shared_create ( self , context , result , 'policy_rule_set' ) #NEWLINE# policy_context = p_context . PolicyRuleSetContext ( self , context , result ) #NEWLINE# self . policy_driver_manager . create_policy_rule_set_precommit ( policy_context ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . policy_driver_manager . create_policy_rule_set_postcommit ( policy_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# with excutils . save_and_reraise_exception ( ) : #NEWLINE# #INDENT# LOG . exception ( _LE ( 'policy_driver_manager.create_policy_rule_set_postcommit failed, deleting policy_rule_set %s' ) , result [ 'id' ] ) #NEWLINE# self . delete_policy_rule_set ( context , result [ 'id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return result