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

pull/1681/head
grossmj 5 years ago
parent 51a92b46dd
commit 2f57bd58c0

@ -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"]:

@ -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",

Loading…
Cancel
Save