diff options
author | John Snow | 2021-09-15 18:29:34 +0200 |
---|---|---|
committer | John Snow | 2021-09-27 18:10:29 +0200 |
commit | c58b42e095aed868b5d08b9deab61436ab45b7cf (patch) | |
tree | 4e3869a534eace6c02314d43f70e53fb62edc047 /python/qemu/aqmp/__init__.py | |
parent | python/aqmp: add generic async message-based protocol support (diff) | |
download | qemu-c58b42e095aed868b5d08b9deab61436ab45b7cf.tar.gz qemu-c58b42e095aed868b5d08b9deab61436ab45b7cf.tar.xz qemu-c58b42e095aed868b5d08b9deab61436ab45b7cf.zip |
python/aqmp: add runstate state machine to AsyncProtocol
This serves a few purposes:
1. Protect interfaces when it's not safe to call them (via @require)
2. Add an interface by which an async client can determine if the state
has changed, for the purposes of connection management.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20210915162955.333025-7-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__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py index 5c0de72672..88ead4c023 100644 --- a/python/qemu/aqmp/__init__.py +++ b/python/qemu/aqmp/__init__.py @@ -22,12 +22,16 @@ managing QMP events. # the COPYING file in the top-level directory. from .error import AQMPError -from .protocol import ConnectError +from .protocol import ConnectError, Runstate, StateError # The order of these fields impact the Sphinx documentation order. __all__ = ( + # Classes + 'Runstate', + # Exceptions, most generic to most explicit 'AQMPError', + 'StateError', 'ConnectError', ) |