From a0943b0b5a89ba785e27b472233a8a772001f20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=81astawiecki?= Date: Fri, 2 Jun 2023 09:39:08 +0200 Subject: [PATCH 1/2] Parse name for request to node creation from template --- gns3server/handlers/api/controller/template_handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gns3server/handlers/api/controller/template_handler.py b/gns3server/handlers/api/controller/template_handler.py index 0f88efb3..9462cc13 100644 --- a/gns3server/handlers/api/controller/template_handler.py +++ b/gns3server/handlers/api/controller/template_handler.py @@ -169,6 +169,7 @@ class TemplateHandler: node = await project.add_node_from_template(request.match_info["template_id"], x=request.json["x"], y=request.json["y"], + name=request.json.get("name")) compute_id=request.json.get("compute_id")) response.set_status(201) response.json(node) From 045c0c4c14886e0832f7e4d6427481166af40eb8 Mon Sep 17 00:00:00 2001 From: Mlastawi Date: Fri, 2 Jun 2023 10:38:42 +0200 Subject: [PATCH 2/2] Add missing comma --- gns3server/handlers/api/controller/template_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/handlers/api/controller/template_handler.py b/gns3server/handlers/api/controller/template_handler.py index 9462cc13..d297309a 100644 --- a/gns3server/handlers/api/controller/template_handler.py +++ b/gns3server/handlers/api/controller/template_handler.py @@ -169,7 +169,7 @@ class TemplateHandler: node = await project.add_node_from_template(request.match_info["template_id"], x=request.json["x"], y=request.json["y"], - name=request.json.get("name")) + name=request.json.get("name")), compute_id=request.json.get("compute_id")) response.set_status(201) response.json(node)