summary refs log tree commit diff stats
path: root/python/qemu/aqmp/__init__.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-09-15 12:29:41 -0400
committerJohn Snow <jsnow@redhat.com>2021-09-27 12:10:29 -0400
commit08f98a22313f20a3851c9ae67dc0e8f2b931e3b3 (patch)
treeef575068db6714cdf4a3c4d04b1218d0df5557ad /python/qemu/aqmp/__init__.py
parent762bd4d7a745b3b19c4ffd3eaf4714a6961c4a11 (diff)
downloadfocaccia-qemu-08f98a22313f20a3851c9ae67dc0e8f2b931e3b3.tar.gz
focaccia-qemu-08f98a22313f20a3851c9ae67dc0e8f2b931e3b3.zip
python/aqmp: add QMP Message format
The Message class is here primarily to serve as a solid type to use for
mypy static typing for unambiguous annotation and documentation.

We can also stuff JSON serialization and deserialization into this class
itself so it can be re-used even outside this infrastructure.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20210915162955.333025-14-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu/aqmp/__init__.py')
-rw-r--r--python/qemu/aqmp/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py
index 88ead4c023..96fff1e5f3 100644
--- a/python/qemu/aqmp/__init__.py
+++ b/python/qemu/aqmp/__init__.py
@@ -22,12 +22,14 @@ managing QMP events.
 # the COPYING file in the top-level directory.
 
 from .error import AQMPError
+from .message import Message
 from .protocol import ConnectError, Runstate, StateError
 
 
 # The order of these fields impact the Sphinx documentation order.
 __all__ = (
-    # Classes
+    # Classes, most to least important
+    'Message',
     'Runstate',
 
     # Exceptions, most generic to most explicit