mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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>
This commit is contained in:
parent
b1bf5efdc1
commit
bbd54c10e7
@ -3578,6 +3578,13 @@ typedef enum {
|
||||
*/
|
||||
# define VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE "auto_converge_throttle"
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_JOB_SUCCESS:
|
||||
*
|
||||
* virDomainGetJobStats field: Present only in statistics for a completed job.
|
||||
* Successful completion of the job as VIR_TYPED_PARAM_BOOLEAN.
|
||||
*/
|
||||
# define VIR_DOMAIN_JOB_SUCCESS "success"
|
||||
|
||||
/**
|
||||
* virConnectDomainEventGenericCallback:
|
||||
|
Loading…
Reference in New Issue
Block a user