aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-09-22 20:49:22 -0400
committerJohn Snow <jsnow@redhat.com>2021-10-12 12:22:10 -0400
commit0257209a09793bfaf1b662faad5558e7011e748a (patch)
treec0ab65882c520f4b1a18347e56526db0024a9844 /python
parentbfd9a76f9c143d450ab5545dedfa74364b39fc56 (diff)
python/aqmp: add greeting property to QMPClient
Expose the greeting as a read-only property of QMPClient so it can be retrieved at-will. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20210923004938.3999963-2-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python')
-rw-r--r--python/qemu/aqmp/qmp_client.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py
index 82e9dab124..d2ad7459f9 100644
--- a/python/qemu/aqmp/qmp_client.py
+++ b/python/qemu/aqmp/qmp_client.py
@@ -224,6 +224,11 @@ class QMPClient(AsyncProtocol[Message], Events):
'asyncio.Queue[QMPClient._PendingT]'
] = {}
+ @property
+ def greeting(self) -> Optional[Greeting]:
+ """The `Greeting` from the QMP server, if any."""
+ return self._greeting
+
@upper_half
async def _establish_session(self) -> None:
"""