Fix backup projects and a qemu broken tests

This commit is contained in:
Julien Duponchelle 2015-11-09 14:17:19 +01:00
parent ac16ee5bc6
commit ab4c8665e4
2 changed files with 9 additions and 1 deletions

View File

@ -104,6 +104,15 @@ class UploadHandler:
def backup_images(request, response):
yield from UploadHandler._backup_directory(request, response, UploadHandler.image_directory())
@classmethod
@Route.get(
r"/backup/projects.tar",
description="Backup GNS3 projects",
api_version=None
)
def backup_projects(request, response):
yield from UploadHandler._backup_directory(request, response, UploadHandler.project_directory())
@staticmethod
def _restore_directory(file, directory):
"""

View File

@ -261,7 +261,6 @@ def test_set_qemu_path_kvm_binary(vm, tmpdir, fake_qemu_binary):
with open(bin_path, "w+") as f:
f.write("1")
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
return bin_path
# It should find the binary in the path
vm.qemu_path = "qemu-kvm"