From 8ad7b3f6132fa36b8a51f002e700fc6309cc293c Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 24 Dec 2022 18:03:00 +0800 Subject: [PATCH] Fix bug when creating Dynamips router with chassis setting --- gns3server/api/routes/compute/dynamips_nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gns3server/api/routes/compute/dynamips_nodes.py b/gns3server/api/routes/compute/dynamips_nodes.py index ea74ad25..5f34f066 100644 --- a/gns3server/api/routes/compute/dynamips_nodes.py +++ b/gns3server/api/routes/compute/dynamips_nodes.py @@ -61,9 +61,11 @@ async def create_router(project_id: UUID, node_data: schemas.DynamipsCreate) -> dynamips_manager = Dynamips.instance() platform = node_data.platform - chassis = None + print(node_data.chassis, platform in DEFAULT_CHASSIS) if not node_data.chassis and platform in DEFAULT_CHASSIS: chassis = DEFAULT_CHASSIS[platform] + else: + chassis = node_data.chassis node_data = jsonable_encoder(node_data, exclude_unset=True) vm = await dynamips_manager.create_node( node_data.pop("name"),