From 9e830f788370e6a4b695ab38aa02e5c0c0c09e7a Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Thu, 13 Aug 2026 01:07:38 +0800 Subject: [PATCH] appliance: expose custom_adapters on the v1-6 appliance model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The top-level ApplianceV1_6 model declared first_port_name / port_name_format / port_segment_size but not custom_adapters, so the GET /appliances endpoint (response_model=schemas.Appliance) stripped custom_adapters from the response — the frontend never saw per-adapter port names even though the appliance file and the server-side template conversion (appliance_to_template reads it from the raw dict) handled it. Add custom_adapters: Optional[List[CustomAdapterItem]] to ApplianceV1_6 so the field round-trips through the API. (ApplianceV8 already models it inside its TemplateSetting.) --- gns3server/schemas/controller/appliances.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gns3server/schemas/controller/appliances.py b/gns3server/schemas/controller/appliances.py index 563f2f5fa..23e7b32c0 100644 --- a/gns3server/schemas/controller/appliances.py +++ b/gns3server/schemas/controller/appliances.py @@ -632,6 +632,9 @@ class ApplianceV1_6(BaseModel): None, title='Optional port segment size. A port segment is a block of port. For example Ethernet0/0 Ethernet0/1 is the module 0 with a port segment size of 2', ) + custom_adapters: Optional[List[CustomAdapterItem]] = Field( + None, title='Optional per-adapter overrides (port name, adapter type, MAC address)' + ) linked_clone: Optional[bool] = Field(None, title="False if you don't want to use a single image for all nodes") docker: Optional[Docker] = Field(None, title='Docker specific options') iou: Optional[Iou] = Field(None, title='IOU specific options')