#NEWLINE# def build_job_argparse( subparsers ) : #NEWLINE# #INDENT# parser_job = subparsers . add_parser ( 'job' , help = 'access a given job on the UWS service' ) #NEWLINE# job_subparsers = parser_job . add_subparsers ( dest = 'job_command' , help = 'commands for manipulating jobs' ) #NEWLINE# parser_job_show = job_subparsers . add_parser ( 'show' , help = 'show the specific job' ) #NEWLINE# parser_job_show . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_show . add_argument ( '-w' , '--wait' , nargs = '?' , const = '-1' , default = None , help = '[UWS1.1] wait for phase change before returning, but at most the specified amount of seconds or infinitely, if no value is given' ) #NEWLINE# parser_job_show . add_argument ( '-s' , '--phase' , help = '[UWS1.1] required phase while waiting' ) #NEWLINE# parser_job_phase = job_subparsers . add_parser ( 'phase' , help = 'show the phase of specific job' ) #NEWLINE# parser_job_phase . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_new = job_subparsers . add_parser ( 'new' , help = 'create a new job' ) #NEWLINE# parser_job_new . add_argument ( '-r' , '--run' , action = 'store_true' , help = 'immediately submits the job on creation' ) #NEWLINE# parser_job_new . add_argument ( 'job_parameters' , nargs = '*' , help = ( ( ( ( 'unspecified list of UWS service parameters in the form' + ' "<parameter>=<value>" - ' ) + 'Default parameters are: ' ) + 'destruction (Destruction time of the job), ' ) + 'executionDuration (Execution duration of the job in seconds)' ) ) #NEWLINE# parser_job_set = job_subparsers . add_parser ( 'set' , help = 'set parameters for the specific job' ) #NEWLINE# parser_job_set . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_set . add_argument ( 'job_parameters' , nargs = '*' , help = ( ( ( ( 'unspecified list of UWS service parameters in the form' + ' "<parameter>=<value>" - ' ) + 'Default parameters are: ' ) + 'destruction (Destruction time of the job), ' ) + 'executionDuration (Execution duration of the job in seconds)' ) ) #NEWLINE# parser_job_run = job_subparsers . add_parser ( 'run' , help = 'run the specific job if its state is pending' ) #NEWLINE# parser_job_run . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_abort = job_subparsers . add_parser ( 'abort' , help = 'aborts the execution of a specific job' ) #NEWLINE# parser_job_abort . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_abort = job_subparsers . add_parser ( 'delete' , help = 'delete a specific job' ) #NEWLINE# parser_job_abort . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_results = job_subparsers . add_parser ( 'results' , help = 'download results of a specific job' ) #NEWLINE# parser_job_results . add_argument ( 'id' , help = 'job id' ) #NEWLINE# parser_job_results . add_argument ( 'result_id' , nargs = '?' , help = 'result id (e.g. for specifying the format, optional)' ) #NEWLINE# parser_job_results . add_argument ( '-f' , '--file_base' , help = 'basename of output file (optional), will be appended with result_id' ) #NEWLINE# return parser_job_show