Add L3VNI DCI MAC move test cases (L3VNI_dci:59,60,62,63)#17
Open
bpar9 wants to merge 2 commits into
Open
Conversation
- Add get_l3vni_mac_move_params() helper in vxlan_helper.py for cross-VLAN host mobility endpoint generation (VLAN 11 host, VLAN 13 source, VRF 101) - Add _get_dci_l3vni_mac_move_cfg() config function in test_vxlan_dci.py - Add verify_l3vni_mac_move_dci() 9-phase MAC move verification method reusing the pattern from verify_mac_move_dci for L3VNI routing - Add get_l3vni_stream_handles_dci() for cross-VLAN IXIA stream creation - Add 4 test cases in TestVxlanDCIBase: - test_base_dci_l3vni_mac_move_within_dc (L3VNI_dci:59) - test_base_dci_l3vni_mac_move_across_dci (L3VNI_dci:60) - test_base_dci_l3vni_mac_move_orphan_to_mh (L3VNI_dci:62) - test_base_dci_l3vni_mac_move_mh_to_mh (L3VNI_dci:63)
🤖 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:
|
|
Can we reuse the function verify_mac_move_dci for the testcases 59, 60, 62 and 63? I want to have the same format how existing testcases are written. |
- Remove L3VNI-specific methods from TestVxlanDCIBase (verify_l3vni_mac_move_dci, get_l3vni_stream_handles_dci, 7 helper methods, 4 test methods) - Remove _get_dci_l3vni_mac_move_cfg module-level function - Extend get_stream_handles_dci in TestVxlanDciMacMoveTriggers with L3VNI move_dir entries and cross-VLAN support (host VLAN 11, src VLAN 13) - Extend _get_dci_mh_expected_nodes for L3VNI MH directions - Add L3VNI bands to _dci_mm_host_last_octets - Add 8 test methods to TestVxlanDciMacMoveTriggers following existing format: L3VNI_dci:59 (within DC), 60 (across DC), 62 (orphan->MH), 63 (MH->MH) each with mac+ipv4 and mac+ipv6 variants
|
@vallabh78 Refactored as requested. The L3VNI test cases now reuse What changed:
Example (compare with def test_dci_mac_move_l3vni_orphan_within_dc_mac_and_ipv4(self):
"""Verify L3VNI mac move between orphan ports mac+ipv4 within DC (L3VNI_dci:59)."""
tc_id = "mac+ipv4 L3VNI move between orphan ports within DC"
result = self.verify_mac_move_dci(tc_id, "l3vni_orphan_within_dc", "mac+ipv4")
report_result(result, tc_id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Adds four new L3VNI host mobility test cases to
TestVxlanDciMacMoveTriggerscovering cross-VLAN (L3-routed) MAC move scenarios across a 3-DC EVPN-VXLAN fabric. Tests reuse the existingverify_mac_move_dci()flow directly. A helper function is added tovxlan_helper.pyfor L3VNI endpoint parameter generation.Key difference from existing L2 MAC move tests: Traffic source is on VLAN 13 and host is on VLAN 11, both in VRF 101, so traffic is routed via L3VNI rather than bridged via L2VNI.
Type of change
Back port request
Approach
What is the motivation for this PR?
Enable L3VNI_dci:59, L3VNI_dci:60, L3VNI_dci:62, L3VNI_dci:63 from the DCI Solution Testplan, covering L3VNI host mobility with cross-subnet traffic verification.
How did you do it?
vxlan_helper.py:get_l3vni_mac_move_params()— generates IP/MAC/gateway parameters for cross-VLAN MAC move tests (host on VLAN 11, source on VLAN 13, VRF 101). Includes VRF-VLAN binding validation against the topology config.test_vxlan_dci.py:get_stream_handles_dci()inTestVxlanDciMacMoveTriggerswith 4 new L3VNImove_direntries. For L3VNI directions, the method uses cross-VLAN configuration:vlan_id=11for host/dest device groups andsrc_vlan_id=13for traffic source streams._get_dci_mh_expected_nodes()to handlel3vni_mh_to_mh_across_dcandl3vni_orphan_to_mh_across_dcdirections._dci_mm_host_last_octets()and MAC suffixes (0x17–0x1a) to avoid collisions with existing L2 MAC move tests.mac+ipv4/mac+ipv6) that each callself.verify_mac_move_dci(tc_id, move_dir, host_type)directly, following the same format as existing tests (Solution_dci:71–96):test_dci_mac_move_l3vni_orphan_within_dc_mac_and_ipv{4,6}test_dci_mac_move_l3vni_orphan_across_dc_mac_and_ipv{4,6}test_dci_mac_move_l3vni_orphan_to_mh_across_dc_mac_and_ipv{4,6}test_dci_mac_move_l3vni_mh_to_mh_across_dc_mac_and_ipv{4,6}Updates since last revision
Refactored per review feedback to reuse
verify_mac_move_dci()directly instead of a separateverify_l3vni_mac_move_dci()method:TestVxlanDCIBase(7 helper methods,verify_l3vni_mac_move_dci,get_l3vni_stream_handles_dci, 4 test methods,_get_dci_l3vni_mac_move_cfg)TestVxlanDciMacMoveTriggers, extending existing infrastructure rather than duplicating itHow did you verify/test it?
python3 -m py_compilepasses for both files.Cross-VLAN stream VLAN assignment: For L3VNI directions,
src1/src2raw streams and thekwdict for device-group streams all usesrc_vlan_id(13) while dest device groups usevlan_id(11). Reviewer should confirm that the dest1/dest2 device group creation paths (which usevlan_id) also correctly pick up VLAN 11 for L3VNI scenarios.mm_cfg.update(l3_params)key safety: The L3VNI params dict is merged intomm_cfg(from_get_dci_mac_move_cfg()). Verify that keys likehost_vlan,src_vlan, etc. don't unintentionally overwrite existing keys needed by downstream logic.l3vni_orphan_within_dcnode assignment: Uses('leaf0_dc1', 'leaf1_dc1', 'leaf0_dc2', ...)— dest1/dest2 within DC1 but traffic source on leaf0_dc2 (cross-DC). Confirm this matches the intended testplan scenario for L3VNI_dci:59.Hardcoded node names in
move_config(e.g.,leaf0_dc1,leaf2_dc1) — matches existing patterns inTestVxlanDciMacMoveTriggersbut should be confirmed against the testbed topology.IP/MAC address range: Host IPs use
.51/.52on VLAN 11 (80.11.0.51/52) and source uses.51on VLAN 13 (80.13.0.51). MACs use02:00:00:{04|06}:{0b|0d}:{51|52}scheme. Verify these don't collide with existing SAG host device groups (range 10–30) or other test streams.Any platform specific information?
DCI topology with 3 datacenters and IXIA traffic generation required.
Supported testbed topology if it's a new test case?
3-DC EVPN-VXLAN DCI topology (DC1: 4 leafs + 2 spines + 2 BGW spines, DC2: 2 leafs + 2 BGW spines, DC3: 1 leaf + 1 BGW spine) with IXIA/IxNetwork TGEN.
Documentation
N/A — test cases follow existing patterns documented in the DCI Solution Testplan.
Link to Devin session: https://cisco-demo.devinenterprise.com/sessions/0b27f9d58262480bb0754f522f75c69d
Requested by: @bpar9