mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-28 23:00:12 +03:00
fix: Actually pass template param to device_config/command handlers
template was defined in the tool signature but omitted from the params dict passed to the handler, making Jinja2 rendering completely non-functional.
This commit is contained in:
parent
fed40c683e
commit
fb032ade78
@ -1309,9 +1309,10 @@ async def device_config_send(
|
|||||||
Device type is auto-detected from the 'device_type:<type>' tag on each node.
|
Device type is auto-detected from the 'device_type:<type>' tag on each node.
|
||||||
Common device types: cisco_ios_telnet, cisco_xr_telnet, huawei_telnet, gns3_huawei_telnet_ce
|
Common device types: cisco_ios_telnet, cisco_xr_telnet, huawei_telnet, gns3_huawei_telnet_ce
|
||||||
"""
|
"""
|
||||||
return await asyncio.to_thread(_run_handler_sync, device_config_send_handler, {
|
params = {"project_id": project_id, "device_configs": device_configs}
|
||||||
"project_id": project_id, "device_configs": device_configs,
|
if template is not None:
|
||||||
})
|
params["template"] = template
|
||||||
|
return await asyncio.to_thread(_run_handler_sync, device_config_send_handler, params)
|
||||||
|
|
||||||
|
|
||||||
@mcp.tool()
|
@mcp.tool()
|
||||||
@ -1331,9 +1332,10 @@ async def device_command_run(
|
|||||||
Use this to inspect device status, view configurations, or verify changes.
|
Use this to inspect device status, view configurations, or verify changes.
|
||||||
Devices must be started first.
|
Devices must be started first.
|
||||||
"""
|
"""
|
||||||
return await asyncio.to_thread(_run_handler_sync, device_command_run_handler, {
|
params = {"project_id": project_id, "device_configs": device_configs}
|
||||||
"project_id": project_id, "device_configs": device_configs,
|
if template is not None:
|
||||||
})
|
params["template"] = template
|
||||||
|
return await asyncio.to_thread(_run_handler_sync, device_command_run_handler, params)
|
||||||
|
|
||||||
|
|
||||||
@mcp.tool()
|
@mcp.tool()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user