mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-31 05:13:49 +02:00
Fix backup projects and a qemu broken tests
This commit is contained in:
parent
ac16ee5bc6
commit
ab4c8665e4
@ -104,6 +104,15 @@ class UploadHandler:
|
|||||||
def backup_images(request, response):
|
def backup_images(request, response):
|
||||||
yield from UploadHandler._backup_directory(request, response, UploadHandler.image_directory())
|
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
|
@staticmethod
|
||||||
def _restore_directory(file, directory):
|
def _restore_directory(file, directory):
|
||||||
"""
|
"""
|
||||||
|
@ -261,7 +261,6 @@ def test_set_qemu_path_kvm_binary(vm, tmpdir, fake_qemu_binary):
|
|||||||
with open(bin_path, "w+") as f:
|
with open(bin_path, "w+") as f:
|
||||||
f.write("1")
|
f.write("1")
|
||||||
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||||
return bin_path
|
|
||||||
|
|
||||||
# It should find the binary in the path
|
# It should find the binary in the path
|
||||||
vm.qemu_path = "qemu-kvm"
|
vm.qemu_path = "qemu-kvm"
|
||||||
|
Loading…
Reference in New Issue
Block a user