Re: [PATCH 5/6] events: Add explicit lookup 'key' value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/23/2016 12:27 PM, Cole Robinson wrote:
> This allows event implementations to match on something other
> than an object's uuid, like nodedev or interface objects which
> don't have a uuid.
> ---
>  src/conf/domain_event.c         | 11 +++++++++--
>  src/conf/network_event.c        |  4 +++-
>  src/conf/object_event.c         | 23 +++++++++++------------
>  src/conf/object_event_private.h |  6 ++++--
>  src/conf/storage_event.c        |  4 +++-
>  5 files changed, 30 insertions(+), 18 deletions(-)
> 

[...]

> diff --git a/src/conf/storage_event.c b/src/conf/storage_event.c
> index de4f1ea..cb97c90 100644
> --- a/src/conf/storage_event.c
> +++ b/src/conf/storage_event.c
> @@ -228,14 +228,16 @@ virStoragePoolEventLifecycleNew(const char *name,
>                                  int detail)
>  {
>      virStoragePoolEventLifecyclePtr event;
> +    char uuidstr[VIR_UUID_STRING_BUFLEN];
>  
>      if (virStoragePoolEventsInitialize() < 0)
>          return NULL;
>  
> +    virUUIDFormat(uuid, uuidstr);
>      if (!(event = virObjectEventNew(virStoragePoolEventLifecycleClass,
>                                      virStoragePoolEventDispatchDefaultFunc,
>                                      VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE,
> -                                    0, name, uuid)))
> +                                    0, name, uuid, uuidstr)))
>          return NULL;
>  
>      event->type = type;
> 

You'll need to account for uuidstr due to commit id '03308482' in the
new API virStoragePoolEventRefreshNew

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]