Fix link capture for ATM switch. Fixes https://github.com/GNS3/gns3-gui/issues/3570

This commit is contained in:
grossmj 2024-04-23 18:35:36 +07:00
parent 2609849507
commit 35b75f0f7f
No known key found for this signature in database
GPG Key ID: 0A2D76AC45EA25CD
2 changed files with 3 additions and 3 deletions

View File

@ -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":

View File

@ -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",