From 0624c1b9457bc65ba5c324c3dd566addb91c8082 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 10 Mar 2026 20:28:00 +0800 Subject: [PATCH] Deactivate 'use default IOU values' by default and update RAM/NVRAM values --- gns3server/compute/iou/iou_vm.py | 6 +++--- gns3server/schemas/iou_template.py | 6 +++--- tests/compute/iou/test_iou_vm.py | 2 +- tests/handlers/api/compute/test_iou.py | 8 ++++---- tests/handlers/api/controller/test_template.py | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gns3server/compute/iou/iou_vm.py b/gns3server/compute/iou/iou_vm.py index d82776ba6..9089d8e68 100644 --- a/gns3server/compute/iou/iou_vm.py +++ b/gns3server/compute/iou/iou_vm.py @@ -87,11 +87,11 @@ class IOUVM(BaseNode): self._serial_adapters = [] self.ethernet_adapters = 2 # one adapter = 4 interfaces self.serial_adapters = 2 # one adapter = 4 interfaces - self._use_default_iou_values = True # for RAM & NVRAM values - self._nvram = 128 # Kilobytes + self._use_default_iou_values = False # for RAM & NVRAM values + self._nvram = 256 # Kilobytes self._startup_config = "" self._private_config = "" - self._ram = 256 # Megabytes + self._ram = 1024 # Megabytes self._application_id = application_id self._l1_keepalives = False # used to overcome the always-up Ethernet interfaces (not supported by all IOSes). diff --git a/gns3server/schemas/iou_template.py b/gns3server/schemas/iou_template.py index 769234ee5..0a5602658 100644 --- a/gns3server/schemas/iou_template.py +++ b/gns3server/schemas/iou_template.py @@ -43,17 +43,17 @@ IOU_TEMPLATE_PROPERTIES = { "ram": { "description": "RAM in MB", "type": "integer", - "default": 256 + "default": 1024 }, "nvram": { "description": "NVRAM in KB", "type": "integer", - "default": 128 + "default": 256 }, "use_default_iou_values": { "description": "Use default IOU values", "type": "boolean", - "default": True + "default": False }, "startup_config": { "description": "Startup-config of IOU", diff --git a/tests/compute/iou/test_iou_vm.py b/tests/compute/iou/test_iou_vm.py index d3026295a..835f91fcf 100644 --- a/tests/compute/iou/test_iou_vm.py +++ b/tests/compute/iou/test_iou_vm.py @@ -262,7 +262,7 @@ def test_create_netmap_config(vm): async def test_build_command(vm): - assert await vm._build_command() == [vm.path, str(vm.application_id)] + assert await vm._build_command() == [vm.path, "-n", "256", "-m", "1024", str(vm.application_id)] def test_get_startup_config(vm): diff --git a/tests/handlers/api/compute/test_iou.py b/tests/handlers/api/compute/test_iou.py index aadb4fa04..97230143b 100644 --- a/tests/handlers/api/compute/test_iou.py +++ b/tests/handlers/api/compute/test_iou.py @@ -69,8 +69,8 @@ async def test_iou_create(compute_api, compute_project, base_params): assert response.json["project_id"] == compute_project.id assert response.json["serial_adapters"] == 2 assert response.json["ethernet_adapters"] == 2 - assert response.json["ram"] == 256 - assert response.json["nvram"] == 128 + assert response.json["ram"] == 1024 + assert response.json["nvram"] == 256 assert response.json["l1_keepalives"] is False @@ -130,8 +130,8 @@ async def test_iou_get(compute_api, compute_project, vm): assert response.json["project_id"] == compute_project.id assert response.json["serial_adapters"] == 2 assert response.json["ethernet_adapters"] == 2 - assert response.json["ram"] == 256 - assert response.json["nvram"] == 128 + assert response.json["ram"] == 1024 + assert response.json["nvram"] == 256 assert response.json["l1_keepalives"] is False diff --git a/tests/handlers/api/controller/test_template.py b/tests/handlers/api/controller/test_template.py index a80d7d090..2accbffde 100644 --- a/tests/handlers/api/controller/test_template.py +++ b/tests/handlers/api/controller/test_template.py @@ -592,14 +592,14 @@ async def test_iou_template_create(controller_api): "default_name_format": "IOU{0}", "ethernet_adapters": 2, "name": "IOU template", - "nvram": 128, + "nvram": 256, "path": "/path/to/i86bi_linux-ipbase-ms-12.4.bin", "private_config": "", - "ram": 256, + "ram": 1024, "serial_adapters": 2, "startup_config": "iou_l3_base_startup-config.txt", "symbol": ":/symbols/multilayer_switch.svg", - "use_default_iou_values": True, + "use_default_iou_values": False, "l1_keepalives": False} for item, value in expected_response.items():