mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
fix: return the created template from appliance install
POST /appliances/{id}/install replied 204 with an empty body, so the MCP
appliance_install tool crashed with 'Expecting value: line 1 column 1'
while the template had actually been created. The route now returns the
created template (201, response_model=schemas.Template), _create_template
propagates it, and the MCP handler parses the body defensively so an
empty reply degrades to a plain success message.
This commit is contained in:
6 files changed
+44
-12
No files matched your search
@@ -1376,7 +1376,7 @@ async def appliance_install(
|
||||
appliance_id: Annotated[str, Field(description="UUID of the appliance to install")],
|
||||
version: Annotated[str | None, Field(description="Version to install (e.g. '2.7.0.356'). Required if the appliance has multiple versions. Use appliance_get to see available versions.")] = None,
|
||||
) -> list[dict[str, Any]]:
|
||||
"""Create a template from a GNS3 appliance definition.
|
||||
"""Create a template from a GNS3 appliance definition and return the created template.
|
||||
|
||||
NOTE: This does NOT download images. Images must be placed in the
|
||||
GNS3 images directory (e.g. ~/GNS3/images/) beforehand.
|
||||
|
||||
Reference in new issue
Block a user