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

Fix error with console type in Ethernet switch schema. Fixes #1659

This commit is contained in:
grossmj 2019-10-08 17:16:17 +08:00
parent 51a92b46dd
commit 2f57bd58c0
2 changed files with 8 additions and 1 deletions

View File

@ -167,6 +167,9 @@ def load_topology(path):
if "appliance_id" in node:
node["template_id"] = node["appliance_id"]
del node["appliance_id"]
# make sure console_type is not None but "none" string
if "console_type" in node and node["console_type"] is None:
node["console_type"] = "none"
try:
_check_topology_schema(topo)
@ -189,6 +192,7 @@ def _convert_2_1_0(topo, topo_path):
Changes:
* Removed acpi_shutdown option from Qemu, VMware and VirtualBox
"""
topo["revision"] = 9
@ -198,6 +202,9 @@ def _convert_2_1_0(topo, topo_path):
topo["drawing_grid_size"] = topo["grid_size"]
for node in topo.get("topology", {}).get("nodes", []):
# make sure console_type is not None but "none" string
if "console_type" in node and node["console_type"] is None:
node["console_type"] = "none"
if "properties" in node:
if node["node_type"] in ("qemu", "vmware", "virtualbox"):
if "acpi_shutdown" in node["properties"]:

View File

@ -48,7 +48,7 @@ IOU_CREATE_SCHEMA = {
},
"console_type": {
"description": "Console type",
"enum": ["telnet", "none", None]
"enum": ["telnet", "none"]
},
"path": {
"description": "Path of iou binary",