-
Notifications
You must be signed in to change notification settings - Fork 1k
Adding new Tests for Chassis/Multi-ASIC GCU #14887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arlakshm
merged 26 commits into
sonic-net:master
from
okaravasi:master-new_tests_for_multi_asic_gcu
Jan 8, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
d234b70
Adding v1 of Test Plan for Chassis GCU new tests
okaravasi 688acf4
Tests for cable length modification, more QoS tables verification
okaravasi 28771d7
test suite file
okaravasi ff1a1d8
Removing common code added via https://github.com/sonic-net/sonic-mgm…
okaravasi aad6a20
Update ASIC namespace fixture following changes in dependent PR #15182
okaravasi 4663082
Addressing review comments, re-structure files for add-cluster
okaravasi fb9377c
Documentation changes
okaravasi 5d88185
Removing unecessary acl rule for bgp
okaravasi 38fb7ec
Adding suite files for laod qos and update cable length
okaravasi 947eab2
Handling pre-comiit errors, removed unused import, handled cros--feat…
okaravasi 605e883
Handling review comment: Removing updates in paths /QUEUE and /BUFFER…
okaravasi db80891
As per commnet request removing extar test cases to be moved to separ…
okaravasi 32b7164
Modifying test design so that it simulates adding cluster in plain LC.
okaravasi 4e8d8e9
Replacing config reload instead of reboot and enabling loganalyzer
okaravasi 7fd5095
Increasing data traffic counters from 10 to 1000 and adding retries i…
okaravasi 4585582
Remove cluster via sonic-db-cli in max-topo, W/A for PORTCHANNEL fail…
okaravasi b3ae82a
Fixes for add cluster case and W/As for open issues #24338, #24295
okaravasi 6258bbf
Replace static route IP, add BGP state check before data traffic, han…
okaravasi 87d61a0
Skipp if not voq chassis
okaravasi ad4bd99
Moving skip test case in case no voq in setup stage, displaying bgp info
okaravasi 1b71665
Displaying ip route table for all duthosts
okaravasi 38c6250
Skipping bgp check for supervisor node
okaravasi c6ac379
Verifying static route existence in upstream card
okaravasi eb2f9a0
Disabling data traffic due to kvm-t2 issue#21775
okaravasi fc9dfda
Skipping for vs testbed
okaravasi b2dbc8e
Merge branch 'master' into master-new_tests_for_multi_asic_gcu
okaravasi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Empty file.
44 changes: 44 additions & 0 deletions
44
tests/generic_config_updater/add_cluster/acl/acl_rule_src_dst_port.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "acl": { | ||
| "acl-sets": { | ||
| "acl-set": { | ||
| "L3_TRANSPORT_TEST": { | ||
| "acl-entries": { | ||
| "acl-entry": { | ||
| "100": { | ||
| "actions": { | ||
| "config": { | ||
| "forwarding-action": "ACCEPT" | ||
| } | ||
| }, | ||
| "config": { | ||
| "sequence-id": 100 | ||
| }, | ||
| "transport": { | ||
| "config": { | ||
| "source-port": "5000" | ||
| } | ||
| } | ||
| }, | ||
| "200": { | ||
| "actions": { | ||
| "config": { | ||
| "forwarding-action": "DROP" | ||
| } | ||
| }, | ||
| "config": { | ||
| "sequence-id": 200 | ||
| }, | ||
| "transport": { | ||
| "config": { | ||
| "destination-port": "8080" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| import logging | ||
| import pytest | ||
| from tests.common.gu_utils import create_checkpoint, delete_checkpoint, rollback_or_reload | ||
| from tests.common.gu_utils import restore_backup_test_config, save_backup_test_config | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| # ----------------------------- | ||
| # Fixtures that return random values for selected asic namespace, neighbors and cfg data for these selections | ||
| # ----------------------------- | ||
|
|
||
| @pytest.fixture(scope="module") | ||
| def enum_rand_one_asic_namespace(enum_rand_one_frontend_asic_index): | ||
| return None if enum_rand_one_frontend_asic_index is None else 'asic{}'.format(enum_rand_one_frontend_asic_index) | ||
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def config_facts(duthosts, enum_downstream_dut_hostname, enum_rand_one_asic_namespace): | ||
| duthost = duthosts[enum_downstream_dut_hostname] | ||
| return duthost.config_facts( | ||
| host=duthost.hostname, source="running", namespace=enum_rand_one_asic_namespace | ||
| )['ansible_facts'] | ||
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def config_facts_localhost(duthosts, enum_downstream_dut_hostname): | ||
| duthost = duthosts[enum_downstream_dut_hostname] | ||
| return duthost.config_facts(host=duthost.hostname, source="running", namespace=None)['ansible_facts'] | ||
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def mg_facts(duthosts, enum_downstream_dut_hostname, enum_rand_one_asic_namespace, tbinfo): | ||
| duthost = duthosts[enum_downstream_dut_hostname] | ||
| return duthost.get_extended_minigraph_facts(tbinfo, namespace=enum_rand_one_asic_namespace) | ||
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def rand_bgp_neigh_ip_name(config_facts): | ||
| '''Returns a random bgp neighbor ip, name from the namespace''' | ||
| bgp_neighbors = config_facts["BGP_NEIGHBOR"] | ||
| random_bgp_neigh_ip = list(bgp_neighbors.keys())[0] | ||
| random_bgp_neigh_name = config_facts['BGP_NEIGHBOR'][random_bgp_neigh_ip]['name'] | ||
| logger.info("rand_bgp_neigh_ip_name : {}, {} " | ||
| .format(random_bgp_neigh_ip, random_bgp_neigh_name)) | ||
| return random_bgp_neigh_ip, random_bgp_neigh_name | ||
|
|
||
|
|
||
| # ----------------------------- | ||
| # Setup Fixtures | ||
| # ----------------------------- | ||
|
|
||
| @pytest.fixture(scope="module", autouse=True) | ||
| def setup_env(duthosts, rand_one_dut_front_end_hostname): | ||
| """ | ||
| Setup/teardown fixture for add cluster test cases. | ||
| Args: | ||
| duthosts: list of DUTs. | ||
| rand_one_dut_front_end_hostname: A random linecard. | ||
| """ | ||
|
|
||
| duthost = duthosts[rand_one_dut_front_end_hostname] | ||
| create_checkpoint(duthost) | ||
| save_backup_test_config(duthost, file_postfix="{}_before_add_cluster_test".format(duthost.hostname)) | ||
|
|
||
| yield | ||
|
|
||
| restore_backup_test_config(duthost, file_postfix="{}_before_add_cluster_test".format(duthost.hostname), | ||
| config_reload=False) | ||
| try: | ||
| logger.info("{}:Rolling back to original checkpoint".format(duthost.hostname)) | ||
| rollback_or_reload(duthost) | ||
| finally: | ||
| delete_checkpoint(duthost) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.