[docker-sonic-vs] Create /usr/share/sonic/platform symlink#5268
[docker-sonic-vs] Create /usr/share/sonic/platform symlink#5268jleveque merged 1 commit intosonic-net:masterfrom jleveque:cleanup_vs_docker
Conversation
|
@samaity: Please review, as this affects a change made by you. |
|
Retest vsimage please |
|
LGTM! @jleveque. Just one question is there any place where we try to find the port configuration file like |
I'm not clear what your question is here. Is this in regard to my question @ #5264 (comment)? If so, can you please respond there? If it's not related to that, can you please add some more details here? |
…#5268) Copying platform.json file into an empty /usr/share/sonic/platform directory does not mimic an actual device. A more correct approach is to create a /usr/share/sonic/platform symlink which links to the actual platform directory; this is more like what is done inside SONiC containers. Then, we only need to copy the platform.json file into the actual platform directory; the symlink takes care of the alternative path, and also exposes all the other files in the platform directory.
- Why I did it
Copying platform.json file into an empty /usr/share/sonic/platform directory does not mimic an actual device. A more correct approach is to create a /usr/share/sonic/platform symlink which links to the actual platform directory; this is more like what is done inside SONiC containers. Then, we only need to copy the platform.json file into the actual platform directory; the symlink takes care of the alternative path, and also exposes all the other files in the platform directory.
One question: Since the SONiC VS container mimics the host OS of a physical switch, do we even need to create the /usr/share/sonic/platform and /usr/share/sonic/hwsku symlinks? Maybe we can remove these in a future patch.
- How I did it
Create /usr/share/sonic/platform symlink in start.sh
- How to verify it
Start a SONiC VS container and ensure the symlink exists.
- Which release branch to backport (provide reason below if selected)