mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 19:28:07 +00:00
Fix bug when creating Dynamips router with chassis setting
This commit is contained in:
parent
00691390eb
commit
8ad7b3f613
@ -61,9 +61,11 @@ async def create_router(project_id: UUID, node_data: schemas.DynamipsCreate) ->
|
|||||||
|
|
||||||
dynamips_manager = Dynamips.instance()
|
dynamips_manager = Dynamips.instance()
|
||||||
platform = node_data.platform
|
platform = node_data.platform
|
||||||
chassis = None
|
print(node_data.chassis, platform in DEFAULT_CHASSIS)
|
||||||
if not node_data.chassis and platform in DEFAULT_CHASSIS:
|
if not node_data.chassis and platform in DEFAULT_CHASSIS:
|
||||||
chassis = DEFAULT_CHASSIS[platform]
|
chassis = DEFAULT_CHASSIS[platform]
|
||||||
|
else:
|
||||||
|
chassis = node_data.chassis
|
||||||
node_data = jsonable_encoder(node_data, exclude_unset=True)
|
node_data = jsonable_encoder(node_data, exclude_unset=True)
|
||||||
vm = await dynamips_manager.create_node(
|
vm = await dynamips_manager.create_node(
|
||||||
node_data.pop("name"),
|
node_data.pop("name"),
|
||||||
|
Loading…
Reference in New Issue
Block a user