aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/environments
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/environments')
-rw-r--r--deploy/environments/libvirt_environment.py3
-rw-r--r--deploy/environments/virtual_fuel.py3
2 files changed, 4 insertions, 2 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')
diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
index 705eee48b..89a82c078 100644
--- a/deploy/environments/virtual_fuel.py
+++ b/deploy/environments/virtual_fuel.py
@@ -10,6 +10,7 @@
from lxml import etree
from execution_environment import ExecutionEnvironment
+import tempfile
from common import (
exec_cmd,
@@ -45,7 +46,7 @@ class VirtualFuel(ExecutionEnvironment):
vm_xml.write(f, pretty_print=True, xml_declaration=True)
def create_vm(self):
- temp_dir = exec_cmd('mktemp -d')
+ temp_dir = tempfile.mkdtemp()
vm_name = self.dha.get_node_property(self.fuel_node_id, 'libvirtName')
vm_template = '%s/%s' % (self.root_dir,
self.dha.get_node_property(