1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-24 15:58:08 +00:00

Fixes use_default_iou_values param was not set.

This commit is contained in:
Jeremy 2015-03-26 16:47:55 -06:00
parent 1df8f61035
commit 81ce86a8a7
2 changed files with 4 additions and 1 deletions

View File

@ -60,6 +60,7 @@ class IOUHandler:
ethernet_adapters=request.json.get("ethernet_adapters"),
ram=request.json.get("ram"),
nvram=request.json.get("nvram"),
use_default_iou_values=request.json.get("use_default_iou_values"),
l1_keepalives=request.json.get("l1_keepalives"),
initial_config=request.json.get("initial_config_content"),
iourc_content=request.json.get("iourc_content")
@ -115,6 +116,7 @@ class IOUHandler:
vm.serial_adapters = request.json.get("serial_adapters", vm.serial_adapters)
vm.ram = request.json.get("ram", vm.ram)
vm.nvram = request.json.get("nvram", vm.nvram)
vm.use_default_iou_values = request.json.get("use_default_iou_values", vm.use_default_iou_values)
vm.l1_keepalives = request.json.get("l1_keepalives", vm.l1_keepalives)
vm.initial_config = request.json.get("initial_config_content", vm.initial_config)
vm.iourc_content = request.json.get("iourc_content", None)

View File

@ -74,6 +74,7 @@ class IOUVM(BaseVM):
console=None,
ram=None,
nvram=None,
use_default_iou_values=None,
ethernet_adapters=None,
serial_adapters=None,
l1_keepalives=None,
@ -95,7 +96,7 @@ class IOUVM(BaseVM):
self._serial_adapters = []
self.ethernet_adapters = 2 if ethernet_adapters is None else ethernet_adapters # one adapter = 4 interfaces
self.serial_adapters = 2 if serial_adapters is None else serial_adapters # one adapter = 4 interfaces
self._use_default_iou_values = True # for RAM & NVRAM values
self._use_default_iou_values = True if use_default_iou_values is None else use_default_iou_values # for RAM & NVRAM values
self._nvram = 128 if nvram is None else nvram # Kilobytes
self._initial_config = ""
self._ram = 256 if ram is None else ram # Megabytes