From: Andrea Bolognani <abologna@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>,
Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties
Date: Wed, 28 Feb 2018 15:42:56 +0100 [thread overview]
Message-ID: <1519828976.3345.29.camel@redhat.com> (raw)
In-Reply-To: <20180226082259.40293-1-aik@ozlabs.ru>
On Mon, 2018-02-26 at 19:22 +1100, Alexey Kardashevskiy wrote:
> There is already 'device-list-properties' which does most of the job,
> however it does not handle everything returned by qom-list-types such
> as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE.
> It does not handle abstract classes either.
>
> This adds a new qom-list-properties command which prints properties
> of a specific class and its instance. It is pretty much a simplified copy
> of the device-list-properties handler.
>
> Since it creates an object instance, device properties should appear
> in the output as they are copied to QOM properties at the instance_init
> hook.
>
> This adds a object_class_property_iter_init() helper to allow class
> properties enumeration uses it in the new QMP command to allow properties
> listing for abstract classes.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> Changes:
> v2:
> * added abstract classes support, now things like "pci-device" or
> "spapr-machine" show properties, previously these would produce
> an "abstract class" error
This is really nice, since it means libvirt won't have to figure
out the class name based on the default machine type but will be
able to simply list properties for the base class.
I'm going to implement support for this new command in libvirt
and report back if I run into any issue with the current design,
but it looks very good so far.
--
Andrea Bolognani / Red Hat / Virtualization
next prev parent reply other threads:[~2018-02-28 14:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 8:22 [Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties Alexey Kardashevskiy
2018-02-28 14:42 ` Andrea Bolognani [this message]
2018-03-02 10:09 ` Andrea Bolognani
2018-03-01 3:59 ` David Gibson
2018-03-01 11:47 ` Alexey Kardashevskiy
2018-03-01 11:49 ` Paolo Bonzini
2018-03-01 20:18 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519828976.3345.29.camel@redhat.com \
--to=abologna@redhat.com \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).