mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-27 18:52:23 +02:00
fix(marker): set nio.markers on iou/dynamips/cloud nio update
The PUT /nio (update) endpoints for iou, dynamips and cloud copied nio.filters from the request body but never copied nio.markers. So adding a marker (e.g. a project-level global definition) to an already-created link of these node types left nio.markers empty: no mark filter was installed on uBridge and no marker.match signal was emitted. vpcs/qemu/docker already set it; mirror them (getattr for the Union NIO types).
This commit is contained in:
parent
a732d8d521
commit
27356da62d
@ -184,6 +184,8 @@ async def update_cloud_nio(
|
|||||||
nio.filters.clear()
|
nio.filters.clear()
|
||||||
if nio_data.filters:
|
if nio_data.filters:
|
||||||
nio.filters = nio_data.filters
|
nio.filters = nio_data.filters
|
||||||
|
# NIO type is a Union (Ethernet/TAP/UDP); only UDPNIO carries markers.
|
||||||
|
nio.markers = getattr(nio_data, "markers", None) or {}
|
||||||
await node.update_nio(port_number, nio)
|
await node.update_nio(port_number, nio)
|
||||||
return nio.asdict()
|
return nio.asdict()
|
||||||
|
|
||||||
|
|||||||
@ -235,6 +235,7 @@ async def update_nio(
|
|||||||
nio.filters.clear()
|
nio.filters.clear()
|
||||||
if nio_data.filters:
|
if nio_data.filters:
|
||||||
nio.filters = nio_data.filters
|
nio.filters = nio_data.filters
|
||||||
|
nio.markers = nio_data.markers or {}
|
||||||
await node.slot_update_nio_binding(adapter_number, port_number, nio)
|
await node.slot_update_nio_binding(adapter_number, port_number, nio)
|
||||||
return nio.asdict()
|
return nio.asdict()
|
||||||
|
|
||||||
|
|||||||
@ -254,6 +254,8 @@ async def update_iou_node_nio(
|
|||||||
nio.filters.clear()
|
nio.filters.clear()
|
||||||
if nio_data.filters:
|
if nio_data.filters:
|
||||||
nio.filters = nio_data.filters
|
nio.filters = nio_data.filters
|
||||||
|
# NIO type is a Union (Ethernet/TAP/UDP); only UDPNIO carries markers.
|
||||||
|
nio.markers = getattr(nio_data, "markers", None) or {}
|
||||||
await node.adapter_update_nio_binding(adapter_number, port_number, nio)
|
await node.adapter_update_nio_binding(adapter_number, port_number, nio)
|
||||||
return nio.asdict()
|
return nio.asdict()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user