[DT2] Improve test infra to support BGP confederation#22417
Open
bingwang-ms wants to merge 4 commits intosonic-net:masterfrom
Open
[DT2] Improve test infra to support BGP confederation#22417bingwang-ms wants to merge 4 commits intosonic-net:masterfrom
bingwang-ms wants to merge 4 commits intosonic-net:masterfrom
Conversation
…nfed Merged PR 16507: [Disagg T2] Test infra changes for BGP confed This pull request implements test infrastructure changes to enable BGP confederation support for disaggregated T2 devices. The pull request updates Ansible modules, templates, and topology configurations to incorporate BGP confederation parameters and support a new ut2 device configuration. Key changes include: - `ansible/library/generate_golden_config_db.py`: Added the `generate_ut2_golden_config_db` method and adjusted config generation logic based on topology names. - `ansible/library/topo_facts.py`: Modified the BGP peer extraction to use a new `peer_in_bgp_confed` flag and select the appropriate ASN. - `ansible/roles/eos/templates/t2-leaf.j2` and `t1-lag-spine.j2`: Updated templates to conditionally include BGP confederation identifier and peer settings. - Topology YAML files (e.g., `ansible/vars/topo_lt2-p32o64.yml` and `ansible/vars/topo_t2_single_node_max.yml`): Revised ASNs and introduced confederation parameters (`confed_asn`, `confed_peers`) along with the `peer_in_bgp_confed` flag. - `ansible/config_sonic_basedon_testbed.yml`: Added the `num_asics` parameter to support configurations for devices with multiple ASICs. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> ---- This pull request implements test infrastructure changes to support BGP confederation in disaggregated T2 and related platforms. The PR enhances golden configuration generation, device templates, and test utilities to include BGP confederation settings by introducing new parameters and logic for processing BGP confederation ASN and peers. - **`ansible/library/generate_golden_config_db.py`**: Adds a new function for UT2 devices and updates existing functions to incorporate `bgp_confd_asn` and `bgp_confd_peers` for embedding BGP confederation configurations into the golden config JSON. - **`ansible/config_sonic_basedon_testbed.yml`**: Updates playbook tasks to pass new BGP confed parameters and copy necessary templates and profile files for t2 devices. - **EOS Templates (`ansible/roles/eos/templates/*.j2`)**: Modifies multiple device templates to conditionally render BGP confederation settings when related parameters are defined. - **BGP Test and Helper Modules**: Updates in files such as `tests/common/helpers/bgp.py`, `ansible/library/bgp_facts.py`, `ansible/library/topo_facts.py`, and route checkers adjust parsing and validation logic to correctly handle confederation peers. Signed-off-by: bingwang <bingwang@microsoft.com>
Signed-off-by: bingwang <bingwang@microsoft.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
Author
|
PR for 202503 Azure/sonic-mgmt.msft#1034 |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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:
Fixes # (issue)
This PR is to improve test infra to support BGP confederation on LT2/FT2/UT2.
Changes include
Type of change
Back port request
Approach
What is the motivation for this PR?
This PR is to improve test infra to support BGP confederation on LT2/FT2/UT2.
How did you do it?
How did you verify/test it?
The change is verified in internal regression test pipeline.
Any platform specific information?
No.
Supported testbed topology if it's a new test case?
Not a new test.
Documentation