- 'list': (ListJobs, ARGS_NONE,
- [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
- "", "List the jobs and their status. The available fields are"
- " (see the man page for details): id, status, op_list,"
- " op_status, op_result."
- " The default field"
- " list is (in order): %s." % ", ".join(_LIST_DEF_FIELDS)),
- 'archive': (ArchiveJobs, ARGS_ANY,
- [DEBUG_OPT],
- "<job-id> [<job-id> ...]",
- "Archive specified jobs"),
- 'autoarchive': (AutoArchiveJobs, ARGS_ONE,
- [DEBUG_OPT],
- "<age>",
- "Auto archive jobs older than the given age"),
- 'cancel': (CancelJobs, ARGS_ANY,
- [DEBUG_OPT],
- "<job-id> [<job-id> ...]",
- "Cancel specified jobs"),
- 'info': (ShowJobs, ARGS_ANY, [DEBUG_OPT],
- "<job-id> [<job-id> ...]",
- "Show detailed information about the specified jobs"),
+ 'list': (
+ ListJobs, [ArgJobId()],
+ [NOHDR_OPT, SEP_OPT, FIELDS_OPT],
+ "[job_id ...]",
+ "List the jobs and their status. The available fields are"
+ " (see the man page for details): id, status, op_list,"
+ " op_status, op_result."
+ " The default field"
+ " list is (in order): %s." % utils.CommaJoin(_LIST_DEF_FIELDS)),
+ 'archive': (
+ ArchiveJobs, [ArgJobId(min=1)], [],
+ "<job-id> [<job-id> ...]", "Archive specified jobs"),
+ 'autoarchive': (
+ AutoArchiveJobs,
+ [ArgSuggest(min=1, max=1, choices=["1d", "1w", "4w", "all"])],
+ [],
+ "<age>", "Auto archive jobs older than the given age"),
+ 'cancel': (
+ CancelJobs, [ArgJobId(min=1)], [],
+ "<job-id> [<job-id> ...]", "Cancel specified jobs"),
+ 'info': (
+ ShowJobs, [ArgJobId(min=1)], [],
+ "<job-id> [<job-id> ...]",
+ "Show detailed information about the specified jobs"),
+ 'watch': (
+ WatchJob, [ArgJobId(min=1, max=1)], [],
+ "<job-id>", "Follows a job and prints its output as it arrives"),