diff options
author | John Snow | 2021-05-27 23:16:53 +0200 |
---|---|---|
committer | John Snow | 2021-06-01 22:21:21 +0200 |
commit | beb6b57b3b1a1fe6ebc208d2edc12b504f69e29f (patch) | |
tree | 30d99cee1032ce3fccf1c1d7f509f6fd49f2d037 /tests/vm/basevm.py | |
parent | iotests/297: add --namespace-packages to mypy arguments (diff) | |
download | qemu-beb6b57b3b1a1fe6ebc208d2edc12b504f69e29f.tar.gz qemu-beb6b57b3b1a1fe6ebc208d2edc12b504f69e29f.tar.xz qemu-beb6b57b3b1a1fe6ebc208d2edc12b504f69e29f.zip |
python: create qemu packages
move python/qemu/*.py to python/qemu/[machine, qmp, utils]/*.py and
update import directives across the tree.
This is done to create a PEP420 namespace package, in which we may
create subpackages. To do this, the namespace directory ("qemu") should
not have any modules in it. Those files will go into new 'machine',
'qmp' and 'utils' subpackages instead.
Implement machine/__init__.py making the top-level classes and functions
from its various modules available directly inside the package. Change
qmp.py to qmp/__init__.py similarly, such that all of the useful QMP
library classes are available directly from "qemu.qmp" instead of
"qemu.qmp.qmp".
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-id: 20210527211715.394144-10-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'tests/vm/basevm.py')
-rw-r--r-- | tests/vm/basevm.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 995e642465..0f2e436ed3 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -19,9 +19,8 @@ import logging import time import datetime sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.accel import kvm_available from qemu.machine import QEMUMachine -from qemu.utils import get_info_usernet_hostfwd_port +from qemu.utils import get_info_usernet_hostfwd_port, kvm_available import subprocess import hashlib import argparse |