[Top][All Lists]

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

[PATCH RFC 0/7] RFC: Asynchronous QMP Draft

From: John Snow
Subject: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft
Date: Tue, 13 Apr 2021 11:55:46 -0400

(Does not apply to the QEMU tree; this is against a blank repository.)

Hi! This is a Draft RFC for an asyncio-based Python library that
implements a QMP client. The intent is to eventually publish this
library directly to PyPI, so the design focus of this library is to be
"useful" instead of providing as low-level an interface as possible.

I am sending this to solicit general, high-level design feedback on the
overal layout and approach. Many minor details are still left to be
implemented, and a lot of the docstrings and documentation need to be
audited to make sure they still apply as I've shuffled things around a
lot in the course of development.

There are some pretty notable things missing still; in particular I need
to develop an Event API (there is a tiny stub added as a hack, but it's
very simplistic), and I also need to develop a sync bridge so that this
library could be used in existing iotests if we eventually expect to
replace the old QMP library with this one.

Scattered throughout these files are "RFC" comments and other "FIXME"
and "TODO" items where I've tried to stub out some of the things I am
still unsure of.


John Snow (7):
  util: asyncio-related helpers
  error: Error classes and so on.
  protocol: generic async message-based protocol loop
  message: add QMP Message type
  models: Add well-known QMP objects
  qmp_protocol: add QMP client implementation
  linter config

 .flake8         |   2 +
 error.py        | 163 +++++++++++
 message.py      | 196 ++++++++++++++
 models.py       | 177 ++++++++++++
 protocol.py     | 704 ++++++++++++++++++++++++++++++++++++++++++++++++
 pylintrc        |  53 ++++
 qmp_protocol.py | 420 +++++++++++++++++++++++++++++
 util.py         |  87 ++++++
 8 files changed, 1802 insertions(+)
 create mode 100644 .flake8
 create mode 100644 error.py
 create mode 100644 message.py
 create mode 100644 models.py
 create mode 100644 protocol.py
 create mode 100644 pylintrc
 create mode 100644 qmp_protocol.py
 create mode 100644 util.py


reply via email to

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