[SmartSwitch] is_smartswitch() is not required inside is_dpu() function #21988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes a small change to the
is_dpu
function in thesrc/sonic-py-common/sonic_py_common/device_info.py
file. The change removes a conditional check foris_smartswitch()
that previously returnedFalse
if the check failed.src/sonic-py-common/sonic_py_common/device_info.py
: Removed theis_smartswitch()
check from theis_dpu
function.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
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
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)