Introduce the asic_subtype field for adding the sub platform variants. #10235
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.
Why I did it
Introduce the asic_subtype field for adding the sub platform variants.
This is to add broadcom-dnx as a asic subtype of broadcom. For the broadcom XGS type ASIC platforms the asic_subtype will be "broadcom" itsef.
So for DNX platforms
"asic_type": "broadcom",
"asic_subtype": "broadcom-dnx",
XGS platforms
"asic_type": "broadcom",
"asic_subtype": "broadcom",
Related PR : sonic-net/sonic-swss#2178
How I did it
The TARGET_MACHINE variable will contain$($ _MACHINE), $($_DEPENDENT_MACHINE) which will have values like broadcom, broadcom-dnx for the different asic types within the $(sonic_asic_platform). This will be used to populate the asic_subtype in sonic_version.yml and inturn into swss_vars
The asic_type will come from the PLATFORM which we use while compilation eg: broadcom. The asic_subtypes will be various$($ _MACHINE), $($_DEPENDENT_MACHINE) variables used to compile and get the asic family specific images.
How to verify it
Verified that "sub_platform" environment variable gets populated, when used along with sonic-net/sonic-swss#2178.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)