diff --git a/backend/disks/disk_paths.py b/backend/disks/disk_paths.py index daa05ea..9e3effd 100644 --- a/backend/disks/disk_paths.py +++ b/backend/disks/disk_paths.py @@ -25,10 +25,6 @@ class DiskPaths: def nvram_target_path(self): return self.storage_host_path / self.persistence_type / self.nvram_target_filename - @property - def staging_path(self): - return self.storage_host_path / 'staging' - @property def storage_host_path(self): return self.STORAGE_HOSTS_PATH / self.storage_host diff --git a/backend/disks/disk_utils.py b/backend/disks/disk_utils.py index c2641d9..e6a054d 100644 --- a/backend/disks/disk_utils.py +++ b/backend/disks/disk_utils.py @@ -4,7 +4,7 @@ import subprocess import tempfile def create_os_disk(paths): - with tempfile.TemporaryDirectory(dir=paths.staging_path) as temporary_directory: + with tempfile.TemporaryDirectory(dir=paths.target_path.parent) as temporary_directory: temporary_path = pathlib.Path(temporary_directory) / 'disk.qcow2' subprocess.run( @@ -22,7 +22,7 @@ def create_os_disk(paths): temporary_path.replace(paths.target_path) def create_nvram_disk(paths): - with tempfile.TemporaryDirectory(dir=paths.staging_path) as temporary_directory: + with tempfile.TemporaryDirectory(dir=paths.nvram_target_path.parent) as temporary_directory: temporary_path = pathlib.Path(temporary_directory) / 'NVRAM.img' shutil.copyfile(paths.nvram_path, temporary_path)