From e0fea0b3ac85aefacbecf732d18f6d7ba438fa69 Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 15 Sep 2021 12:29:48 -0400 Subject: 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 Message-id: 20210915162955.333025-21-jsnow@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python/qemu/aqmp/__init__.py') 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', ) -- cgit 1.4.1