|
From: | Niteesh G. S. |
Subject: | Re: [PATCH v2 3/6] python/aqmp-tui: Add AQMP TUI draft |
Date: | Tue, 20 Jul 2021 23:31:48 +0530 |
On Tue, Jul 13, 2021 at 6:07 PM G S Niteesh Babu <niteesh.gs@gmail.com> wrote:Added a draft of AQMP TUI.
Implements the follwing basic features:
1) Command transmission/reception.
2) Shows events asynchronously.
3) Shows server status in the bottom status bar.
Also added necessary pylint, mypy configurations
Signed-off-by: G S Niteesh Babu <niteesh.gs@gmail.com>
---
python/qemu/aqmp/aqmp_tui.py | 332 +++++++++++++++++++++++++++++++++++
python/setup.cfg | 21 ++-
2 files changed, 352 insertions(+), 1 deletion(-)
create mode 100644 python/qemu/aqmp/aqmp_tui.py
diff --git a/python/qemu/aqmp/aqmp_tui.py b/python/qemu/aqmp/aqmp_tui.py
new file mode 100644
index 0000000000..f853efc1f5
--- /dev/null
+++ b/python/qemu/aqmp/aqmp_tui.py
@@ -0,0 +1,332 @@
+# Copyright (c) 2021
+#
+# Authors:
+# Niteesh Babu G S <niteesh.gs@gmail.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+import argparse
+import asyncio
+import logging
+from logging import Handler
+import signal
+
+import urwid
+import urwid_readline
+
+from .error import MultiException
+from .protocol import ConnectError
+from .qmp_protocol import QMP, ExecInterruptedError, ExecuteError
+from .util import create_task, pretty_traceback
+
+
+UPDATE_MSG = 'UPDATE_MSG'
+
+# Using root logger to enable all loggers under qemu and asyncio
+LOGGER = logging.getLogger()
+
+palette = [
+ (Token.Punctuation, '', '', '', 'h15,bold', 'g7'),
+ (Token.Text, '', '', '', '', 'g7'),
+ (Token.Name.Tag, '', '', '', 'bold,#f88', 'g7'),
+ (Token.Literal.Number.Integer, '', '', '', '#fa0', 'g7'),
+ (Token.Literal.String.Double, '', '', '', '#6f6', 'g7'),
+ (Token.Keyword.Constant, '', '', '', '#6af', 'g7'),
+ ('background', '', 'black', '', '', 'g7'),
+]
+It looks like this bled forward, this part belongs in the next patch. Can you fix this and re-send?jsnow@scv ~/s/q/python (review)> make check-dev
ACTIVATE .dev-venv
make[1]: Entering directory '/home/jsnow/src/qemu/python'
JOB ID : f766a463cfc6bd3f0d6286e0653752bb8bc5ea6f
JOB LOG : /home/jsnow/avocado/job-results/job-2021-07-20T13.55-f766a46/job.log
(1/4) tests/flake8.sh: FAIL: Exited with status: '1' (0.36 s)
(2/4) tests/isort.sh: PASS (0.11 s)
(3/4) tests/mypy.sh: FAIL: Exited with status: '1' (0.36 s)
(4/4) tests/pylint.sh: FAIL: Exited with status: '2' (6.62 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 3 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME : 7.80 s
Log file "stdout" content for test "1-tests/flake8.sh" (FAIL):
qemu/aqmp/aqmp_tui.py:30:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:31:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:32:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:33:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:34:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:35:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:138:21: F821 undefined name 'lexers'While you're at it, you might as well rebase on top of AQMP v2.
[Prev in Thread] | Current Thread | [Next in Thread] |