[libvirt] [glib 3/5] gconfig: Create objects for all domain device nodes
Daniel P. Berrange
berrange at redhat.com
Wed Nov 2 13:57:27 UTC 2016
On Tue, Nov 01, 2016 at 05:46:05PM +0100, Zeeshan Ali wrote:
> Currently we can and do get into serious trouble with this kind of code:
>
> devices = gvir_config_domain_get_devices(domain);
> gvir_config_domain_set_devices(domain, domain);
>
> since the first call above won't return a complete list of objects present
> in the domain but only the ones we have specific classes for and the
> second call above overwrites all device nodes under the domain. This
> lately made Boxes break against the latest libvirt, where a new device
> node was made compulsory[1].
>
> Although we should add support for all know domain devices ASAP, new
> devices will be added in future and this can happen again. So let's first
> ensure that gvir_config_domain_get_devices() always returns all devices
> under the domain. All unknown/unimplemented devices will now be returned
> as the very generic DomainDevice objects. Once we add support for a
> particular device, there will be no API/ABI breakage since the new class
> will inherit from DomainDevice class.
>
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1388091
> ---
> libvirt-gconfig/libvirt-gconfig-domain-device.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
ACK
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
More information about the libvir-list
mailing list