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] is_smartswitch() is not required inside is_dpu() function #21988

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

vvolam
Copy link
Contributor

@vvolam vvolam commented Mar 11, 2025

This pull request includes a small change to the is_dpu function in the src/sonic-py-common/sonic_py_common/device_info.py file. The change removes a conditional check for is_smartswitch() that previously returned False if the check failed.

Why I did it

The condition if platform_data: return 'DPU' in platform_data is sufficient to determine whether the platform is a DPU.

Additionally, is_smartswitch() returns False because "DPUS" is not present in platform.json on a DPU.

Work item tracking
  • Microsoft ADO (number only):

How I did it

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)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rlhui rlhui merged commit af924b5 into sonic-net:master Mar 11, 2025
21 checks passed
@vvolam vvolam deleted the fix-dpu-check branch March 11, 2025 21:47
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.

4 participants