On Wed, Oct 26, 2011 at 01:22:02PM +0200, Michal Privoznik wrote: > On 26.10.2011 12:36, Daniel P. Berrange wrote: > > On Wed, Oct 26, 2011 at 12:26:51PM +0200, Michal Privoznik wrote: > >> As this is on yet unreleased API this change is possible. > >> This patch changes devAlias parameter in event callback to > >> disk target as mgmt application is more likely to know target > >> (it's required on domain definition) but aliases are generated > >> by the daemon. So we can say this spares mgmt application at least > >> one subsequent call of dumpxml on incoming event. > > > > We already use 'devAlias' in the block I/O error event, so IMHO > > it is good that we are consistent here too. So I'd rather not > > change what we have for media change events. > > > > Daniel > > But on the otherhand, I assume 'devAlias' is limited just to QEMU, isn't > it? But target isn't. So I rather have good API than consistent but bad. > Moreover, I can't avoid feeling that we have 'devAlias' only because it > is what we actually get on qemu event (so we don't have to do any > translation, just a simple passthru). However, ff we change this to > target and once QEMU sens events on cdrom eject we need to do a > translation, though. The device aliases are not intended to be limited to just QEMU. The intention when adding device aliases was to have a standard way to uniquely refer to a particular device, no matter what type of device it is. Previously you had to use disk targets, net MAC addrs, serial port numbers, etc, etc, and some device types didn't even have any good unique attribute. With device alias, we have a way to provide a standard identifer for any type of device. While other drivers may not use this ability yet, there's nothing preventing them from doing so. 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list