Skip to content

[yang-models]: Add BackEndSpineRouter device type in yang model#28604

Open
kperumalbfn wants to merge 1 commit into
sonic-net:masterfrom
kperumalbfn:kperumal/be_spine_yang
Open

[yang-models]: Add BackEndSpineRouter device type in yang model#28604
kperumalbfn wants to merge 1 commit into
sonic-net:masterfrom
kperumalbfn:kperumal/be_spine_yang

Conversation

@kperumalbfn

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings July 23, 2026 20:05
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kperumalbfn kperumalbfn changed the title Add BackEndSpineRouter device type in yang model [yang-models]: Add BackEndSpineRouter device type in yang model Jul 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BackEndSpineRouter to the allowed DEVICE_METADATA.type pattern in sonic-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 dgsudharsan added the YANG YANG model related changes label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

YANG YANG model related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants