Add 6 L3VNI DCI test cases (57, 58, 84, 85, 96, 97)#18
Conversation
- L3VNI_dci:57/58: DF failover with IPv4/IPv6 L3VNI traffic on DC2 MH leafs - L3VNI_dci:84: Simultaneous reboot of both BGWs in DC1 - L3VNI_dci:85: Rolling reboot of DC1 fabric (leaf1->leaf2->spine0->bgw1) - L3VNI_dci:96: Remove/Add import export RT on DC1 BGWs - L3VNI_dci:97: Remove/Add RT-REWRITE route-maps on DC1 BGWs Helper functions added to vxlan_helper.py: - remove_bgw_import_export_rt(): Remove RT import/export from BGW VRF config - add_bgw_import_export_rt(): Re-add RT import/export - remove_bgw_rt_rewrite_maps(): Remove RT-REWRITE route-maps + extcommunity-lists - add_bgw_rt_rewrite_maps(): Re-add RT-REWRITE route-maps + extcommunity-lists
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
For all the testcases, we want to use continuous traffic. Refer Interfacetrigger class - dci_flap_continuous |
…_continuous) Per reviewer feedback, all test cases now use dci_flap_continuous streams: - TC57/58 (DF failover): Start continuous cross-DC traffic before shutdown, verify continuous traffic continues after DF failover (check with min_perc) - TC84 (simultaneous BGW reboot): Start continuous L2+L3 before reboot, stop after recovery (drop not measured), burst verify across+within DC - TC85 (rolling reboot): Start continuous L2+L3 before reboot, stop after recovery (drop not measured), burst verify across+within DC - TC96 (remove/add RT): Start continuous, remove/add RT, verify continuous recovers within threshold (min_perc=99.6) - TC97 (remove/add RT-REWRITE): Same pattern as TC96 Traffic pattern follows test_dci_link_trigger (InterfaceTrigger class): vxlan_obj.check_traffic(fc_streams, action='start/check/stop', ...)
|
Thanks for the feedback @vallabh78! I've refactored all 6 test cases to use continuous traffic via Changes made (commit 290621b):
I also reviewed the tc.txt steps and aligned the implementation accordingly. Please take another look when you get a chance. |
|
After running all 4 testcases, below are the issues i found:
|
…config, stream disable, DF/NDF verification 1. Fix PortChannel discovery for DC2 leafs - use test_cfg['port_channels'] pattern instead of config_dict which returned empty lists 2. Filter dci_flap_continuous streams by IP version (v4 or v6) for TC57/58 so only matching streams run per test case 3. Disable continuous streams after stopping in all 6 TCs so they are not left enabled between test executions 4. Configure rate_percent=0.01 on continuous streams before starting in all 6 TCs 5. Use 'show evpn es' (get_evpn_es) to determine DF/NDF status before shutdown and print output after PortChannel shutdown in TC57/58 6. Store 'name' and 'version' fields in stream_handles dict (vxlan_helper.py) to enable stream filtering by IP version
|
@vallabh78 Thanks for the detailed feedback from the testbed run! All 5 issues have been addressed in commit 5cc4e9d:
|
…ing enabled before test execution All 6 TCs now explicitly stop+disable all dci_flap_continuous streams at the beginning of each test case, before any traffic operations. This ensures streams are only enabled when check_traffic(action='start') is called during the test execution phase.
|
@vallabh78 Fixed in commit f1a448f — all 6 TCs now explicitly stop + disable all The sequence is:
This ensures streams are never left enabled between test executions, and are only active during the test execution phase. |
|
portchannel again failing: L3VNI_dci:96 and 97, we can have just 1VLAN each vrf for continuous traffic and only enable those 2 streams during the testcase.
|
|
@vallabh78 Both issues addressed in commit 6526379: 1. PortChannel discovery (TC57/58): 2. TC96/97 stream filtering (1 VLAN per VRF): |
|
|
@vallabh78 Responding to both points: 1. Flap_continuous stream creation:
So we're already at 2 VLANs (1 per VRF) for L2, and VRF-based grouping for L3. This matches what you requested. The additional filtering in TC96/97 ( 2. If the issue persists with the latest commit, the debug logging I added will print the |
|
check this log file issues:
|
… streams, TC96/97 L2+L3 streams 1. Remove disable-at-TC-start blocks from all 6 TCs (57/58, 84, 85, 96, 97) - Streams are disabled by default; no need to stop/disable at TC start - This also saves time at the beginning of each TC 2. TC57/58: Filter to PortChannel (MH) sources only + 1 L2 stream + L3 (1 per VRF) - tgen_preconfig: L2 continuous streams now only use l2_pc_cross (dropped orphan) - tgen_preconfig: L3 continuous streams filter to MH-only, 1 VLAN per VRF - TC filtering: Pick 1 L2 + L3 streams (1 per VRF) by parsing stream names 3. TC96/97: Use ALL dci_flap_continuous streams (both L2 AND L3 v4+v6) - Removed VRF-based filtering that limited to 1 stream per VRF (L2 only) - Now starts/checks/stops all L2 + L3 continuous streams
|
@vallabh78 All 3 issues from the log file addressed in commit 067a1d5: 1. Removed disable-at-TC-start blocks from all 6 TCs (57/58, 84, 85, 96, 97): 2. TC57/58 — MH-only sources, 1 VLAN/VRF for L3, 1 L2 stream:
3. TC96/97 — both L2 AND L3 (v4+v6) continuous streams: |

Description of PR
Summary:
Adds 6 new L3VNI DCI test cases from the DCI Solution Testplan to the VXLAN DCI test automation framework, plus 4 supporting helper functions in
vxlan_helper.py.All test cases use continuous traffic via
dci_flap_continuousstreams (per reviewer feedback), following theInterfaceTrigger/test_dci_link_triggerpattern:check_traffic(action='start')→ trigger →check_traffic(action='check'|'stop').New test cases (in
TestVxlanDCIBase):test_base_dci_l3vni_mh_df_failover[v4/v6]test_base_dci_l3vni_simultaneous_bgw_reboottest_base_dci_l3vni_rolling_reboottest_base_dci_l3vni_remove_add_import_export_rttest_base_dci_l3vni_remove_add_rt_rewrite_configsNew helper functions (in
vxlan_helper.py):remove_bgw_import_export_rt()/add_bgw_import_export_rt()— targeted removal and restoration of BGP VRF route-target import/export statementsremove_bgw_rt_rewrite_maps()/add_bgw_rt_rewrite_maps()— targeted removal and restoration of RT-REWRITE-WAN/DC route-maps, extcommunity-lists, and neighbor applicationUpdates since last revision
Round 4 — MH-only streams, disable-at-start removal, TC96/97 L2+L3 (reported by @vallabh78):
Removed disable-at-TC-start blocks from all 6 TCs: Streams are disabled by default — the explicit stop+disable at TC start was unnecessary and added execution time. Removed from TC57/58, TC84, TC85, TC96, TC97. Streams are now only enabled via
check_traffic(action='start')during test execution and disabled infinallyblocks at TC exit.MH-only continuous streams in
tgen_preconfig:_dci_fc_endpoints_for_vlan()now only usesl2_pc_crossendpoints (droppedl2_orphan_cross). Name prefix changed toDCI-FC-L2-MH-X-v{vlan}.src_int.startswith('PortChannel')) L3 cross-DC endpoints, limited to 1 VLAN per VRF. Name prefixDCI-FC-L3-MH-X.TC57/58 stream filtering — 1 L2 + L3 per VRF: After version filtering (v4 or v6), the TC now picks exactly 1 L2 stream + L3 streams (1 per VRF) by parsing
L2/L3and VRF tags from streamnamefield.TC96/97 use ALL L2+L3 streams: Removed the VRF-based filtering that limited to 1 stream per VRF (which only picked L2). Both TCs now start/check/stop all
dci_flap_continuousstreams — L2 (VLANs 12, 18) + L3 (v4 + v6).Round 3 — PortChannel discovery still failing + TC96/97 stream count (reported by @vallabh78):
PortChannel discovery third fallback (TC57/58): Added a third fallback that searches
test_cfg['nodes'].get('leaf', [])for any node with'dc2'in the name andport_channelsdata present. Also added debug logging when no PortChannels are found.TC96/97 stream filtering — 1 VLAN per VRF:Superseded by item 13 above.Round 2 — streams enabled before TC starts (reported by @vallabh78):
Disable all continuous streams at TC start:Superseded by item 10 above — disable-at-start blocks removed entirely.Round 1 — 5 issues from testbed run (reported by @vallabh78):
PortChannel discovery fix (TC57/58): Replaced
config_dict[leaf]['port_channel']+get_config_interfaces_list()fallback withtest_cfg.get(leaf, {}).get('port_channels', [])pattern — matches_get_leaf_portchannels_by_dc()inInterfaceTrigger.Stream filtering by IP version (TC57/58): TC57 now runs only
ipv4continuous streams, TC58 onlyipv6. Filtersdci_flap_continuousdict by the newversionfield stored in each stream handle.Stream disable after stop (all 6 TCs): Added explicit
tg_traffic_config(mode='disable', stream_id=...)after everycheck_traffic(action='stop')infinallyblocks so streams are not left enabled between test executions.rate_percent=0.01(all 6 TCs): Before starting continuous traffic, each stream is reconfigured viatg_traffic_config(mode='modify', stream_id=sid, rate_percent=0.01).DF/NDF verification via
show evpn es(TC57/58): Usesget_evpn_es()before shutdown to determine which leaf is DF (hasLin type) vs NDF (hasNin type). Printsshow evpn esoutput on both DC2 leafs after PortChannel shutdown for debugging.create_traffic_itemchange (vxlan_helper.py): Addednameandversionfields tostream_handlesdict to enable stream filtering by IP version._dci_fc_endpoints_for_vlan()now only iteratesl2_pc_cross. Ifl2_pc_crossis empty (no PortChannel cross-DC L2 endpoints), no L2 continuous streams will be created. Verifyl2_pc_crossis populated for the testbed topology.l3_cross_dc_endpointsbysrc_int.startswith('PortChannel')and limits to 1 VLAN per VRF. If no PortChannel-sourced L3 endpoints exist, only L2 streams are available. Verify this is acceptable.'L2' in nameand'L3' in name, then parses VRF from_vrfin name. This relies onname_prfxvaluesDCI-FC-L2-MH-X-v{vlan}andDCI-FC-L3-MH-Xset intgen_preconfig. Verify stream names on testbed match these patterns.dci_flap_continuousstreams (L2+L3, v4+v6). If there are many streams, verify IXIA handles this correctly and the test doesn't take excessive time.l2l3vni_bgw→l2l3vni→leaf(filtered by'dc2'+ hasport_channels). Verify thattest_cfg['nodes'].get('leaf', [])exists and contains DC2 leaf names on the testbed YAML.fc_streamsbyv.get('version', '') == ixia_version. This relies on theversionfield added tocreate_traffic_item. Verify thattgen_preconfigcreatesdci_flap_continuousstreams throughcreate_traffic_itemso they'll have this field populated.df_leaf/ndf_leafbased on PortChannel ES entries. If a leaf has multiple PortChannel ESIs with mixed DF/NDF flags, the last match wins. Verify this is acceptable for the DC2 topology.tg_traffic_config(mode='disable', stream_id=list): Verify the IXIA API accepts a list of stream IDs vs requiring individual calls.rate_percent=0.01persistence: Rate is set viamode='modify'beforecheck_traffic(action='start')which callsmode='enable'. Verify enable doesn't reset rate_percent.Type of change
Back port request
(none)
Approach
What is the motivation for this PR?
Expand L3VNI DCI test coverage per the DCI Solution Testplan for multi-homing failover, system-level triggers (simultaneous/rolling reboots), and L3VNI config manipulation (RT and RT-REWRITE).
How did you do it?
TestVxlanDCIBase(banner/log conventions,report_result,verify_base_setup_bgw,check_core).tgen_handles['dci_flap_continuous']with thecheck_traffic()three-phase pattern (start→check/stop). All traffic stop calls are infinallyblocks to guarantee cleanup, followed by explicitdisable.check_traffic(action='start'), and stop+disable infinallyblocks at TC exit.tgen_preconfigare restricted to PortChannel (multihomed) sources only. L2 usesl2_pc_crossendpoints for VLANs 12, 18. L3 filters toPortChannel-sourced endpoints with 1 VLAN per VRF.ip_version, filters streams to matching version only (then picks 1 L2 + L3 per VRF), usesshow evpn esfor DF/NDF identification, and uses atry/finallyto guarantee PortChannel restoration. DC2 leaf discovery has a 3-tier fallback (l2l3vni_bgw→l2l3vni→leafwithport_channelscheck).threading.Threadto reboot both BGWs concurrently.try/exceptwith recovery logic to restore config on failure. Both use alldci_flap_continuousstreams (L2 + L3 v4/v6)._get_l3vni_bgw_params()for consistent parameter derivation and generate targeted FRR config strings (rather than full delete/recreate viadelete_l3vni_bgw_frr_config).rate_percent=0.01on continuous streams before starting.How did you verify/test it?
Python syntax verified (
py_compile). Reviewer @vallabh78 ran TC57/58/84/85/96/97 on live testbed and reported issues addressed across four revision rounds.Any platform specific information?
Requires 3-DC EVPN-VXLAN topology with BGW spines, IXIA traffic generation, and EVPN multi-homing on DC2.
Supported testbed topology if it's a new test case?
3-DC DCI topology: DC1 (4 leafs + 2 BGW spines), DC2 (2 leafs + 2 BGW spines), DC3 (1 leaf + 1 BGW spine).
Documentation
Test cases map to L3VNI_dci:57, 58, 84, 85, 96, 97 in
DCI_Solution_Testplan.xlsx.Link to Devin session: https://cisco-demo.devinenterprise.com/sessions/356a7bf56e254faaa8e996cefe35b12e
Requested by: @bpar9