[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] monitor: allow object_del & device_del to accep
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] monitor: allow object_del & device_del to accept QOM paths |
Date: |
Fri, 28 Aug 2015 13:59:46 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Aug 28, 2015 at 02:53:41PM +0200, Markus Armbruster wrote:
> Copying Andreas and Paolo for QOM expertise.
>
> "Daniel P. Berrange" <address@hidden> 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<usb-mouse>)
> > 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 <address@hidden>
>
> 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 :|