From 462238a335519348bf9161b117273721e5158420 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 29 Sep 2016 15:02:42 +0200 Subject: [PATCH] Fix a crash when adding builtin switch and hub --- gns3server/schemas/ethernet_hub.py | 4 ++-- gns3server/schemas/ethernet_switch.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gns3server/schemas/ethernet_hub.py b/gns3server/schemas/ethernet_hub.py index 52534ae7..e24b33e0 100644 --- a/gns3server/schemas/ethernet_hub.py +++ b/gns3server/schemas/ethernet_hub.py @@ -32,7 +32,7 @@ ETHERNET_HUB_CREATE_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, }, "required": ["name", "port_number"], @@ -84,7 +84,7 @@ ETHERNET_HUB_OBJECT_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, }, "required": ["name", "port_number"], diff --git a/gns3server/schemas/ethernet_switch.py b/gns3server/schemas/ethernet_switch.py index 6de9caa3..1a92a111 100644 --- a/gns3server/schemas/ethernet_switch.py +++ b/gns3server/schemas/ethernet_switch.py @@ -32,7 +32,7 @@ ETHERNET_SWITCH_CREATE_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, "type": { "description": "Port type", @@ -96,7 +96,7 @@ ETHERNET_SWITCH_OBJECT_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, "type": { "description": "Port type",