Skip to content

Keep TunnelEndpoint network_id as a multi-VNI map - #102

Open
ed6869 wants to merge 1 commit into
aruba:masterfrom
ed6869:feature/tunnel-endpoint-multi-vni
Open

Keep TunnelEndpoint network_id as a multi-VNI map#102
ed6869 wants to merge 1 commit into
aruba:masterfrom
ed6869:feature/tunnel-endpoint-multi-vni

Conversation

@ed6869

@ed6869 ed6869 commented Jun 30, 2026

Copy link
Copy Markdown

Fixes #104

Companion collection PR: aruba/aoscx-ansible-collection#212

Summary

A Tunnel Endpoint (TEP) is indexed by (vrf, origin, destination) and can flood several VNIs at once through its network_id map. The previous implementation collapsed network_id to a single VNI object on get() and only serialized one VNI on create()/update(), which silently dropped the other VNIs of a shared TEP.

Changes

  • get() now keeps network_id as the full {vni_key: uri} map instead of collapsing it to a single VNI.
  • New _network_id_payload() helper serializes a single VNI, a list of VNIs, or an existing {vni_key: uri} map into the form the REST API expects.
  • create() and update() use the helper.
  • Adds offline unit tests (tests/test_tunnel_endpoint.py).

Testing

  • Offline unit tests pass (pytest tests/test_tunnel_endpoint.py).
  • Validated live on a CX 6300 (FL.10.17, REST latest): a static VTEP peer shared by two VNIs is preserved when removed from one of them.

A Tunnel Endpoint (indexed by vrf, origin, destination) can flood several VNIs
at once. The previous get() collapsed network_id to a single VNI object and
create()/update() only serialized one VNI, which dropped the other VNIs of a
shared TEP. Keep network_id as the full {vni_key: uri} map on get(), and
serialize a single VNI, a list of VNIs, or an existing map on create()/update()
via a new _network_id_payload() helper. Adds offline unit tests.

Signed-off-by: ed6869 <ed6869@mail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TunnelEndpoint.network_id drops other VNIs of a shared tunnel endpoint

1 participant