sonic-net / sonic-platform-daemons

Platform module daemons for SONiC
Other
23 stars 152 forks source link

[202311] Support to get MEDIA_SETTING and OPTICS_SI from both platform folder and HWSKU folder #460

Closed keboliu closed 6 months ago

keboliu commented 6 months ago

Description

backport https://github.com/sonic-net/sonic-platform-daemons/pull/456

Support to get the media_settings.json and optics_si_settings.json files from both the platform folder and the SKU folder. It will search the HWSKU folder first and then fall back to the platform folder.

combine with PR https://github.com/sonic-net/sonic-buildimage/pull/18441, the vendor will be able to enable CMIS cable host mgmt. function per SKU(choose to put the specific pmon_daemon_control.json, media_settings.json and optics_si_settings.json to the SKU folder).

Motivation and Context

The vendor will have the flexibility to have both files in the platform scope or the SKU scope.

How Has This Been Tested?

Build image, manually test,

  1. put files in the platform folder, the settings should be able to be loaded.
  2. put files in the SKU folder, the settings should be able to be loaded.
  3. put the files in both platform and SKU folder, the settings in the SKU folder will be loaded.

Additional Information (Optional)

keboliu commented 6 months ago

/azpw run

mssonicbld commented 6 months ago

/AzurePipelines run

azure-pipelines[bot] commented 6 months ago
Azure Pipelines successfully started running 1 pipeline(s).