[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format &

From: Kashyap Chamarthy
Subject: Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file
Date: Mon, 9 Apr 2018 11:02:44 +0200
User-agent: Mutt/1.9.2 (2017-12-15)

On Fri, Apr 06, 2018 at 08:21:00PM +0200, Laszlo Ersek wrote:
> On 04/06/18 20:10, Eric Blake wrote:


> # key=value pairs also support Python or JSON object literal subset notations,
> # without spaces. Dictionaries/objects {} are supported as are arrays [].
> #
> #    example-command arg-name1={'key':'value','obj'={'prop':"value"}}
> #
> # Both JSON and Python formatting should work, including both styles of
> # string literal quotes. Both paradigms of literal values should work,
> # including null/true/false for JSON and None/True/False for Python.

A couple of examples of the the key-value pairs and using JSON dicts
with 'qmp-shell'.

Key-value pairs:

  (QEMU) blockdev-snapshot node=node-Base snapshot-file=./overlay1.qcow2 

A combination key-value pairs and JSON dicts:

   (QEMU) blockdev-add driver=qcow2 node-name=node-overlay1 

> This looks awesome, because it should let me provide messy nested input
> (which I'll obviously compose in my $EDITOR and then paste it), and then
> the QMP shell will both validate and pretty print that. I'm going to try
> this.

A couple of notes when using the 'qmp-shell':

  - Assuming you started QEMU with: `[...] -qmp
    unix:/tmp/qmp-sock,server,nowait`, you might want to use the '-p'
    command-line option to prett-print the JSON:
        $ qmp-shell -v -p /tmp/qmp-sock

  - It also provides a persistent command history in a convenient file:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]