-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Mellanox] Implement new platform API for SONiC physical entity mib extension #23
Changes from all commits
838efec
2497361
4cd10f9
25f48ab
4a2f614
c135445
938ed53
2e3ef5b
30bad8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,7 +286,8 @@ | |
class SFP(SfpBase): | ||
"""Platform-specific SFP class""" | ||
|
||
def __init__(self, sfp_index, sfp_type): | ||
def __init__(self, sfp_index, sfp_type, platform): | ||
SfpBase.__init__(self) | ||
self.index = sfp_index + 1 | ||
self.sfp_eeprom_path = "qsfp{}".format(self.index) | ||
self.sfp_status_path = "qsfp{}_status".format(self.index) | ||
|
@@ -296,6 +297,10 @@ def __init__(self, sfp_index, sfp_type): | |
self.sdk_handle = None | ||
self.sdk_index = sfp_index | ||
|
||
# initialize SFP thermal list | ||
from .thermal import initialize_sfp_thermals | ||
initialize_sfp_thermals(platform, self._thermal_list, self.index) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need this? Is it possible to keep using the thermal value in the current TRANSCEIVER_DOM_INFO table? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we need this. TRANSCEIVER_DOM_SENSOR table does not contains all the information that TEMPERATURE_INFO table needs. For example, warning status, critical_high_threshold and critical_low_threshold. |
||
|
||
|
||
#SDK initializing stuff | ||
def _initialize_sdk_handle(self): | ||
|
@@ -2053,3 +2058,11 @@ def set_power_override(self, power_override, power_set): | |
False if not | ||
""" | ||
return NotImplementedError | ||
|
||
def is_replaceable(self): | ||
""" | ||
Indicate whether this device is replaceable. | ||
Returns: | ||
bool: True if it is replaceable. | ||
""" | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"-1" as a special indicator shall be documented in the description of the API definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed