aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/environments/libvirt_environment.py
diff options
context:
space:
mode:
authorDaniel Smith <daniel.smith@ericsson.com>2015-12-09 10:08:28 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-12-09 10:08:28 +0000
commit2e2d69dcef35b57c57f30b7f3a96d32353e9bc05 (patch)
tree11b929c439dd5823f6b56a403c4452797a2b1d56 /deploy/environments/libvirt_environment.py
parent90722b2a0de85d9b60130883b1b4f7b0e21dcffd (diff)
parentfaecd53622b233f72961ce626ef70788b8a12562 (diff)
Merge "Refactor temporary directory creation"
Diffstat (limited to 'deploy/environments/libvirt_environment.py')
-rw-r--r--deploy/environments/libvirt_environment.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/deploy/environments/libvirt_environment.py b/deploy/environments/libvirt_environment.py
index af2d3f8fb..c8a2ef529 100644
--- a/deploy/environments/libvirt_environment.py
+++ b/deploy/environments/libvirt_environment.py
@@ -11,6 +11,7 @@
from lxml import etree
import glob
from execution_environment import ExecutionEnvironment
+import tempfile
from common import (
exec_cmd,
@@ -42,7 +43,7 @@ class LibvirtEnvironment(ExecutionEnvironment):
exec_cmd('fallocate -l %s %s' % (disk_size, disk_path))
def create_vms(self):
- temp_dir = exec_cmd('mktemp -d')
+ temp_dir = tempfile.mkdtemp()
disk_sizes = self.dha.get_disks()
for node_id in self.node_ids:
vm_name = self.dha.get_node_property(node_id, 'libvirtName')