Skip to content

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

Merged
qiluo-msft merged 2 commits intosonic-net:masterfrom
gpunathilell:yang_dpu
Jan 28, 2025
Merged

[Smartswitch] Add SonicDpu to the type in DEVICE_METADATA yang model#21520
qiluo-msft merged 2 commits intosonic-net:masterfrom
gpunathilell:yang_dpu

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 ganglyu and wen587 January 23, 2025 21:10
@azure-pipelines
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
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
20 checks passed
@wen587
Copy link
Contributor

wen587 commented Mar 17, 2025

Hi @gpunathilell , I notice in recent HLD, the type was changed from SonicDpu to SmartSwitchDPU. Could you help update YANG model ? Add @prsunny for vis.

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