Add PVST test plan for two/four VLAN T0 topologies#2
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Add PVST test plan for two/four VLAN T0 topologies#2devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
This commit implements a comprehensive test plan for validating Per-VLAN Spanning Tree (PVST) functionality in SONiC using two/four VLAN T0 topologies. Test Cases Implemented: 1. Per-VLAN STP Instance Independence - Verify separate STP instances per VLAN - Test independent bridge priorities - Test independent root bridges 2. Interface-Specific PVST Configuration - Portfast configuration - BPDU filter configuration - Root guard configuration - BPDU guard configuration - Interface cost per VLAN - Interface priority per VLAN 3. Topology Change Resilience - VLAN isolation on topology change - STP convergence per VLAN - Multiple VLAN stability 4. Protocol Variant Testing - PVST mode configuration - RPVST mode configuration - PVST to RPVST transition - VLAN parameters with protocol variants 5. Configuration Persistence - Configuration save - Configuration persistence after reboot - VLAN configuration independence VLAN Configurations Used: - two_vlan_a: Vlan1000, Vlan1100 - four_vlan_a: Vlan1000, Vlan1100, Vlan1200, Vlan1300 Topology Files: - ansible/vars/topo_t0-isolated-d16u16s1.yml Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
Author
🤖 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:
|
12 tasks
bpar9
pushed a commit
that referenced
this pull request
Apr 17, 2026
…kets not received on collector interface (sonic-net#22186) * [sonic-mgmt] Fix sflow/test_sflow.py failures with expected sflow packets not received on collector interface Issue #1: In some cases (like sflow config enabled for first time, device reboot), hsflowd daemon is taking little over 3 mins to be fully initialized and process collector config. During this window, hsflowd service won't send sflow packets ('CounterSample', 'FlowSample' etc) to collector interface and thus test can fail with i) "Packets are not received in active collector, collector\d+" and ii) "Expected Number of samples are not collected from Interface Ethernet\d+ in collector collector\d+ , Received \d+" hsflowd service is writing to "/etc/hsflowd.auto" once it's processed collector configuration. Thus waiting for collector info to be present in "/etc/hsflowd.auto" seems to be safe option before proceeding with sflow traffic verfication. Issue #2: If the test expects flow samples/packets on the collector interface but they aren't seen for some reason, then we are hitting "KeyError: 'flow_port_count'". Due to counter samples seen on collector interface, "data['total_samples']" will not be zero but "data['total_flow_count']" will be 0 and lead to KeyError when tried to access "data['flow_port_count']". Fix is to have assert on "total_flow_count" and "total_counter_count" before calling corresponding sample analyze functions. Signed-off-by: Vinod <vkjammala@arista.com> * Addressing review comments 1) Enhanced "wait_until_hsflowd_ready" to make it wait for all the collector IPs (instead of calling it sequentially for each IP) 2) Add docstring for "wait_until_hsflowd_ready" function 3) Updated "ast.literal_eval" usage to handle the case where "active_collectors" is passed as empty string ("" instead of "[]") Signed-off-by: Vinod <vkjammala@arista.com> * Fix pre-commit check failures Signed-off-by: Vinod <vkjammala@arista.com> * Revert PR#21674 partially to enable "sflow/test_sflow.py" test Signed-off-by: Vinod <vkjammala@arista.com> --------- Signed-off-by: Vinod <vkjammala@arista.com>
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:
This PR adds a comprehensive test module for validating Per-VLAN Spanning Tree (PVST) functionality in SONiC using two/four VLAN T0 topologies. The tests verify that PVST creates independent STP instances per VLAN and that these instances operate correctly.
Test Categories Implemented:
Reviewer Notes:
TWO_VLAN_CONFIGandFOUR_VLAN_CONFIGdictionaries are defined for reference but tests usepvst_data.vlan_list_*variablesType of change
Back port request
Approach
What is the motivation for this PR?
To provide automated validation of PVST functionality in SONiC, ensuring that per-VLAN spanning tree instances operate independently as expected.
How did you do it?
Created a new SPyTest test module using the existing PVST API (
spytest/apis/switching/pvst.py) with test classes organized by functionality. Tests use the topology configurations fromansible/vars/topo_t0-isolated-d16u16s1.yml.How did you verify/test it?
flake8 --select=E9,F63,F7,F82)Any platform specific information?
Tests are designed to work with any platform supporting PVST/RPVST.
Supported testbed topology if it's a new test case?
t0-isolated-d16u16s1withtwo_vlan_aorfour_vlan_aVLAN configurationsDocumentation
Test module includes comprehensive docstrings describing test cases and steps.
Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/c327341f8de74d5283c788e47524faf6
Requested by: Arthur Poon (arthur.poon@cognition.ai) (@arthurkkp-cog)