From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVJG6-0005jt-8G for qemu-devel@nongnu.org; Fri, 28 Aug 2015 08:59:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVJG3-0001zc-Gq for qemu-devel@nongnu.org; Fri, 28 Aug 2015 08:59:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVJG3-0001zY-C4 for qemu-devel@nongnu.org; Fri, 28 Aug 2015 08:59:51 -0400 Date: Fri, 28 Aug 2015 13:59:46 +0100 From: "Daniel P. Berrange" Message-ID: <20150828125945.GO28526@redhat.com> References: <1440689864-32127-1-git-send-email-berrange@redhat.com> <87vbbz8tgq.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87vbbz8tgq.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH] monitor: allow object_del & device_del to accept QOM paths Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Programmingkid , Paolo Bonzini , qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= On Fri, Aug 28, 2015 at 02:53:41PM +0200, Markus Armbruster wrote: > Copying Andreas and Paolo for QOM expertise. > > "Daniel P. Berrange" writes: > > > Currently both object_del and device_del require that the > > client provide the object/device short ID. While user > > creatable objects require an ID to be provided at time of > > creation, qdev devices may be created without giving an > > ID. The only unique identifier they would then have is the > > QOM object path. > > > > Allowing device_del to accept an object path ensures all > > devices are deletable regardless of whether they have an > > ID. > > > > (qemu) device_add usb-mouse > > (qemu) qom-list /machine/peripheral-anon > > device[0] (child) > > type (string) > > (qemu) device_del /machine/peripheral-anon/device[0] > > > > Although objects require an ID to be provided upfront, > > there may be cases where the client would prefer to > > use QOM paths when deleting. > > > > Signed-off-by: Daniel P. Berrange > > I believe this makes sense no matter what we do about device IDs (see > thread "Should we auto-generate IDs?"). [snip] > Update qapi-schema.json updated the obvious way, and you can have my > R-by. Also addressing my stylistic nitpicks would be nice. Already posted a v2 with the qapi-schema.json addition after Eric pointed it out :-) 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 :|