- Jun 25, 2021
-
-
Alex Bennée authored
Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway. Suggested-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210623102749.25686-4-alex.bennee@linaro.org>
-
- Jun 18, 2021
-
-
John Snow authored
qmp-shell has a new home, add a redirect for a little while as the dust settles. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-43-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
The script will be unavailable for a commit or two, which will help preserve development history attached to the new file. A forwarder will be added shortly afterwards. With qmp_shell in the python qemu.qmp package, now it is fully type checked, linted, etc. via the Python CI. It will be quite a bit harder to accidentally break it again in the future. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-41-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-40-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
In preparation for moving qmp-shell into the qemu.qmp package, make QMPShellError inherit from QMPError so that all custom errors in this package all derive from QMPError. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-39-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
They're not needed; single underscore is enough to express intent that these methods are "internal". double underscore is used as a weak name mangling, but that isn't beneficial for us here. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-38-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
The nice usage comment should be a docstring instead of a comment, so that it's visible from other python tooling. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-37-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
We are only anticipating QMPShellErrors here, for syntax we weren't able to understand. Other errors, if any, should be allowed to percolate upwards. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-36-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
calling "transaction( )" is pointless, but valid. Rework the parser to allow this kind of invocation. This helps clean up exception handling later by removing accidental breakages of the parser that aren't explicitly forbidden. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-35-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
We still want to revamp qmp-shell again, but there's much more to the idea than the comment now intuits. Remove it. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-34-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
A perfect candidate is non-fatal shell history messages. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-33-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
We can invoke the shell history writing when we leave the QMPShell scope instead of relying on atexit. Doing so may be preferable to avoid global state being registered from within a class instead of from the application logic directly. Use QMP's context manager to hook this history saving at close time, which gets invoked when we leave the context block. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-32-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Similar to verbose, there's no reason this needs to be hidden. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-30-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Don't "extend" QEMUMonitorProtocol by changing the argument types. Move the string parsing just outside of the class instead. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-29-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
As per my usual, this patch is annotations only. Any changes with side effects are done elsewhere. Note: pylint does not understand the subscripts for Collection in Python 3.6, so use the stronger Sequence type as a workaround. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-28-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Add an empty completer as a more type-safe placeholder instead of 'None'. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-26-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
list is a generic type, but we expect to use strings directly. We could subclass list[str], but pylint does not presently understand that invocation. Change this class to envelop a list instead of *being* a list, for simpler mypy typing. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-25-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
I'm not sure when this regressed (Or maybe if it was ever working right to begin with?), but the Python AST requires you to change "Names" to "Constants" in order to truly convert `false` to `False`. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-24-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Instead of doing this in main, move it into the class itself. (This makes it easier to put into the qemu.qmp package later by removing as much as we can from the main() function.) Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-23-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
It's only ever used by one caller, we can just absorb that logic. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-22-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Small tidying; treat "prompt" like an immutable property instead of function/method/routine. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-21-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
No real reason to hide this behind an underscore; make it part of the initializer and make it a regular RW attribute. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-20-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
It's less useful, but it makes the initialization methods LSP consistent, which quiets a mypy complaint. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-19-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Use argparse instead of an open-coded CLI parser, for consistency with everything else. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-18-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
A bit more idiomatic, and quiets some linter warnings. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-17-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Shushes pylint. I don't always mind these patterns personally, but I'm not as sure that I want to remove the warning from pylint's repertoire entirely. Oh well. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-16-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
We want to remove exceptions that are too broad here; we only want to catch IOErrors that get raised as a direct result of the open call. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-15-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
A bit of churn and housekeeping for pylint, flake8 et al. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-14-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
This function returns None when it doesn't find a match; do that explicitly. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-13-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Not something I control, sorry, pylint. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-12-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
(2014 me had never written python before.) Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-11-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Linters get angry when we don't define state at init time. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-10-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-9-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Methods with no self-use should belong to the class. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-8-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Don't use 'qmp' here, which shadows the qmp module. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-7-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
It needs to match the parent's signature -- the negotiate parameter must be optional. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-6-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Fixes: 50d189c9 Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-5-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
The signatures need to match. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-4-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
A lot of fiddling around to get us below 80 columns. Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-3-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
Signed-off-by:
John Snow <jsnow@redhat.com> Message-id: 20210607200649.1840382-2-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-