summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-07-01 14:25:49 -0400
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 13:18:04 +0200
commite2f9a6572bb400e64e7a56526c5f7a4a9f8f6f90 (patch)
tree2d0cf4e08b29a6861283f081bb20544ad9d85d26 /scripts
parentb041066421e8dcc7d080dfcfd83551c9c9f24ade (diff)
downloadhqemu-e2f9a6572bb400e64e7a56526c5f7a4a9f8f6f90.zip
hqemu-e2f9a6572bb400e64e7a56526c5f7a4a9f8f6f90.tar.gz
qmp-shell: add documentation
I should probably document the changes that were made. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <1435775149-17285-1-git-send-email-jsnow@redhat.com> Reviewed-By: Kashyap Chamarthy <kchamart@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qmp/qmp-shell35
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 65280d2..fa39bf0 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -29,6 +29,41 @@
# (QEMU) device_add driver=e1000 id=net1
# {u'return': {}}
# (QEMU)
+#
+# 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.
+#
+#
+# Transactions have the following multi-line format:
+#
+# transaction(
+# action-name1 [ arg-name1=arg1 ] ... [arg-nameN=argN ]
+# ...
+# action-nameN [ arg-name1=arg1 ] ... [arg-nameN=argN ]
+# )
+#
+# One line transactions are also supported:
+#
+# transaction( action-name1 ... )
+#
+# For example:
+#
+# (QEMU) transaction(
+# TRANS> block-dirty-bitmap-add node=drive0 name=bitmap1
+# TRANS> block-dirty-bitmap-clear node=drive0 name=bitmap0
+# TRANS> )
+# {"return": {}}
+# (QEMU)
+#
+# Use the -v and -p options to activate the verbose and pretty-print options,
+# which will echo back the properly formatted JSON-compliant QMP that is being
+# sent to QEMU, which is useful for debugging and documentation generation.
import qmp
import json
OpenPOWER on IntegriCloud