[portconfig] Fallback to port_config.ini if hwsku.json is not available#5434
Merged
lguohan merged 1 commit intosonic-net:masterfrom Sep 25, 2020
Merged
[portconfig] Fallback to port_config.ini if hwsku.json is not available#5434lguohan merged 1 commit intosonic-net:masterfrom
lguohan merged 1 commit intosonic-net:masterfrom
Conversation
Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
abb3545 to
394030b
Compare
yxieca
reviewed
Sep 23, 2020
|
|
||
| # if 'hwsku.json' file is available, Check for 'platform.json' file presence, | ||
| # if 'platform.json' is available, APPEND it. Otherwise, SKIP it. | ||
| if os.path.isfile(hwsku_json_file): |
Contributor
There was a problem hiding this comment.
Do you need to check both platform file and hwsku file? Is platform file checked earlier or later? What if the platform has hwsku file but not platform file?
Collaborator
There was a problem hiding this comment.
it was checked below:
if os.path.isfile(candidate):
We could completely reconstruct the code and return files directly, but for now, following the old structure should work too.
Collaborator
Author
|
retest broadcom please |
Collaborator
Author
|
retest mellanox please |
1 similar comment
Collaborator
Author
|
retest mellanox please |
Collaborator
|
@zhenggen-xu, can you approve? |
zhenggen-xu
approved these changes
Sep 24, 2020
lguohan
approved these changes
Sep 25, 2020
santhosh-kt
pushed a commit
to santhosh-kt/sonic-buildimage
that referenced
this pull request
Feb 25, 2021
…le (sonic-net#5434) **- Why I did it** As discussed, This PR covers the below points. 1. Give precedence to platform.json only if both platform.json and hwsku.json file exist. In case only platform.json exists, we don’t allow breakout for that HWSKU and fallback to port_config.ini. **- How I did it** check for `hwsku.json` file presence under get_path_to_port_config_file function. Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Signed-off-by: Sangita Maity sangitamaity0211@gmail.com
- Why I did it
As discussed, This PR covers the below points.
- How I did it
check for
hwsku.jsonfile presence under get_path_to_port_config_file function.- How to verify it
- Which release branch to backport (provide reason below if selected)