Skip to content

[syseepromd] Support both new platform API and old platform plugins#35

Closed
stephenxs wants to merge 4 commits intosonic-net:masterfrom
stephenxs:npapi-based-daemon
Closed

[syseepromd] Support both new platform API and old platform plugins#35
stephenxs wants to merge 4 commits intosonic-net:masterfrom
stephenxs:npapi-based-daemon

Conversation

@stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Jul 29, 2019

Support new platform api with plugin mode compatible.
In this PR, new platform api is supported in following steps:

  1. initialization, load new-platform-api-based class eeprom or chassis for syseepromd and psud respectively, if failed then load old style plugin.
  2. for each api, call new platform api, old style plugin is called if the former raised a NotImplementError; other Exceptions raised will be passed to caller without handling.

now only two APIs are called in syseepromd, update_eeprom_db and read_eeprom.
five three APIs for psud, get_num_psus, get_presence and get_powergood_status.
it depends on the sonic-platform-common #48 add get_eeprom to Chassis for syseepromd to access

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what I was picturing; a simple change, as small as possible, which allows us to share as much of the existing logic as possible between the old plugins and new API.

@stephenxs stephenxs changed the title [syseepromd] support new platform api with plugin mode compatible [syseepromd] support new platform api with plugin mode compatible (syseepromd and psud) Jul 31, 2019
@jleveque
Copy link
Contributor

@stephenxs: Do you mind splitting the syseepromd and psud changes into separate PRs? It will make the changes more modular in case of the need to revert anything.

@stephenxs
Copy link
Collaborator Author

@stephenxs: Do you mind splitting the syseepromd and psud changes into separate PRs? It will make the changes more modular in case of the need to revert anything.

Done.
PR 36 for syseeprom and PR 37 for psud

@jleveque jleveque changed the title [syseepromd] support new platform api with plugin mode compatible (syseepromd and psud) [syseepromd] Support both new platform API and old platform plugins Jul 31, 2019
@jleveque
Copy link
Contributor

So shall we close this PR?

@stephenxs
Copy link
Collaborator Author

sure.

@stephenxs stephenxs closed this Jul 31, 2019
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
@stephenxs stephenxs deleted the npapi-based-daemon branch April 12, 2022 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants