I am the sole author of all of the async QMP code (python/qemu/aqmp) with the following exceptions: python/qemu/aqmp/qmp_shell.py and python/qemu/aqmp/legacy.py were written by Luiz Capitulino (et al) and are already licensed separately as GPLv2 (only). aqmp_tui.py was written by Niteesh Babu G S and is licensed as GPLv2+. I wish to relicense as LGPLv2+ in order to provide as much flexibility as I reasonably can, while retaining a copyleft license. It is my belief that LGPLv2+ is a suitable license for the Python ecosystem that aligns with the goals and philosophy of the QEMU project. The intent is to eventually drop legacy.py, leaving only library code that is LGPLv2+. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20220325200438.2556381-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
60 lines
1.5 KiB
Python
60 lines
1.5 KiB
Python
"""
|
|
QEMU Monitor Protocol (QMP) development library & tooling.
|
|
|
|
This package provides a fairly low-level class for communicating
|
|
asynchronously with QMP protocol servers, as implemented by QEMU, the
|
|
QEMU Guest Agent, and the QEMU Storage Daemon.
|
|
|
|
`QMPClient` provides the main functionality of this package. All errors
|
|
raised by this library derive from `QMPError`, see `aqmp.error` for
|
|
additional detail. See `aqmp.events` for an in-depth tutorial on
|
|
managing QMP events.
|
|
"""
|
|
|
|
# Copyright (C) 2020-2022 John Snow for Red Hat, Inc.
|
|
#
|
|
# Authors:
|
|
# John Snow <jsnow@redhat.com>
|
|
#
|
|
# Based on earlier work by Luiz Capitulino <lcapitulino@redhat.com>.
|
|
#
|
|
# This work is licensed under the terms of the GNU LGPL, version 2 or
|
|
# later. See the COPYING file in the top-level directory.
|
|
|
|
import logging
|
|
|
|
from .error import QMPError
|
|
from .events import EventListener
|
|
from .message import Message
|
|
from .protocol import (
|
|
ConnectError,
|
|
Runstate,
|
|
SocketAddrT,
|
|
StateError,
|
|
)
|
|
from .qmp_client import ExecInterruptedError, ExecuteError, QMPClient
|
|
|
|
|
|
# Suppress logging unless an application engages it.
|
|
logging.getLogger('qemu.aqmp').addHandler(logging.NullHandler())
|
|
|
|
|
|
# The order of these fields impact the Sphinx documentation order.
|
|
__all__ = (
|
|
# Classes, most to least important
|
|
'QMPClient',
|
|
'Message',
|
|
'EventListener',
|
|
'Runstate',
|
|
|
|
# Exceptions, most generic to most explicit
|
|
'QMPError',
|
|
'StateError',
|
|
'ConnectError',
|
|
'ExecuteError',
|
|
'ExecInterruptedError',
|
|
|
|
# Type aliases
|
|
'SocketAddrT',
|
|
)
|