Revision 24d1788b snf-tools/synnefo_tools/burnin/common.py

b/snf-tools/synnefo_tools/burnin/common.py
36 36

  
37 37
"""
38 38

  
39
import os
40 39
import re
41 40
import shutil
42 41
import unittest
......
194 193
    images = None
195 194
    flavors = None
196 195
    delete_stale = False
196
    temp_directory = None
197 197

  
198 198
    quotas = Proper(value=None)
199 199

  
......
271 271
        return username
272 272

  
273 273
    def _create_tmp_directory(self):
274
        """Create a tmp directory
275

  
276
        In my machine /tmp has not enough space for an image
277
        to be saves, so we are going to use the current directory.
278

  
279
        """
280
        temp_dir = tempfile.mkdtemp(dir=os.getcwd())
274
        """Create a tmp directory"""
275
        temp_dir = tempfile.mkdtemp(dir=self.temp_directory)
281 276
        self.info("Temp directory %s created", temp_dir)
282 277
        return temp_dir
283 278

  
......
574 569
    BurninTests.flavors = opts.flavors
575 570
    BurninTests.images = opts.images
576 571
    BurninTests.delete_stale = opts.delete_stale
572
    BurninTests.temp_directory = opts.temp_directory
577 573
    BurninTests.run_id = SNF_TEST_PREFIX + \
578 574
        datetime.datetime.strftime(curr_time, "%Y%m%d%H%M%S")
579 575

  

Also available in: Unified diff