From 4cd74901a5384d0edbd54a839dfdfd93a6648374 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Mon, 30 Mar 2026 14:09:36 +0800 Subject: [PATCH] fix(copilot): improve device_type error message with tested types and config instructions Add tested device types (cisco_ios_telnet, gns3_huawei_telnet_ce, gns3_ruijie_telnet) to the error message and include Web UI configuration path. --- gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py b/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py index 821bddf62..3ac1bc992 100644 --- a/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py +++ b/gns3server/agent/gns3_copilot/utils/get_gns3_device_port.py @@ -107,9 +107,15 @@ def get_device_ports_from_topology( # Return error if device_type not found in tags # Using a default would cause command execution errors if device_type is None: + tested_device_types = ( + "cisco_ios_telnet (Netmiko built-in), gns3_huawei_telnet_ce (custom Huawei), " + "gns3_ruijie_telnet (custom Ruijie)" + ) error_msg = ( f"Device '{device_name}': device_type tag not found. " f"Please add 'device_type:' tag to this device in GNS3. " + f"To configure via Web UI: right-click the device -> Configure -> Tags -> add 'device_type:'. " + f"Tested types: {tested_device_types}. " f"Current tags: {tags}" ) logger.error(error_msg)