[yang-models]: Add BackEndSpineRouter device type in yang model#28604
Open
kperumalbfn wants to merge 1 commit into
Open
[yang-models]: Add BackEndSpineRouter device type in yang model#28604kperumalbfn wants to merge 1 commit into
kperumalbfn wants to merge 1 commit into
Conversation
kperumalbfn
requested review from
dgsudharsan,
praveen-li,
qiluo-msft and
venkatmahalingam
as code owners
July 23, 2026 20:05
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the sonic-device_metadata YANG model to recognize a new DEVICE_METADATA.type value, BackEndSpineRouter, and adds/updates YANG model validation test vectors to ensure the new device role is accepted.
Changes:
- Added
BackEndSpineRouterto the allowedDEVICE_METADATA.typepattern insonic-device_metadata.yang. - Added a corresponding positive test case definition in the YANG model tests metadata.
- Added a corresponding test input payload in the YANG model tests config JSON.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/sonic-yang-models/yang-models/sonic-device_metadata.yang | Extends DEVICE_METADATA.type validation pattern to allow BackEndSpineRouter. |
| src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json | Adds a new test case entry for validating BackEndSpineRouter as an accepted type value. |
| src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json | Adds the corresponding test configuration payload using "type": "BackEndSpineRouter". |
dgsudharsan
approved these changes
Jul 23, 2026
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.
Why I did it
Add a new device type in DEVICE_METADATA yang model
Work item tracking
38921303
How I did it
Updated the existing Sonic device_metadata yang model to include the new device type.
How to verify it
Added yang model tests for the new type.