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

Fix #950
This commit is contained in:
Julien Duponchelle committed 2017-03-20 16:21:09 +01:00
1 parent 0997998064
commit bc0e4c1174
1 file changed
+1 -1
+1 -1
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"])