summary refs log tree commit diff stats
path: root/python/qemu/qmp.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-03-19 12:33:50 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-03-19 12:33:50 +0000
commita1ba62a0f304291c96939cbf7c38e2ab68770326 (patch)
tree836d9da300465eb53e0ce447d562cec25620fb12 /python/qemu/qmp.py
parentce73691e2588950a854b8b63a8ecd81f69eda458 (diff)
parenta51d6a549361fd1a20dd2ac1d6a42ac0a4c708c7 (diff)
downloadfocaccia-qemu-a1ba62a0f304291c96939cbf7c38e2ab68770326.tar.gz
focaccia-qemu-a1ba62a0f304291c96939cbf7c38e2ab68770326.zip
Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into staging
Python and tests (mostly acceptance) patches 2020-03-17

# gpg: Signature made Wed 18 Mar 2020 00:16:03 GMT
# gpg:                using RSA key 7ABB96EB8B46B94D5E0FE9BB657E8D33A5F209F3
# gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3

* remotes/cleber/tags/python-next-pull-request:
  tests/docker: make "buildah bud" output similar to "docker build"
  tests/docker: add CentOS 8 Dockerfile
  Acceptance tests: add make targets to download images
  Acceptance test: add "boot_linux" tests
  Acceptance tests: introduce BUILD_DIR and SOURCE_DIR
  python/qemu/qmp.py: QMP debug with VM label

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'python/qemu/qmp.py')
-rw-r--r--python/qemu/qmp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py
index f40586eedd..d6c9b2f4b1 100644
--- a/python/qemu/qmp.py
+++ b/python/qemu/qmp.py
@@ -46,7 +46,7 @@ class QEMUMonitorProtocol:
     #: Logger object for debugging messages
     logger = logging.getLogger('QMP')
 
-    def __init__(self, address, server=False):
+    def __init__(self, address, server=False, nickname=None):
         """
         Create a QEMUMonitorProtocol class.
 
@@ -62,6 +62,9 @@ class QEMUMonitorProtocol:
         self.__address = address
         self.__sock = self.__get_sock()
         self.__sockfile = None
+        self._nickname = nickname
+        if self._nickname:
+            self.logger = logging.getLogger('QMP').getChild(self._nickname)
         if server:
             self.__sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
             self.__sock.bind(self.__address)