mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
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:
commit
5c63928636
@ -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).
|
||||
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
@ -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():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user