|
From: | John Snow |
Subject: | Re: [PATCH 10/22] Python: add utility function for retrieving port redirection |
Date: | Mon, 15 Feb 2021 14:43:43 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/15/21 1:27 PM, Cleber Rosa wrote:
It's hard to find the right balance here. If you take a look at what John is proposing wrt the packaging the "qemu" Python libs, I believe one module is a good compromise at this point. I really to expect that it will grow and that more modules will be created.
Yeah. We have a "qmp" package and a "machine" package, and these seem very well-defined.
Then we have everything else which is mostly a few random bits and pieces (at the moment: just accel.py). Over time those bits and pieces might take shape as something more important/meaningful, but for now it's pretty nebulous.
An emerging pattern I see is that these functions are "environment analysis" helpers; things designed to help interrogate the local environment to choose appropriate QEMU flags, or otherwise "QEMU output analysis", things designed to make better sense of the output received from QEMU.
accel.py is the former, this patch targets the latter.I suspect accel.py will want to belong to "smart" tools for booting up an arbitrary VM (interrogate, decide on config, launch) whereas this patch fits into a class of API-esque tools designed for making sense of I/O information.
It's meant to digest HMP, though -- is this evidence that we need a better QMP command? We shouldn't be using HMP for machine driven testing. (I know we have to sometimes, but we should be working towards eliminating it.)
-js
[Prev in Thread] | Current Thread | [Next in Thread] |