#NEWLINE# @ log . log_method_call #NEWLINE# def create_policy_target( self , context , policy_target ) : #NEWLINE# #INDENT# pt = policy_target [ 'policy_target' ] #NEWLINE# tenant_id = self . _get_tenant_id_for_create ( context , pt ) #NEWLINE# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# pt_db = PolicyTarget ( id = uuidutils . generate_uuid ( ) , tenant_id = tenant_id , name = pt [ 'name' ] , description = pt [ 'description' ] , policy_target_group_id = pt [ 'policy_target_group_id' ] , cluster_id = pt [ 'cluster_id' ] ) #NEWLINE# context . session . add ( pt_db ) #NEWLINE# #UNINDENT# return self . _make_policy_target_dict ( pt_db )