From 221a35baae3bd14eaf176bb4630842d96902a3ee Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 14 May 2015 20:54:38 -0600 Subject: [PATCH] Adds NAT NIO in device schema validation so they can return an error that it is not supported. --- gns3server/schemas/dynamips_device.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gns3server/schemas/dynamips_device.py b/gns3server/schemas/dynamips_device.py index 9f173c49..201cd805 100644 --- a/gns3server/schemas/dynamips_device.py +++ b/gns3server/schemas/dynamips_device.py @@ -218,6 +218,16 @@ DEVICE_NIO_SCHEMA = { "required": ["type", "ethernet_device"], "additionalProperties": False }, + "NAT": { + "description": "NAT Network Input/Output", + "properties": { + "type": { + "enum": ["nio_nat"] + }, + }, + "required": ["type"], + "additionalProperties": False + }, "TAP": { "description": "TAP Network Input/Output", "properties": { @@ -291,6 +301,7 @@ DEVICE_NIO_SCHEMA = { {"$ref": "#/definitions/UDP"}, {"$ref": "#/definitions/Ethernet"}, {"$ref": "#/definitions/LinuxEthernet"}, + {"$ref": "#/definitions/NAT"}, {"$ref": "#/definitions/TAP"}, {"$ref": "#/definitions/UNIX"}, {"$ref": "#/definitions/VDE"},