[PATCH 0/2] python: a few improvements to qmp-shell

Daniel P. Berrangé posted 2 patches 2 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220117141103.157288-1-berrange@redhat.com
There is a newer version of this series
python/qemu/qmp/qmp_shell.py | 80 ++++++++++++++++++++++++++++++++----
scripts/qmp/qmp-shell-wrap   | 11 +++++
2 files changed, 84 insertions(+), 7 deletions(-)
create mode 100755 scripts/qmp/qmp-shell-wrap
[PATCH 0/2] python: a few improvements to qmp-shell
Posted by Daniel P. Berrangé 2 years, 3 months ago
This makes the qmp-shell program a little more pleasant to use when you
are just trying to spawn a throw-away QEMU process to query some info
from.

First it introduces a 'qmp-shell-wrap' command that takes a QEMU command
line instead of QMP socket, and spawns QEMU automatically, so its life
is tied to that of the shell.

Second it adds ability to log QMP commands/responses to a file that can
be queried with 'jq' to extract information. This is good for commands
which return huge JSON docs.

Daniel P. Berrangé (2):
  python: introduce qmp-shell-wrap convenience tool
  python: support recording QMP session to a file

 python/qemu/qmp/qmp_shell.py | 80 ++++++++++++++++++++++++++++++++----
 scripts/qmp/qmp-shell-wrap   | 11 +++++
 2 files changed, 84 insertions(+), 7 deletions(-)
 create mode 100755 scripts/qmp/qmp-shell-wrap

-- 
2.33.1