Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonic_platform_base] support new-platform-api-based daemons #48

Merged
merged 7 commits into from
Aug 5, 2019

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Jul 29, 2019

[sonic_platform_base/chassis]

  1. add _eeprom and get_eeprom into class ChassisBase so that syseepromd can access eeprom related stuff.
  2. fix typo (non-asic characters)

[sonic_platform_base/sonic_sfp/sfputilhelper]
For xcvrd, originally we plan to remain the module sfputilbase to provide functions like mapping between logical and physical interfaces. However, SfpUtilBase is an abstract class and can not be instantiated. In that case, a new module sfputilhelper has to be introduced to provide the required interfaces.

  1. read_porttab_mappings, which reads port_config.ini and generats mappings
  2. get_physical_to_logical
  3. get_logical_to_physical
  4. is_logical_port

[sonic_platform_base/sfp_base]
support interface get_transceiver_threshold_status

Stephen Sun added 2 commits July 26, 2019 17:02
1. add "_eeprom" field into class ChassisBase so that syseepromd can access eeprom related stuff.
originally we intend to remain some APIs defined in sfputilbase to implement functions like transition between logical and physical ports.
However, we ignored the fact that sfputilbase is an abstract class and can't be instantiated, which is also part of refractoring pmon.
to solve the issue, we have to introduce a new helper module which only remains the required APIs:
 read_porttab_mappings, which reads port_config.ini and generats mappings
 get_physical_to_logical
 get_logical_to_physical
 is_logical_port
@stephenxs stephenxs changed the title [chassis_base] add get_eeprom to Chassis for syseepromd to access [sonic_platform_base] support new-platform-api-based daemons Jul 31, 2019
@jleveque
Copy link
Contributor

Please fix new conflicts.

@stephenxs
Copy link
Collaborator Author

Please fix new conflicts.

Sorry for the conflict. I'll do it.
But this is also something I'm going to discuss.
Currently I assume the keys of dictionary returned by sonic_platform.sfp.get_transceiver_info() are exactly the same as that by sfputilbase.get_transceiver_info_dict so that we can have a smooth transition. However, according to the comments in front of get_transceiver_info we find the difference. I also suggest having the comments, especially the keys column, updated so that the keys name align with what returned by sfputilbase.get_transceiver_info_dict. There is a similar situation when it comes to other APIs, like get_transceiver_dom_info_dict vs. get_transceiver_bulk_status, and
get_transceiver_dom_threshold_info_dict vs. get_transceiver_threshold_status

@jleveque
Copy link
Contributor

@stephenxs: When fixing the conflicts, please feel free to do what you think is best, and we'll discuss any differences of opinion in review.

Also, unrelated: can you please check my new question on a PR which I already merged?: https://github.com/Azure/sonic-buildimage/pull/3198/files#r309356059

@stephenxs
Copy link
Collaborator Author

stephenxs commented Jul 31, 2019

@stephenxs: When fixing the conflicts, please feel free to do what you think is best, and we'll discuss any differences of opinion in review.

Also, unrelated: can you please check my new question on a PR which I already merged?: https://github.com/Azure/sonic-buildimage/pull/3198/files#r309356059

Done. Please review. If this style is acceptable, I would also like to update comments of get_transceiver_info.
The only concern is that how if some vendors have already implemented their apis based on current keys.

@stephenxs
Copy link
Collaborator Author

stephenxs commented Aug 1, 2019 via email

1. adjust the comments in front of get_transceiver_threshold_info
2. adjust the definitions of keys of dictions returned by get_transceiver_bulk_status so that they can be better aligned with old-style plugins.
sonic_platform_base/sfp_base.py Outdated Show resolved Hide resolved
lost-of-signal => loss-of-signal
@jleveque jleveque merged commit af6b631 into sonic-net:master Aug 5, 2019
@stephenxs stephenxs deleted the newapi-based-daemon branch August 6, 2019 08:26
jleveque pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Aug 14, 2019
[sonic-platform-common]

[sonic_sfp] Interpret sff 'int' element =0 as valid value (sonic-net/sonic-platform-common#51)
add more error code to get_transceiver_change_event ((sonic-net/sonic-platform-common#50)
[sonic_platform_base] support new-platform-api-based daemons ((sonic-net/sonic-platform-common#48)
sync change to sonic_platform_base/sonic_sfp and create symbol link ((sonic-net/sonic-platform-common#49)
Add parser support for Tx_RxLos,TxFault, PowerControl, ResetStatus in sff8436.py ((sonic-net/sonic-platform-common#45)
readd type_abbrv_name in sonic_sfp/sff8436.py ((sonic-net/sonic-platform-common#44)
[psu_base] get_status_led() returns current state of the status LED ((sonic-net/sonic-platform-common#39)
Fix abbrv name for OSFP ((sonic-net/sonic-platform-common#36)
[sff8436] support "Control Bytes" and "Options" ((sonic-net/sonic-platform-common#38)
sonic_sfp: avoid possible key error in get_physical_to_logical() ((sonic-net/sonic-platform-common#37)

[sonic-platform-daemons]

[xcvrd] Enhance xcvrd to handle new system level event/error (sonic-net/sonic-platform-daemons#39)
[xcvrd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#38)
[psud] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#37)
[syseepromd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#36)
Add missing import statemet (sonic-net/sonic-platform-daemons#32)
sonic_xcvrd: Support for DOM Threshold values for EEPROM dump (sonic-net/sonic-platform-daemons#29)
wangshengjun pushed a commit to wangshengjun/sonic-buildimage that referenced this pull request Nov 16, 2020
…ic-net#3333)

[sonic-platform-common]

[sonic_sfp] Interpret sff 'int' element =0 as valid value (sonic-net/sonic-platform-common#51)
add more error code to get_transceiver_change_event ((sonic-net/sonic-platform-common#50)
[sonic_platform_base] support new-platform-api-based daemons ((sonic-net/sonic-platform-common#48)
sync change to sonic_platform_base/sonic_sfp and create symbol link ((sonic-net/sonic-platform-common#49)
Add parser support for Tx_RxLos,TxFault, PowerControl, ResetStatus in sff8436.py ((sonic-net/sonic-platform-common#45)
readd type_abbrv_name in sonic_sfp/sff8436.py ((sonic-net/sonic-platform-common#44)
[psu_base] get_status_led() returns current state of the status LED ((sonic-net/sonic-platform-common#39)
Fix abbrv name for OSFP ((sonic-net/sonic-platform-common#36)
[sff8436] support "Control Bytes" and "Options" ((sonic-net/sonic-platform-common#38)
sonic_sfp: avoid possible key error in get_physical_to_logical() ((sonic-net/sonic-platform-common#37)

[sonic-platform-daemons]

[xcvrd] Enhance xcvrd to handle new system level event/error (sonic-net/sonic-platform-daemons#39)
[xcvrd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#38)
[psud] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#37)
[syseepromd] Support both new platform API and old platform plugins (sonic-net/sonic-platform-daemons#36)
Add missing import statemet (sonic-net/sonic-platform-daemons#32)
sonic_xcvrd: Support for DOM Threshold values for EEPROM dump (sonic-net/sonic-platform-daemons#29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants