[libvirt] [PATCH v3 01/10] Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command

Eric Blake eblake at redhat.com
Fri Jul 12 15:52:06 UTC 2013


On 07/12/2013 06:34 AM, Daniel P. Berrange wrote:
> On Thu, Jul 11, 2013 at 07:55:51PM -0400, John Ferlan wrote:
>> Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation
>> of the 'qom-list' JSON monitor command with a provided path.
>>
>> The returned list of paired data fields of "name" and "type" that can
>> be used to peruse QOM configuration data and eventually utilize for the
>> balloon statistics.
>>
>> The test does a "{"execute":"qom-list", "arguments": { "path": "/"}}" which
>> returns "{"return": [{"name": "machine", "type": "child<container>"},
>> {"name": "type", "type": "string"}]}" resulting in a return of an array
>> of 2 elements with [0].name="machine", [0].type="child<container>".  The [1]
>> entry appears to be a header that could be used some day via a command such
>> as "virsh qemuobject --list" to format output.
>> ---
>>  src/qemu/qemu_monitor_json.c | 98 ++++++++++++++++++++++++++++++++++++++++++++
>>  src/qemu/qemu_monitor_json.h | 16 ++++++++
>>  tests/qemumonitorjsontest.c  | 79 +++++++++++++++++++++++++++++++++++
>>  3 files changed, 193 insertions(+)
> 
> ACK

I'm still not convinced we need to touch the .h file; why can't the new
function be static and the data types be local to the .c file?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130712/796535ff/attachment-0001.sig>


More information about the libvir-list mailing list