From 1d70a18b118178b0f3ac2ee42f8aa60b11c7f5ec Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 5 Sep 2016 11:43:20 +0200 Subject: [PATCH] Nat node use port 0 --- gns3server/compute/builtin/nodes/nat.py | 2 +- gns3server/schemas/port.py | 6 +++--- tests/compute/builtin/nodes/test_nat.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gns3server/compute/builtin/nodes/nat.py b/gns3server/compute/builtin/nodes/nat.py index b2c053f8..ba1b27b5 100644 --- a/gns3server/compute/builtin/nodes/nat.py +++ b/gns3server/compute/builtin/nodes/nat.py @@ -42,7 +42,7 @@ class Nat(Cloud): "name": "nat0", "type": "ethernet", "interface": "eth1", - "port_number": 1 + "port_number": 0 } ] diff --git a/gns3server/schemas/port.py b/gns3server/schemas/port.py index 0e89d665..26c00913 100644 --- a/gns3server/schemas/port.py +++ b/gns3server/schemas/port.py @@ -32,7 +32,7 @@ PORT_OBJECT_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, "type": { "description": "Port type", @@ -58,7 +58,7 @@ PORT_OBJECT_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, "type": { "description": "Port type", @@ -84,7 +84,7 @@ PORT_OBJECT_SCHEMA = { "port_number": { "description": "Port number", "type": "integer", - "minimum": 1 + "minimum": 0 }, "type": { "description": "Port type", diff --git a/tests/compute/builtin/nodes/test_nat.py b/tests/compute/builtin/nodes/test_nat.py index 88035d97..bd1a6132 100644 --- a/tests/compute/builtin/nodes/test_nat.py +++ b/tests/compute/builtin/nodes/test_nat.py @@ -33,7 +33,7 @@ def test_json(on_gns3vm, project): { "interface": "eth1", "name": "nat0", - "port_number": 1, + "port_number": 0, "type": "ethernet" } ]