Skip to content

python: a few improvements to qmp-shell

Daniel P. Berrangé qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 9 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2python: introduce qmp-shell-wrap convenience toolpython/qemu/aqmp/qmp_shell.py python/setup.cfg scripts/qmp/qmp-shell-wrap+75 -40 replies
2/2python: support recording QMP session to a filepython/qemu/aqmp/qmp_shell.py python/setup.cfg+25 -70 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-Daudé
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

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.

In v3:

- Add qmp-shell-wrap to setup.cfg entry points

In v2:

- Unlink unix socket path on exit
- Fix default command name
- Deal with flake8/pylint warnings

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

 python/qemu/aqmp/qmp_shell.py | 88 ++++++++++++++++++++++++++++++++---
 python/setup.cfg              |  4 ++
 scripts/qmp/qmp-shell-wrap    | 11 +++++
 3 files changed, 96 insertions(+), 7 deletions(-)
 create mode 100755 scripts/qmp/qmp-shell-wrap
Signature · 1 line
2.34.1