[libvirt] [PATCH 10/12] virsh: Introduce some VIR_DOMAIN_EVENT_* macros representing domain event names

Peter Krempa pkrempa at redhat.com
Fri May 4 10:22:37 UTC 2018


On Fri, May 04, 2018 at 17:25:31 +0800, Lin Ma wrote:
> Signed-off-by: Lin Ma <lma at suse.com>
> ---
>  include/libvirt/libvirt-domain.h | 201 +++++++++++++++++++++++++++++++++++++++
>  tools/virsh-domain.c             |  50 +++++-----
>  2 files changed, 226 insertions(+), 25 deletions(-)
> 
> diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
> index 12fd34037e..f7dd510f7f 100644
> --- a/include/libvirt/libvirt-domain.h
> +++ b/include/libvirt/libvirt-domain.h
> @@ -4424,6 +4424,207 @@ typedef enum {
>  } virDomainEventID;
>  
>  
> +/**
> + * VIR_DOMAIN_EVENT_LIFECYCLE:
> + *
> + * Macro for the event name "lifecycle"
> + */
> +
> +# define VIR_DOMAIN_EVENT_LIFECYCLE "lifecycle"

This would make all of these public API and I'm not persuaded this is a
good idea. Specifically since they are only used in virsh. The library
always refers to the events by number. Also some of the events have
multiple implementations which don't usually need to be referred to
publically depending on the use case of the event. Virsh implements all
of them just for the sake of completness.

NACK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180504/9daac8ff/attachment-0001.sig>


More information about the libvir-list mailing list