python/qmp: add QMPObject type alias
authorJohn Snow <jsnow@redhat.com>
Mon, 7 Jun 2021 20:06:33 +0000 (16:06 -0400)
committerJohn Snow <jsnow@redhat.com>
Fri, 18 Jun 2021 20:10:07 +0000 (16:10 -0400)
This is meant to represent any generic object seen in a QMPMessage, not
just the root object itself.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-27-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
python/qemu/qmp/__init__.py

index a6e1a7b8577583bf2a7eaab203a71ab06bc06bfd..ba0d2281d678d67fb13a4a80d1625afe878e672d 100644 (file)
@@ -41,6 +41,9 @@ QMPMessage = Dict[str, Any]
 #: QMPReturnValue is the 'return' value of a command.
 QMPReturnValue = object
 
+#: QMPObject is any object in a QMP message.
+QMPObject = Dict[str, object]
+
 # QMPMessage can be outgoing commands or incoming events/returns.
 # QMPReturnValue is usually a dict/json object, but due to QAPI's
 # 'returns-whitelist', it can actually be anything.