[libvirt] [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

Daniel P. Berrange berrange at redhat.com
Fri Jun 8 10:59:18 UTC 2012


On Fri, Jun 08, 2012 at 10:17:05AM +0200, Andreas Färber wrote:
> Am 08.06.2012 09:44, schrieb Anthony Liguori:
> > On 06/08/2012 03:11 PM, Andreas Färber wrote:
> > Since qdev->id is NULL 90% of the time, I don't think a user can
> > realistically rely on it.  I don't think changing the type of the data
> > in the error is going to be a problem.
> > 
> > Doesn't libvirt ignore the contents of an error object?
> 
> I'm out of my field there, those questions are for Luiz and the libvirt
> guys to answer. (Context is ongoing DeviceState -> Object transition on
> qom-next branch, properties being moved to Object and what info to
> include in Error objects then)

Libvirt will look at two fields in the a JSON 'error' reply. We will
pass 'desc' field through to the libvirt code - we treat it as an
opaque value. We will look at the string value in the 'class' field
to check for certain types of error - eg we strcmp against things like
MigrationExpected, DeviceNotActive, CommandNotFound, KVMMissingCap,
DeviceInUse, etc.  All other fields are ignored.

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