mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 07:48:10 +00:00
Change the compute id to the GNS3 VM if it's not a Linux host
This commit is contained in:
@ -123,7 +123,7 @@ def _export_project_file(project, path, z, include_images):
|
||||
if node["node_type"] in ["virtualbox", "vmware", "cloud"]:
|
||||
raise aiohttp.web.HTTPConflict(text="Topology with a {} could not be exported".format(node["node_type"]))
|
||||
|
||||
node["compute_id"] = "local" # To make project portable all node by default run on local
|
||||
node["compute_id"] = "local" # To make project portable all node by default run on local
|
||||
|
||||
if "properties" in node and node["node_type"] != "Docker":
|
||||
for prop, value in node["properties"].items():
|
||||
@ -133,12 +133,11 @@ def _export_project_file(project, path, z, include_images):
|
||||
images.add(value)
|
||||
|
||||
if "topology" in topology:
|
||||
topology["topology"]["computes"] = [] # Strip compute informations because could contain secret info like password
|
||||
topology["topology"]["computes"] = [] # Strip compute informations because could contain secret info like password
|
||||
|
||||
for image in images:
|
||||
_export_images(project, image, z)
|
||||
|
||||
|
||||
z.writestr("project.gns3", json.dumps(topology).encode())
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user