From ab4c8665e4cfc4b6d7ff7298c3bc55ca7135470c Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 9 Nov 2015 14:17:19 +0100 Subject: [PATCH] Fix backup projects and a qemu broken tests --- gns3server/handlers/upload_handler.py | 9 +++++++++ tests/modules/qemu/test_qemu_vm.py | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gns3server/handlers/upload_handler.py b/gns3server/handlers/upload_handler.py index af707062..a0526950 100644 --- a/gns3server/handlers/upload_handler.py +++ b/gns3server/handlers/upload_handler.py @@ -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): """ diff --git a/tests/modules/qemu/test_qemu_vm.py b/tests/modules/qemu/test_qemu_vm.py index 7523dbaf..c4c49846 100644 --- a/tests/modules/qemu/test_qemu_vm.py +++ b/tests/modules/qemu/test_qemu_vm.py @@ -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"