Try to fix some 1.3 topology with corrupted data

Fix #945
This commit is contained in:
Julien Duponchelle 2017-03-16 18:29:02 +01:00
parent 31ed2a4c96
commit 490576fedc
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -253,7 +253,10 @@ def _convert_1_3_later(topo, topo_path):
for old_node in topo.get("nodes", []):
node = {}
node["console"] = old_node["properties"].get("console", None)
node["compute_id"] = server_id_to_compute_id[old_node["server_id"]]
try:
node["compute_id"] = server_id_to_compute_id[old_node["server_id"]]
except KeyError:
node["compute_id"] = "local"
node["console_type"] = old_node["properties"].get("console_type", "telnet")
node["name"] = old_node["label"]["text"]
node["label"] = _convert_label(old_node["label"])