On Mon, Sep 23, 2013 at 05:15:00PM +0200, Klaus Aehlig wrote:
> One feature of the new private-module layout is that a python
> script cannot simply 'import ganeti'. The reason is that the
> interfaces to these modules are not stable and hence should not
> be used outside Ganeti. However, this is what the burnin test
> in the qa does. The good news is that we know that the burnin
> script will always be from the same version of ganeti as the
> one we're testing against; so we can simply provide the appropriate
> PYTHONPATH.
> 
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  qa/qa_cluster.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py
> index 93f3ac1..c58abde 100644
> --- a/qa/qa_cluster.py
> +++ b/qa/qa_cluster.py
> @@ -27,6 +27,7 @@ import re
>  import tempfile
>  import os.path
>  
> +from ganeti import _autoconf
>  from ganeti import constants
>  from ganeti import compat
>  from ganeti import utils
> @@ -1110,7 +1111,9 @@ def TestClusterBurnin():
>      try:
>        disks = qa_config.GetDiskOptions()
>        # Run burnin
> -      cmd = [script,
> +      cmd = ["env",
> +             "PYTHONPATH=%s" % _autoconf.VERSIONEDSHAREDIR,
> +             script,
>               "--os=%s" % qa_config.get("os"),
>               "--minmem-size=%s" % qa_config.get(constants.BE_MINMEM),
>               "--maxmem-size=%s" % qa_config.get(constants.BE_MAXMEM),
> -- 
> 1.8.4
> 

LGTM.

Thanks,
Jose

-- 
Jose Antonio Lopes
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to