]> git.ipfire.org Git - thirdparty/libvirt.git/commit
API: Introduce VIR_DOMAIN_JOB_SUCCESS field for virDomainGetJobStats
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Nov 2019 17:01:06 +0000 (18:01 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 3 Dec 2019 14:26:53 +0000 (15:26 +0100)
commitbbd54c10e797f47f9d75e29d5de25ef35d9d2d98
treed51bd995db402bd4b8ffee8d4e36cc2c6594a9df
parentb1bf5efdc1d219e3d84669215cb60027e784505a
API: Introduce VIR_DOMAIN_JOB_SUCCESS field for virDomainGetJobStats

The statistics fields are used in two places:

1) virDomainGetJobStats where the job type which ultimately holds
whether the job was successful or not is returned via a different
argument.

2) The virConnectDomainEventJobCompleted event where we report just the
statistics via typed parameters.

Since it might be useful to report the event also for jobs which
completed unsuccessfully and we don't have the means to transport the
state via a different variable with the event let's add a new field
which will hold the success state.

Since this is meant primarily for completed jobs a plain boolean is
sufficient to convey whether the job was successful or not.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
include/libvirt/libvirt-domain.h