Merge pull request #2634 from GNS3/update-iol-ram-nvram

Deactivate 'use default IOU values' by default and update RAM/NVRAM values
This commit is contained in:
Jeremy Grossmann 2026-03-12 13:53:04 +08:00 committed by GitHub
commit 5c63928636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View File

@ -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).

View File

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

View File

@ -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):

View File

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

View File

@ -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():