summary refs log tree commit diff stats
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-04-29 15:14:02 -0400
committerLuiz Capitulino <lcapitulino@redhat.com>2015-05-11 08:59:07 -0400
commit6092c3ecc4bdafee5bf07061be78a4a2cc5a5088 (patch)
treef662bd8b7d8b4a52f008cb4260c4385a2f3583e2 /hw/net/virtio-net.c
parenta7430a0badc59bd6295936e06c1869e8fe32649d (diff)
downloadfocaccia-qemu-6092c3ecc4bdafee5bf07061be78a4a2cc5a5088.tar.gz
focaccia-qemu-6092c3ecc4bdafee5bf07061be78a4a2cc5a5088.zip
scripts: qmp-shell: Expand support for QMP expressions
This includes support for [] expressions, single-quotes in
QMP expressions (which is not strictly a part of JSON), and
the ability to use "True", "False" and "None" literals instead
of JSON's equivalent true, false, and null literals.

qmp-shell currently allows you to describe values as
JSON expressions:
key={"key":{"key2":"val"}}

But it does not currently support arrays, which are needed
for serializing and deserializing transactions:
key=[{"type":"drive-backup","data":{...}}]

qmp-shell also only currently accepts doubly quoted strings
as-per JSON spec, but QMP allows single quotes.

Lastly, python allows you to utilize "True" or "False" as
boolean literals, but JSON expects "true" or "false". Expand
qmp-shell to allow the user to type either, converting to the
correct type.

As a consequence of the above, the key=val parsing is also improved
to give better error messages if a key=val token is not provided.

CAVEAT: The parser is still extremely rudimentary and does not
expect to find spaces in {} nor [] expressions. This patch does
not improve this functionality.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Kashyap Chamarthy <kchamart@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions