Skip to content
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

[Smartswitch] Add SonicDpu to the type in DEVICE_METADATA yang model #21520

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

gpunathilell
Copy link
Contributor

@gpunathilell gpunathilell commented Jan 23, 2025

Why I did it

This change is done because the DPUs are initalized with the SonicDpu type from sonic-config-engine

data['DEVICE_METADATA']['localhost']['type'] = 'SonicDpu'

This is added to the yang models in order to yang validation doesn't fail
Fixes: #21111

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added SonicDpu type in src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json

How to verify it

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

@gpunathilell gpunathilell marked this pull request as draft January 23, 2025 21:09
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@qiluo-msft qiluo-msft requested review from wen587 and ganglyu January 23, 2025 21:10
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gpunathilell gpunathilell marked this pull request as ready for review January 24, 2025 05:18
@@ -100,7 +100,7 @@ module sonic-device_metadata {
leaf type {
type string {
length 1..255;
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|SonicHost|not-provisioned";
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|SonicHost|SonicDpu|not-provisioned";
Copy link
Contributor

Choose a reason for hiding this comment

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

@qiluo-msft qiluo-msft merged commit 7dc57ad into sonic-net:master Jan 28, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[YANG] leaf type missing SonicDPU in sonic-device_metadata.yang
7 participants