On Thu, Dec 30, 2010 at 03:16:56PM -0200, Lucas Meneghel Rodrigues wrote:
> Hi folks, after some discussion we had I'd like to update the proposal
> of moving the current kvm autotest only libraries to a shared location
> inside autotest. Differences from the previous proposal:
> 
> * Put the new packages under client directory instead of client/bin.
> * Have a kvm package for code that is far too kvm specific
> 
> So this is what we envision for the code organization (hope the short,
> condensed version is easy enough to understand):
> 
> Libraries with very specific kvm code:
> 
> from autotest_lib.client.kvm import monitor
> from autotest_lib.client.kvm import installer
> 
> Libraries shared by several hypervisors testing:
> 
> I propose to merge the library that is going to hold the environment
> class and the pre/postprocessing code as:
> 
> from autotest_lib.client.virt import env
> 
> Other libs:
> 
> from autotest_lib.client.virt import scheduler
> from autotest_lib.client.virt import utils
> from autotest_lib.client.virt import test_utils
> from autotest_lib.client.virt import vm
> from autotest_lib.client.virt import rss_client

Looks better to me. Not perfect (the length of the module paths still
bother me), but I guess we don't have much flexibility to create generic
helper modules/packages inside autotest_lib (outside the client dir).

> 
> Libraries that can be used by all client side tests
> 
> from autotest_lib.client.bin import test_config
> from autotest_lib.client.bin import subprocess

I am still wondering why we use the "bin" subdirectory instead of just
using, e.g. "autotest_lib.client.subprocess".

My opinion is that as autotest_lib.client is a Python package, we
shouldn't be afraid to add modules or packages inside it. Code
maintainability and readability (in this case, due to a saner module
namespace) seems to be more important to me than keeping the number of
files inside the 'client' directory small. I don't know what others
think.

-- 
Eduardo
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to