[libvirt] [PATCH] Promote storage pool refresh lifecycle event to top level event
Daniel P. Berrange
berrange at redhat.com
Fri Jun 24 17:19:12 UTC 2016
On Fri, Jun 24, 2016 at 01:12:40PM -0400, Cole Robinson wrote:
> On 06/24/2016 12:38 PM, Daniel P. Berrange wrote:
> > The VIR_STORAGE_POOL_EVENT_REFRESHED constant does not
> > reflect any change in the lifecycle of the storage pool.
> >
> > It should thus not be part of the storage pool lifecycle
> > event set, but rather be a top level event in its own
> > right. Thus we introduce VIR_STORAGE_POOL_EVENT_ID_REFRESH
> > to replace it.
> >
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> >
> > NB this breaks API and wire protocol, so we *must*
> > include this before 2.0.0. Ideally we should get it
> > into before we cut any rc release too.
>
> ACK, I didn't see anything wrong here.
>
> I don't think any libvirt-python changes are needed either since this is using
> the same generic callback, except tweaking event-test.py which isn't time
> critical. Sorry for the last minute rush...
> As an aside, I've been talking with Jovanka adding nodedev events. Nodedevs
> don't really have a traditional lifecycle like other objects. It's really only
> added, removed, updated. I guess for typical objects that would basically be
> added=DEFINED, removed=UNDEFINED, updated=DEFINED, but it's a little weird
> given that we have define/undefine APIs here. Any suggestion here? Stick with
> 'Lifecycle' naming and DEFINED/UNDEFINED events, or something else?
Yeah, nodedev is a little unusual compared to other objects.
We could thing of nodedevs as essentially always being transient
objects. IOW, there would be no defined/undefined event or lifecycle
change. They're really objects which come into existance from
nothing and go away completely when removed.
That would suggest we use started/stopped as lifecycle events, but
that naming feels really odd for node devices.
We'll also have similar issue if we do events for storage volumes
too. I wonder if we want a lifecycle event but with CREATED/DELETED
as the events
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list