[libvirt] [PATCH 1/9] Introduce node device lifecycle event APIs

Daniel P. Berrange berrange at redhat.com
Tue Jul 26 17:32:27 UTC 2016


On Tue, Jul 26, 2016 at 01:28:34PM -0400, Cole Robinson wrote:
> On 07/20/2016 09:50 AM, Jovanka Gulicoska wrote:
> > Node device lifecycle event API entry points for registering and deregistering
> > node deivce events, as well as types of events associated with node devices.
> 
> * device
> 
> > These entry points will be used for implementing asynchronous lifecycle events.
> 
> These three lines are a bit long. Maybe split them to be 70-75 chars:
> 
> http://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting
> 
> > 
> > Node device API:
> > virConnectNodeDeviceEventRegisterAny
> > virConnectNodeDeviceEventDeregisterAny
> > virNodeDeviceEventLifecycleType which has events CREATED and DELETED
> 
> So one major question here is that we are only added CREATED and DELETED
> events, but devices can also be 'updated', as in their config can change. For
> example when a cdrom device has media ejected or inserted, udev fires an
> event, and we update the cached device config which is reflected in the device
> XML.
> 
> Adding an UPDATED event or similar isn't hard, but it's not technically a
> lifecycle. So if we add it, it should be a separate callback? Similar to what
> was eventually done for the pool refresh event. CCing danpb for his thoughts

Yep, I'd recommend a separate event callback for that.


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