1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-29 02:08:10 +00:00

Fix import of project with no disk

Ref #590
This commit is contained in:
Julien Duponchelle 2016-06-27 12:38:18 +02:00
parent 5898b86dfc
commit 1f0fe6d304
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -647,7 +647,6 @@ class Project:
"iou": "IOUDevice",
"docker": "DockerVM"
}
vm_directory = os.path.join(self.path, "servers", "vm", "project-files")
vm_server_use = False
@ -657,11 +656,11 @@ class Project:
os.makedirs(vm_directory, exist_ok=True)
shutil.move(module_directory, os.path.join(vm_directory, module))
# Patch node to use the GNS3 VM
for node in topology["topology"]["nodes"]:
if node["type"] == device_type:
node["server_id"] = 2
vm_server_use = True
# Patch node to use the GNS3 VM
for node in topology["topology"]["nodes"]:
if node["type"] == device_type:
node["server_id"] = 2
vm_server_use = True
# We use the GNS3 VM. We need to add the server to the list
if vm_server_use: