mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
marker: key _marker_filter_bridges by (name, link_id) so multi-link nodes toggle every copy
The _marker_filter_bridges dict was keyed by marker name alone, so when one node hosted the same filter name on several links (IUOL-BRIDGE per node with many bays/units, or a multi-interface router), successive apply calls overwrote earlier entries. pause_marker_definition then toggled only the last recorded bridge/location — other copies stayed active and kept emitting. Key by (name, link_id) so each copy is independent, and iterate all matching entries in _ubridge_set_marker_filter_state (both generic bridge and IOU iol_bridge override). Toggle route existence checks also iterate matching names. Tests updated.
This commit is contained in:
9 files changed
+25
-28
No files matched your search
@@ -269,7 +269,7 @@ async def toggle_cloud_marker(
|
||||
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
|
||||
"""
|
||||
|
||||
if marker_name not in node._marker_filter_bridges:
|
||||
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Marker '{marker_name}' is not installed on this node",
|
||||
|
||||
@@ -423,7 +423,7 @@ async def toggle_docker_marker(
|
||||
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
|
||||
"""
|
||||
|
||||
if marker_name not in node._marker_filter_bridges:
|
||||
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Marker '{marker_name}' is not installed on this node",
|
||||
|
||||
@@ -382,7 +382,7 @@ async def toggle_dynamips_marker(
|
||||
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
|
||||
"""
|
||||
|
||||
if marker_name not in node._marker_filter_bridges:
|
||||
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Marker '{marker_name}' is not installed on this node",
|
||||
|
||||
@@ -361,7 +361,7 @@ async def toggle_iou_marker(
|
||||
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
|
||||
"""
|
||||
|
||||
if marker_name not in node._marker_filter_bridges:
|
||||
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Marker '{marker_name}' is not installed on this node",
|
||||
|
||||
@@ -453,7 +453,7 @@ async def toggle_qemu_marker(
|
||||
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
|
||||
"""
|
||||
|
||||
if marker_name not in node._marker_filter_bridges:
|
||||
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Marker '{marker_name}' is not installed on this node",
|
||||
|
||||
@@ -360,7 +360,7 @@ async def toggle_vpcs_marker(
|
||||
Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2).
|
||||
"""
|
||||
|
||||
if marker_name not in node._marker_filter_bridges:
|
||||
if not any(n == marker_name for (n, lid) in node._marker_filter_bridges):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Marker '{marker_name}' is not installed on this node",
|
||||
|
||||
Reference in new issue
Block a user