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:48 -0400
committerJohn Snow <jsnow@redhat.com>2021-09-27 12:10:29 -0400
commite0fea0b3ac85aefacbecf732d18f6d7ba438fa69 (patch)
tree59491810225ef56a608f4fe00ea83e64766f5d93 /python/qemu/aqmp/__init__.py
parent577737be55a3e9e5d592ad31d4b7c71ebccf3dc8 (diff)
downloadfocaccia-qemu-e0fea0b3ac85aefacbecf732d18f6d7ba438fa69.tar.gz
focaccia-qemu-e0fea0b3ac85aefacbecf732d18f6d7ba438fa69.zip
python/aqmp: add execute() interfaces
Add execute() and execute_msg().

_execute() is split into _issue() and _reply() halves so that
hypothetical subclasses of QMP that want to support different execution
paradigms can do so.

I anticipate a synchronous interface may have need of separating the
send/reply phases. However, I do not wish to expose that interface here
and want to actively discourage it, so they remain private interfaces.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210915162955.333025-21-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 d975c752ea..4b7df53e00 100644
--- a/python/qemu/aqmp/__init__.py
+++ b/python/qemu/aqmp/__init__.py
@@ -25,7 +25,7 @@ from .error import AQMPError
 from .events import EventListener
 from .message import Message
 from .protocol import ConnectError, Runstate, StateError
-from .qmp_client import QMPClient
+from .qmp_client import ExecInterruptedError, ExecuteError, QMPClient
 
 
 # The order of these fields impact the Sphinx documentation order.
@@ -40,4 +40,6 @@ __all__ = (
     'AQMPError',
     'StateError',
     'ConnectError',
+    'ExecuteError',
+    'ExecInterruptedError',
 )