| f37c34d6 | 23-Aug-2021 |
G S Niteesh Babu <niteesh.gs@gmail.com> |
python: add optional pygments dependency
Added pygments as optional dependency for AQMP TUI. This is required for the upcoming syntax highlighting feature in AQMP TUI. The dependency has also been a
python: add optional pygments dependency
Added pygments as optional dependency for AQMP TUI. This is required for the upcoming syntax highlighting feature in AQMP TUI. The dependency has also been added in the devel optional group.
Added mypy 'ignore_missing_imports' for pygments since it does not have any type stubs.
Signed-off-by: G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-5-niteesh.gs@gmail.com> Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 35755f7d | 23-Aug-2021 |
G S Niteesh Babu <niteesh.gs@gmail.com> |
python: Add entry point for aqmp-tui
Add an entry point for aqmp-tui. This will allow it to be run from the command line using "aqmp-tui localhost:1234" More options available in the TUI can be foun
python: Add entry point for aqmp-tui
Add an entry point for aqmp-tui. This will allow it to be run from the command line using "aqmp-tui localhost:1234" More options available in the TUI can be found using "aqmp-tui -h"
Signed-off-by: G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-4-niteesh.gs@gmail.com> Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| aeb6b48a | 23-Aug-2021 |
G S Niteesh Babu <niteesh.gs@gmail.com> |
python/aqmp-tui: Add AQMP TUI
Added AQMP TUI.
Implements the follwing basic features: 1) Command transmission/reception. 2) Shows events asynchronously. 3) Shows server status in the bottom status
python/aqmp-tui: Add AQMP TUI
Added AQMP TUI.
Implements the follwing basic features: 1) Command transmission/reception. 2) Shows events asynchronously. 3) Shows server status in the bottom status bar. 4) Automatic retries on disconnects and error conditions.
Also added type annotations and necessary pylint/mypy configurations.
Signed-off-by: G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-3-niteesh.gs@gmail.com> Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 974e2f47 | 23-Aug-2021 |
G S Niteesh Babu <niteesh.gs@gmail.com> |
python: Add dependencies for AQMP TUI
Added dependencies for the upcoming AQMP TUI under the optional 'tui' group.
The same dependencies have also been added under the devel group since no work aro
python: Add dependencies for AQMP TUI
Added dependencies for the upcoming AQMP TUI under the optional 'tui' group.
The same dependencies have also been added under the devel group since no work around has been found for optional groups to imply other optional groups.
Signed-off-by: G S Niteesh Babu <niteesh.gs@gmail.com> Message-Id: <20210823220746.28295-2-niteesh.gs@gmail.com> Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| a4ffaecd | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: Add Coverage.py support
I'm not exposing this via the Makefile help, it's not likely to be useful to passersby. Switch the avocado runner to the 'legacy' runner for now, as the new runn
python/aqmp: Add Coverage.py support
I'm not exposing this via the Makefile help, it's not likely to be useful to passersby. Switch the avocado runner to the 'legacy' runner for now, as the new runner seems to obscure coverage reports, again.
Usage is to enter your venv of choice and then: `make check-coverage && xdg-open htmlcov/index.html`.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-28-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 8193b9d1 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add LineProtocol tests
Tests a real connect, a real accept, and really sending and receiving a message over a UNIX socket.
Brings coverage of protocol.py up to ~93%.
Signed-off-by: Jo
python/aqmp: add LineProtocol tests
Tests a real connect, a real accept, and really sending and receiving a message over a UNIX socket.
Brings coverage of protocol.py up to ~93%.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-27-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| a1f71b61 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add AsyncProtocol unit tests
This tests most of protocol.py -- From a hacked up Coverage.py run, it's at about 86%. There's a few error cases that aren't very well tested yet, they're h
python/aqmp: add AsyncProtocol unit tests
This tests most of protocol.py -- From a hacked up Coverage.py run, it's at about 86%. There's a few error cases that aren't very well tested yet, they're hard to induce artificially so far. I'm working on it.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-26-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 4320f717 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python: bump avocado to v90.0
Avocado v90 includes improved support for running async unit tests. The workaround that existed prior to v90 causes the unit tests to fail afterwards, however, so upgra
python: bump avocado to v90.0
Avocado v90 includes improved support for running async unit tests. The workaround that existed prior to v90 causes the unit tests to fail afterwards, however, so upgrade our minimum version pin to the very latest and greatest.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-25-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| ed6d4d7a | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add scary message
Add a warning whenever AQMP is used to steer people gently away from using it for the time-being.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 202109151629
python/aqmp: add scary message
Add a warning whenever AQMP is used to steer people gently away from using it for the time-being.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-24-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| debbabd7 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add asyncio_run compatibility wrapper
As a convenience. It isn't used by the library itself, but it is used by the test suite. It will also come in handy for users of the library still
python/aqmp: add asyncio_run compatibility wrapper
As a convenience. It isn't used by the library itself, but it is used by the test suite. It will also come in handy for users of the library still on Python 3.6.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-23-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 41f4f922 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add _raw() execution interface
This is added in anticipation of wanting it for a synchronous wrapper for the iotest interface. Normally, execute() and execute_msg() both raise QMP error
python/aqmp: add _raw() execution interface
This is added in anticipation of wanting it for a synchronous wrapper for the iotest interface. Normally, execute() and execute_msg() both raise QMP errors in the form of Python exceptions.
Many iotests expect the entire reply as-is. To reduce churn there, add a private execution interface that will ease transition churn. However, I do not wish to encourage its use, so it will remain a private interface.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-22-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| e0fea0b3 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add execute() interfaces
Add execute() and execute_msg().
_execute() is split into _issue() and _reply() halves so that hypothetical subclasses of QMP that want to support different ex
python/aqmp: add execute() interfaces
Add execute() and execute_msg().
_execute() is split into _issue() and _reply() halves so that hypothetical subclasses of QMP that want to support different execution paradigms can do so.
I anticipate a synchronous interface may have need of separating the send/reply phases. However, I do not wish to expose that interface here and want to actively discourage it, so they remain private interfaces.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-21-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 577737be | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: Add message routing to QMP protocol
Add the ability to handle and route messages in qmp_protocol.py. The interface for actually sending anything still isn't added until next commit.
Si
python/aqmp: Add message routing to QMP protocol
Add the ability to handle and route messages in qmp_protocol.py. The interface for actually sending anything still isn't added until next commit.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-20-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 4cd17f37 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/pylint: disable no-member check
mypy handles this better -- but we only need the workaround because pylint under Python 3.6 does not understand that a MutableMapping really does have a .get()
python/pylint: disable no-member check
mypy handles this better -- but we only need the workaround because pylint under Python 3.6 does not understand that a MutableMapping really does have a .get() method attached.
We could remove this again once 3.7 is our minimum.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-19-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| c67d696b | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add QMP protocol support
The star of our show!
Add most of the QMP protocol, sans support for actually executing commands. No problem, that happens in the next several commits.
Signed
python/aqmp: add QMP protocol support
The star of our show!
Add most of the QMP protocol, sans support for actually executing commands. No problem, that happens in the next several commits.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-18-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 29a8ea9b | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/pylint: disable too-many-function-args
too-many-function-args seems prone to failure when considering things like Method Resolution Order, which mypy gets correct. When dealing with multiple
python/pylint: disable too-many-function-args
too-many-function-args seems prone to failure when considering things like Method Resolution Order, which mypy gets correct. When dealing with multiple inheritance, pylint doesn't seem to understand which method will actually get called, while mypy does.
Remove the less powerful, redundant check.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-17-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| b3cda213 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add QMP event support
This class was designed as a "mix-in" primarily so that the feature could be given its own treatment in its own python module.
It gets quite a bit too long otherw
python/aqmp: add QMP event support
This class was designed as a "mix-in" primarily so that the feature could be given its own treatment in its own python module.
It gets quite a bit too long otherwise.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-16-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| ad072999 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add well-known QMP object models
The QMP spec doesn't define very many objects that are iron-clad in their format, but there are a few. This module makes it trivial to validate them wit
python/aqmp: add well-known QMP object models
The QMP spec doesn't define very many objects that are iron-clad in their format, but there are a few. This module makes it trivial to validate them without relying on an external third-party library.
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-15-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 08f98a22 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add QMP Message format
The Message class is here primarily to serve as a solid type to use for mypy static typing for unambiguous annotation and documentation.
We can also stuff JSON s
python/aqmp: add QMP Message format
The Message class is here primarily to serve as a solid type to use for mypy static typing for unambiguous annotation and documentation.
We can also stuff JSON serialization and deserialization into this class itself so it can be re-used even outside this infrastructure.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-14-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 762bd4d7 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add AsyncProtocol._readline() method
This is added as a courtesy: many protocols are line-based, including QMP. Putting it in AsyncProtocol lets us keep the QMP class implementation jus
python/aqmp: add AsyncProtocol._readline() method
This is added as a courtesy: many protocols are line-based, including QMP. Putting it in AsyncProtocol lets us keep the QMP class implementation just a pinch more abstract.
(And, if we decide to add a QTEST implementation later, it will need this, too. (Yes, I have a QTEST implementation.))
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-13-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 12c7a57f | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add _cb_inbound and _cb_outbound logging hooks
Add hooks designed to log/filter incoming/outgoing messages. The primary intent for these is to be able to support iotests which may want
python/aqmp: add _cb_inbound and _cb_outbound logging hooks
Add hooks designed to log/filter incoming/outgoing messages. The primary intent for these is to be able to support iotests which may want to log messages with specific filters for reproducible output.
Another use is for plugging into Urwid frameworks; all messages in/out can be automatically added to a rendering list for the purposes of a qmp-shell like tool.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-12-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 2686ac13 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add configurable read buffer limit
QMP can transmit some pretty big messages, and the default limit of 64KB isn't sufficient. Make sure that we can configure it.
Reported-by: G S Nitee
python/aqmp: add configurable read buffer limit
QMP can transmit some pretty big messages, and the default limit of 64KB isn't sufficient. Make sure that we can configure it.
Reported-by: G S Niteesh Babu <niteesh.gs@gmail.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-11-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 774c64a5 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add AsyncProtocol.accept() method
It's a little messier than connect, because it wasn't designed to accept *precisely one* connection. Such is life.
Signed-off-by: John Snow <jsnow@red
python/aqmp: add AsyncProtocol.accept() method
It's a little messier than connect, because it wasn't designed to accept *precisely one* connection. Such is life.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-10-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| 50e53306 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add logging to AsyncProtocol
Give the connection and the reader/writer tasks nicknames, and add logging statements throughout.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by:
python/aqmp: add logging to AsyncProtocol
Give the connection and the reader/writer tasks nicknames, and add logging statements throughout.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-9-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
| c1408345 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: Add logging utility helpers
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-8-jsnow@redhat.com Signed-off-by: J
python/aqmp: Add logging utility helpers
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-8-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|