From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scwum-0003I3-WC for qemu-devel@nongnu.org; Fri, 08 Jun 2012 06:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Scwug-0001p3-Km for qemu-devel@nongnu.org; Fri, 08 Jun 2012 06:59:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scwug-0001ot-Cd for qemu-devel@nongnu.org; Fri, 08 Jun 2012 06:59:30 -0400 Date: Fri, 8 Jun 2012 11:59:18 +0100 From: "Daniel P. Berrange" Message-ID: <20120608105918.GD2289@redhat.com> References: <1339097465-22977-1-git-send-email-afaerber@suse.de> <1339097465-22977-3-git-send-email-afaerber@suse.de> <4FD153CC.6040304@codemonkey.ws> <4FD1A5B8.20700@suse.de> <4FD1AD46.9040607@codemonkey.ws> <4FD1B501.5050804@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FD1B501.5050804@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [libvirt] [PATCH qom-next 2/7] qom: Add get_id Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: libvir-list@redhat.com, Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori , Luiz Capitulino On Fri, Jun 08, 2012 at 10:17:05AM +0200, Andreas F=C3=A4rber wrote: > Am 08.06.2012 09:44, schrieb Anthony Liguori: > > On 06/08/2012 03:11 PM, Andreas F=C3=A4rber 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 dat= a > > in the error is going to be a problem. > >=20 > > Doesn't libvirt ignore the contents of an error object? >=20 > 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 --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|