commit 2afd10bf411cd1170c96582b235645555fcdfddd
Author: Ilias Tsitsimpis <iliastsi@grnet.gr>
Date:   Thu Nov 21 11:38:22 2013 +0200

    snf-ci: Update burnin command line parameters
    
    Add the kamaki_version parameter to the ci config file.
    Using this parameter the user can specify a version of kamaki
    to be used (mostly by burnin).
    
    Force the use of version 0.11next-1811-197b413 for kamaki,
    as currently is the version that works with develop.

diff --git a/ci/ci_squeeze.conf b/ci/ci_squeeze.conf
index dfc7c17..a091eea 100644
--- a/ci/ci_squeeze.conf
+++ b/ci/ci_squeeze.conf
@@ -60,7 +60,11 @@ ssh_keys = ~/.ssh/id_rsa.pub
 [Burnin]
 # Maybe add some burnin options
 # (e.g. tests to run/ignore, timeouts etc)
-cmd_options = --nofailfast --no-ipv6 --action-timeout=240
+cmd_options = --images "name:.*" --flavors "name:C1R1...D5.*"
+# Kamaki version to be used (leave empty for default)
+# In some cases there is the need for a specific version
+# of kamaki to be used.
+kamaki_version = 0.11next-1811-197b413
 
 
 [Unit Tests]
diff --git a/ci/ci_wheezy.conf b/ci/ci_wheezy.conf
index 882b60a..e21ea84 100644
--- a/ci/ci_wheezy.conf
+++ b/ci/ci_wheezy.conf
@@ -60,7 +60,11 @@ ssh_keys = ~/.ssh/id_rsa.pub
 [Burnin]
 # Maybe add some burnin options
 # (e.g. tests to run/ignore, timeouts etc)
-cmd_options = --nofailfast --no-ipv6 --action-timeout=240
+cmd_options = --images "name:.*" --flavors "name:C1R1...D5.*"
+# Kamaki version to be used (leave empty for default)
+# In some cases there is the need for a specific version
+# of kamaki to be used.
+kamaki_version = 0.11next-1811-197b413
 
 
 [Unit Tests]
diff --git a/ci/utils.py b/ci/utils.py
index 490d0ee..9f3e388 100644
--- a/ci/utils.py
+++ b/ci/utils.py
@@ -731,12 +731,13 @@ class SynnefoCI(object):
     def build_packages(self):
         """Build packages needed by Synnefo software"""
         self.logger.info("Install development packages")
+        kamaki_version = self.config.get('Burnin', 'kamaki_version')
         cmd = """
         apt-get update
         apt-get install zlib1g-dev dpkg-dev debhelper git-buildpackage \
                 python-dev python-all python-pip ant --yes --force-yes
-        pip install -U devflow
-        """
+        pip install -U devflow kamaki{0}
+        """.format(("==" + kamaki_version) if kamaki_version else "")
         _run(cmd, False)
 
         # Patch pydist bug
@@ -881,17 +882,8 @@ class SynnefoCI(object):
         token=$(grep -e '^token =' .kamakirc | cut -d' ' -f3)
         images_user=$(kamaki image list -l | grep owner | \
                       cut -d':' -f2 | tr -d ' ')
-        snf-burnin --auth-url=$auth_url --token=$token \
-            --force-flavor=2 --image-id=all \
-            --system-images-user=$images_user \
-            {0}
+        snf-burnin --auth-url=$auth_url --token=$token {0}
         BurninExitStatus=$?
-        log_folder=$(ls -1d /var/log/burnin/* | tail -n1)
-        for i in $(ls $log_folder/*/details*); do
-            echo -e "\\n\\n"
-            echo -e "***** $i\\n"
-            cat $i
-        done
         exit $BurninExitStatus
         """.format(self.config.get('Burnin', 'cmd_options'))
         _run(cmd, True)
diff --git a/snf-tools/synnefo_tools/burnin/common.py b/snf-tools/synnefo_tools/burnin/common.py
index 86f22f1..67eb1b6 100644
--- a/snf-tools/synnefo_tools/burnin/common.py
+++ b/snf-tools/synnefo_tools/burnin/common.py
@@ -452,9 +452,10 @@ def initialize(opts, testsuites, stale_testsuites):
     """
     # Initialize logger
     global logger  # Using global statement. pylint: disable-msg=C0103,W0603
+    curr_time = datetime.datetime.now()
     logger = Log(opts.log_folder, verbose=opts.verbose,
                  use_colors=opts.use_colors, in_parallel=False,
-                 quiet=opts.quiet)
+                 quiet=opts.quiet, curr_time=curr_time)
 
     # Initialize clients
     Clients.auth_url = opts.auth_url
@@ -470,7 +471,7 @@ def initialize(opts, testsuites, stale_testsuites):
     BurninTests.images = opts.images
     BurninTests.delete_stale = opts.delete_stale
     BurninTests.run_id = SNF_TEST_PREFIX + \
-        datetime.datetime.strftime(datetime.datetime.now(), "%Y%m%d%H%M%S")
+        datetime.datetime.strftime(curr_time, "%Y%m%d%H%M%S")
 
     # Choose tests to run
     if opts.show_stale:
diff --git a/snf-tools/synnefo_tools/burnin/logger.py b/snf-tools/synnefo_tools/burnin/logger.py
index 4b8c6dd..69d2325 100644
--- a/snf-tools/synnefo_tools/burnin/logger.py
+++ b/snf-tools/synnefo_tools/burnin/logger.py
@@ -212,7 +212,7 @@ class Log(object):
     # ----------------------------------
     # Too many arguments. pylint: disable-msg=R0913
     def __init__(self, output_dir, verbose=1, use_colors=True,
-                 in_parallel=False, quiet=False):
+                 in_parallel=False, quiet=False, curr_time=None):
         """Initialize our loggers
 
         The file to be used by our file logger will be created inside
@@ -252,14 +252,14 @@ class Log(object):
                 sys.stderr.write(msg)
                 sys.exit("Failed to create log folder")
 
+        if curr_time is None:
+            curr_time = datetime.datetime.now()
         timestamp = datetime.datetime.strftime(
-            datetime.datetime.now(), "%Y%m%d%H%M%S (%a %b %d %Y %H:%M)")
+            curr_time, "%Y%m%d%H%M%S (%a %b %d %Y %H:%M)")
         file_name = timestamp + ".log"
         self.file_location = os.path.join(output_dir, file_name)
 
-        timestamp = datetime.datetime.strftime(
-            datetime.datetime.now(), "%a %b %d %Y %H:%M")
-        self._write_to_stdout(None, "Starting burnin (%s)\n" % timestamp)
+        self._write_to_stdout(None, "Starting burnin with id %s\n" % timestamp)
 
         # Create the logging file
         self._create_logging_file(timestamp)
