This adds a minimal query-jobs implementation that shouldn't pose many
design questions. It can later be extended to expose more information,
and especially job-specific information.
Signed-off-by: Kevin Wolf <address@hidden>
---
qapi/job.json | 45 +++++++++++++++++++++++++++++++++++++++++++++
include/qemu/job.h | 3 +++
job-qmp.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
job.c | 2 +-
4 files changed, 103 insertions(+), 1 deletion(-)
+# This value can arbitrarily change while the job is
+# running, in both directions.
+#
+# @error: If this field is present, the job failed; if it is
+# still missing in the CONCLUDED state, this indicates
+# successful completion.
+#
+# The value is a human-readable error message to describe
+# the reason for the job failure. It should not be parsed
+# by applications.
+#
+# Since: 2.13
+##
+{ 'struct': 'JobInfo',
+ 'data': { 'id': 'str', 'type': 'JobType', 'status': 'JobStatus',
+ 'current-progress': 'int', 'total-progress': 'int',
+ '*error': 'str' } }
+