<s> from sahara . api import acl <EOL> from sahara . service . api . v2 import job_executions as api <EOL> from sahara . service import validation as v <EOL> from sahara . service . validations . edp import job_execution as v_j_e <EOL> from sahara . service . validations . edp import job_execution_schema as v_j_e_schema <EOL> import sahara . utils . api as u <EOL> rest = u . RestV2 ( '<STR_LIT>' , __name__ ) <EOL> @ rest . get ( '<STR_LIT>' ) <EOL> @ acl . enforce ( "<STR_LIT>" ) <EOL> def job_executions_list ( ) : <EOL> job_executions = [ je . to_dict ( ) for je in api . job_execution_list ( <EOL> ** u . get_request_args ( ) . to_dict ( ) ) ] <EOL> return u . render ( job_executions = job_executions ) <EOL> @ rest . get ( '<STR_LIT>' ) <EOL> @ acl . enforce ( "<STR_LIT>" ) <EOL> @ v . check_exists ( api . get_job_execution , id = '<STR_LIT>' ) <EOL> def job_executions ( job_execution_id ) : <EOL> return u . to_wrapped_dict ( api . get_job_execution , job_execution_id ) <EOL> @ rest . get ( '<STR_LIT>' ) <EOL> @ acl . enforce ( "<STR_LIT>" ) <EOL> @ v . check_exists ( api . get_job_execution , id = '<STR_LIT>' ) <EOL> def job_executions_status ( job_execution_id ) : <EOL> return u . to_wrapped_dict ( <EOL> api . get_job_execution_status , job_execution_id ) <EOL> @ rest . get ( '<STR_LIT>' ) <EOL> @ acl . enforce ( "<STR_LIT>" ) <EOL> @ v . check_exists ( api . get_job_execution , id = '<STR_LIT>' ) <EOL> @ v . validate ( None , v_j_e . check_job_execution_cancel ) <EOL> def job_executions_cancel ( job_execution_id ) : <EOL> return u . to_wrapped_dict ( api . cancel_job_execution , job_execution_id ) <EOL> @ rest . patch ( '<STR_LIT>' ) <EOL> @ acl . enforce ( "<STR_LIT>" ) <EOL> @ v . check_exists ( api . get_job_execution , id = '<STR_LIT>' ) <EOL> @ v . validate ( <EOL> v_j_e_schema . JOB_EXEC_UPDATE_SCHEMA , v_j_e . check_job_execution_update ) <EOL> def job_executions_update ( job_execution_id , data ) : <EOL> return u . to_wrapped_dict ( <EOL> api . update_job_execution , job_execution_id , data ) <EOL> @ rest . delete ( '<STR_LIT>' ) <EOL> @ acl . enforce ( "<STR_LIT>" ) <EOL> @ v . check_exists ( api . get_job_execution , id = '<STR_LIT>' ) <EOL> @ v . validate ( None , v_j_e . check_job_execution_delete ) <EOL> def job_executions_delete ( job_execution_id ) : <EOL> api . delete_job_execution ( job_execution_id ) <EOL> return u . render ( ) </s>
