Hi, all.
I want to remove media if disk is ejected from guest. I can leverage tray
opened event for it but this event generated if i change media thru API call
too. Thus I can't just remove media on any such event. However it would be
possible if libvirt do not propagate tray opened event that originates from
qemuDomainUpdateDeviceFlags actions. On this way we need also to close tray
back if it was originally closed so state visible to client is in sync with
actual. I can imagine other cases when closing tray at the end of
qemuDomainUpdateDeviceFlags will be useful. Say implementing a kind of changer
in mgmt layer so that if guest ejects disk mgmt insert next media from some
playlist. In this case tray should be closed so that guest will see that media
is changed.
In short I suggest:
1. close tray at the end of chaning/ejecting media
2. if tray is opened during the operation than mask this event from client
Nikolay