From 35b75f0f7f7f1321c33abb61c802da8a49d0c9dc Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 23 Apr 2024 18:35:36 +0700 Subject: [PATCH] Fix link capture for ATM switch. Fixes https://github.com/GNS3/gns3-gui/issues/3570 --- gns3server/controller/udp_link.py | 2 +- gns3server/handlers/api/compute/atm_switch_handler.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/controller/udp_link.py b/gns3server/controller/udp_link.py index 97d4b916..4778a78c 100644 --- a/gns3server/controller/udp_link.py +++ b/gns3server/controller/udp_link.py @@ -189,7 +189,7 @@ class UDPLink(Link): :returns: Node where the capture should run """ - ALWAYS_RUNNING_NODES_TYPE = ("cloud", "nat", "ethernet_switch", "ethernet_hub") + ALWAYS_RUNNING_NODES_TYPE = ("cloud", "nat", "ethernet_switch", "ethernet_hub", "frame_relay_switch", "atm_switch") for node in self._nodes: if node["node"].compute.id == "local" and node["node"].node_type in ALWAYS_RUNNING_NODES_TYPE and node["node"].status == "started": diff --git a/gns3server/handlers/api/compute/atm_switch_handler.py b/gns3server/handlers/api/compute/atm_switch_handler.py index 193fe574..a29f71a4 100644 --- a/gns3server/handlers/api/compute/atm_switch_handler.py +++ b/gns3server/handlers/api/compute/atm_switch_handler.py @@ -268,7 +268,7 @@ class ATMSwitchHandler: response.json({"pcap_file_path": pcap_file_path}) @Route.post( - r"/projects/{project_id}/atm_relay_switch/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture", + r"/projects/{project_id}/atm_switch/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture", parameters={ "project_id": "Project UUID", "node_id": "Node UUID", @@ -290,7 +290,7 @@ class ATMSwitchHandler: response.set_status(204) @Route.get( - r"/projects/{project_id}/atm_relay_switch/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/pcap", + r"/projects/{project_id}/atm_switch/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/pcap", description="Stream the pcap capture file", parameters={ "project_id": "Project UUID",