On 07/26/2016 01:32 PM, Daniel P. Berrange wrote: > 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. > Sounds good. Jovanka, I suggest just sticking a patch at the end of the series which adds all the UPDATED handling in one shot, rather than break it into a bunch of patches. Similar to what Dan did for the REFRESHED event: http://www.redhat.com/archives/libvir-list/2016-June/msg01897.html Note there's not a clear way to unit test this, since the test driver doesn't really have any plumbing for it, so those bits can be skipped. Thanks, Cole -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list