diff options
author | Daniel Smith <daniel.smith@ericsson.com> | 2015-12-09 10:08:28 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-12-09 10:08:28 +0000 |
commit | 2e2d69dcef35b57c57f30b7f3a96d32353e9bc05 (patch) | |
tree | 11b929c439dd5823f6b56a403c4452797a2b1d56 /deploy/environments/virtual_fuel.py | |
parent | 90722b2a0de85d9b60130883b1b4f7b0e21dcffd (diff) | |
parent | faecd53622b233f72961ce626ef70788b8a12562 (diff) |
Merge "Refactor temporary directory creation"
Diffstat (limited to 'deploy/environments/virtual_fuel.py')
-rw-r--r-- | deploy/environments/virtual_fuel.py | 3 |
1 files changed, 2 insertions, 1 deletions
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( |