Skip to content

Add Cross-DC L3VNI test cases: L3VNI_dci:51, 52, 61, 63#19

Open
bpar9 wants to merge 1 commit into
masterfrom
devin/1777154131-l3vni-dci-test-cases
Open

Add Cross-DC L3VNI test cases: L3VNI_dci:51, 52, 61, 63#19
bpar9 wants to merge 1 commit into
masterfrom
devin/1777154131-l3vni-dci-test-cases

Conversation

@bpar9
Copy link
Copy Markdown
Owner

@bpar9 bpar9 commented Apr 25, 2026

Description of PR

Summary:
Implement 4 new Cross-DC L3VNI test cases from the DCI Solution Testplan, plus associated helper functions.

Test cases added to test_vxlan_dci.py:

  • L3VNI_dci:51 (test_base_dci_l3vni_missing_vrf_on_dci_node): Negative test — removes VRF101 from one DC1 BGW, verifies Type-5 route withdrawal and traffic degradation, then restores VRF and verifies ECMP recovery across both BGWs.

  • L3VNI_dci:52 (test_base_dci_l3vni_rt_mismatch): Negative test — modifies RT export on DC1 BGW to an incorrect value, verifies Type-5 routes are no longer imported on DC2 BGW and cross-DC traffic fails, then restores the correct RT and verifies traffic recovery.

  • L3VNI_dci:61 (test_dci_l3vni_bulk_host_move): Host Mobility — learns 10 hosts simultaneously at dest1 (leaf0_dc1 orphan, VLAN 11, VRF 101), sends L2+L3 traffic from leaf2_dc1, moves all 10 hosts to dest2 (leaf0_dc2), verifies MM sequence numbers and L3VNI traffic, then moves back and verifies again.

  • L3VNI_dci:63 (test_dci_l3vni_mh_to_mh_across_dc_with_l3_traffic): Host Mobility — MH-to-MH host move across DC with L3VNI inter-VLAN traffic verification via verify_mac_move_dci.

Note: L3VNI_dci:91 (VLAN remove/add on DC1-Leaf) is already fully implemented in test_vlan_remove_add with L3 traffic verification (line 5023 references L3VNI_dci:91).

Helper functions added to vxlan_helper.py:

  • remove_vrf_config_bgw() — Remove VRF + L3VNI config from a BGW node
  • restore_vrf_config_bgw() — Restore full L3VNI config on a BGW node
  • modify_rt_export_bgw() — Set incorrect RT export for RT mismatch testing
  • restore_rt_export_bgw() — Restore correct RT export
  • generate_bulk_mac_move_hosts_dci() — Generate N host dicts (MAC/IPv4/IPv6) for bulk move tests

Type of change

  • New Test case
    • Skipped for non-supported platforms

Approach

What is the motivation for this PR?

Extend Cross-DC L3VNI test automation coverage per the DCI Solution Testplan, covering negative scenarios (missing VRF, RT mismatch) and host mobility scenarios (bulk move, MH-to-MH with L3 traffic).

How did you do it?

  • Added test methods to TestVxlanDCIBase (L3VNI_dci:51, 52) and TestVxlanDciMacMoveTriggers (L3VNI_dci:61, 63) classes following existing coding conventions (st.banner, st.log, vxlan_obj prefix, report_result pattern).
  • Added reusable helper functions in vxlan_helper.py that leverage existing _get_l3vni_bgw_params() and generate_l3vni_bgw_*_config() infrastructure.
  • L3VNI_dci:61 bulk move test creates 10 IXIA device groups, performs simultaneous move/move-back, and verifies MM sequence numbers + L3VNI traffic at each phase.
  • L3VNI_dci:63 reuses verify_mac_move_dci() with mh_to_mh_across_dc direction and mac+ipv4 host type.

How did you verify/test it?

  • Python compilation check passes (py_compile) for both modified files.
  • Code follows existing test patterns and conventions in the codebase.

Supported testbed topology if it's a new test case?

3-datacenter EVPN-VXLAN DCI topology with IXIA traffic generation:

  • DC1: 4 leafs + 2 spines + 2 BGW spines
  • DC2: 2 leafs + 2 BGW spines
  • DC3: 1 leaf + 1 BGW spine

Link to Devin session: https://cisco-demo.devinenterprise.com/sessions/173ce16b4ed5458ba1a5722abb95d2f7
Requested by: @bpar9

Implement 4 new test cases from the DCI Solution Testplan:

- L3VNI_dci:51: Negative test - Missing VRF configuration on DCI node.
  Removes VRF101 from one DC1 BGW, verifies Type-5 route withdrawal,
  traffic degradation, then restores and verifies ECMP recovery.

- L3VNI_dci:52: Negative test - RT mismatch for L3VNI.
  Modifies RT export on DC1 BGW to incorrect value, verifies Type-5
  routes no longer imported on DC2, traffic fails, then restores
  correct RT and verifies recovery.

- L3VNI_dci:61: Host Mobility - Bulk host move (10 hosts simultaneously).
  Learns 10 hosts at dest1 (leaf0_dc1), sends L2+L3 traffic, moves all
  10 simultaneously to dest2 (leaf0_dc2), verifies MM sequence numbers
  and L3VNI traffic, then moves back and verifies again.

- L3VNI_dci:63: Host Mobility - MH-to-MH across DC with L3 traffic.
  Wrapper around verify_mac_move_dci for MH port host move from
  leaf0_dc1 to leaf0_dc2 with L3VNI inter-VLAN traffic verification.

Note: L3VNI_dci:91 (VLAN remove/add) is already fully implemented
in test_vlan_remove_add with L3 traffic verification.

Helper functions added to vxlan_helper.py:
- remove_vrf_config_bgw: Remove VRF + L3VNI config from BGW node
- restore_vrf_config_bgw: Restore full L3VNI config on BGW node
- modify_rt_export_bgw: Set incorrect RT export for RT mismatch test
- restore_rt_export_bgw: Restore correct RT export
- generate_bulk_mac_move_hosts_dci: Generate N hosts for bulk move tests
@devin-ai-integration
Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

1 participant