From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxdp-0003nJ-54 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 09:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUxdk-0002KD-W6 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 09:54:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxdk-0002K5-Qc for qemu-devel@nongnu.org; Thu, 27 Aug 2015 09:54:52 -0400 Date: Thu, 27 Aug 2015 14:54:48 +0100 From: "Daniel P. Berrange" Message-ID: <20150827135448.GU24486@redhat.com> References: <29C62C49-06A5-4F99-8062-7269A28C29A3@gmail.com> <8737z7o85i.fsf@blackfin.pond.sub.org> <20150826172834.GQ21787@redhat.com> <20150826175359.GA4528@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Should we auto-generate IDs? (was: [PATCH] qdev-monitor.c: Add device id generation) Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Kevin Wolf , Jeff Cody , Markus Armbruster , qemu-devel qemu-devel , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= On Wed, Aug 26, 2015 at 02:01:41PM -0400, Programmingkid wrote: > > If a user is talking to the QEMU monitor directly there are plenty of ways > > to go wrong, of which forgetting to provide an ID is a really minor one. > > What other problems did you have in mind? > > > That's why it is generally left to higher level mgmt layers to talk to > > QEMU and deal with all the issues in this area. IOW if users are talking > > to the monitor directly, IMHO they've already lost. > > I'm not following you. What do you mean by higher level mgmt layers? Using QEMU via libvirt, or a similar management layer and not try to talk to the monitor and/or CLI args which are complex to get right and not really designed for user friendliness in general. > Let me put it this way, if a user were to add a usb device to QEMU, say > a usb-mouse, but forgot to give it an ID. How do you expect that user to > remove the device from QEMU? object_del should be made to accept the QOM object path, eg the first anonymous device appears with a path /machine/peripheral-anon/device[0] so you could just do 'object_del /machine/peripheral-anon/device[0]' If people really want pretty short IDs, then they can remember to specify them upfront, or use a higher level app that avoids this kind of problem. 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 :|