Skip to content

[YANG] Add serial/console device types to YANG#24854

Merged
yxieca merged 1 commit intosonic-net:masterfrom
Blueve:dev/jika/m_c_yang
Dec 15, 2025
Merged

[YANG] Add serial/console device types to YANG#24854
yxieca merged 1 commit intosonic-net:masterfrom
Blueve:dev/jika/m_c_yang

Conversation

@Blueve
Copy link
Contributor

@Blueve Blueve commented Dec 15, 2025

Why I did it

Add serial/console device types to YANG model.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Update YANG and add related unit tests.

How to verify it

Unit tests are all passed.

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Jing Kan <jika@microsoft.com>
@Blueve Blueve requested a review from qiluo-msft as a code owner December 15, 2025 01:40
Copilot AI review requested due to automatic review settings December 15, 2025 01:40
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

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 extends the SONiC YANG model to support six new device types for serial/console infrastructure: MiniTs, LeafTs, SpineTs, CoreTs, ConsoleServer, and TerminalServer. These additions enable the YANG model to validate configurations for terminal server and console server device roles in network topology.

  • Added six new device type patterns to the YANG model's type validation regex
  • Added comprehensive test configurations for each new device type
  • Added test descriptions following established naming conventions

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 Extended the device type pattern to include MiniTs, LeafTs, SpineTs, CoreTs, ConsoleServer, and TerminalServer
src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json Added test configuration blocks for all six new device types with bgp_asn and type fields
src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json Added test descriptions for validating each of the six new device type patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yxieca yxieca merged commit d0f28f1 into sonic-net:master Dec 15, 2025
29 checks passed
hdwhdw pushed a commit to hdwhdw/sonic-buildimage that referenced this pull request Dec 18, 2025
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Signed-off-by: Jing Kan <jika@microsoft.com>
Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
xwjiang-ms pushed a commit to xwjiang-ms/sonic-buildimage that referenced this pull request Dec 22, 2025
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Signed-off-by: Jing Kan <jika@microsoft.com>
Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
jasonbridges pushed a commit to jasonbridges/sonic-buildimage that referenced this pull request Jan 22, 2026
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Signed-off-by: Jing Kan <jika@microsoft.com>
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Signed-off-by: Jing Kan <jika@microsoft.com>
Signed-off-by: Feng Pan <fenpan@microsoft.com>
@Xichen96
Copy link
Contributor

@Blueve Cisco console would need MiniTS in 202511, should we include this PR in 202511 branch?

dprital pushed a commit that referenced this pull request Mar 19, 2026
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Signed-off-by: Jing Kan <jika@microsoft.com>
Signed-off-by: dprital <drorp@nvidia.com>
lizhijianrd pushed a commit to lizhijianrd/sonic-buildimage that referenced this pull request Mar 19, 2026
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
@lizhijianrd
Copy link
Contributor

Backport 202511: #26270

vmittal-msft pushed a commit that referenced this pull request Mar 24, 2026
How I did it
Update YANG and add related unit tests.

How to verify it
Unit tests are all passed.

Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
Co-authored-by: Jing Kan <jika@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lizhijianrd
Copy link
Contributor

lizhijianrd commented Mar 24, 2026

The backport to 202603 completed via code sync from 202511.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants