1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Generate a node uuid if the uuid is missing in the .gns3

Fix #950
This commit is contained in:
Julien Duponchelle 2017-03-20 16:21:09 +01:00
parent 0997998064
commit bc0e4c1174
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -637,7 +637,7 @@ class Project:
for node in topology.get("nodes", []):
compute = self.controller.get_compute(node.pop("compute_id"))
name = node.pop("name")
node_id = node.pop("node_id")
node_id = node.pop("node_id", str(uuid.uuid4()))
yield from self.add_node(compute, name, node_id, dump=False, **node)
for link_data in topology.get("links", []):
link = yield from self.add_link(link_id=link_data["link_id"])