1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Fix import of some old topologies

Fix #977
This commit is contained in:
Julien Duponchelle 2017-04-14 10:38:21 +02:00
parent 57cdef6b02
commit f3a87d76ef
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -259,8 +259,11 @@ def _convert_1_3_later(topo, topo_path):
except KeyError: except KeyError:
node["compute_id"] = "local" node["compute_id"] = "local"
node["console_type"] = old_node["properties"].get("console_type", "telnet") node["console_type"] = old_node["properties"].get("console_type", "telnet")
node["name"] = old_node["label"]["text"] if "label" in old_node:
node["label"] = _convert_label(old_node["label"]) node["name"] = old_node["label"]["text"]
node["label"] = _convert_label(old_node["label"])
else:
node["name"] = old_node["properties"]["name"]
node["node_id"] = old_node.get("vm_id", str(uuid.uuid4())) node["node_id"] = old_node.get("vm_id", str(uuid.uuid4()))
node["symbol"] = old_node.get("symbol", None) node["symbol"] = old_node.get("symbol", None)