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

[platform] Update QSFP method name 'parse_qsfp_dom_capability' -> 'parse_dom_capability' #6695

Merged
merged 1 commit into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def get_qsfp_transceiver_bulk_status(self):
qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
(offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
else:
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def _dom_capability_detect(self):
QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
qsfp_version_compliance = int(
qsfp_version_compliance_raw[0], 16)
dom_capability = sfpi_obj.parse_qsfp_dom_capability(
dom_capability = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
if qsfp_version_compliance >= 0x08:
self.dom_temp_supported = dom_capability['data']['Temp_support']['value'] == 'On'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def _dom_capability_detect(self):
QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
qsfp_version_compliance = int(
qsfp_version_compliance_raw[0], 16)
dom_capability = sfpi_obj.parse_qsfp_dom_capability(
dom_capability = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
if qsfp_version_compliance >= 0x08:
self.dom_temp_supported = dom_capability['data']['Temp_support']['value'] == 'On'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
else:
return transceiver_dom_info_dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
else:
return transceiver_dom_info_dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return transceiver_dom_info_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return transceiver_dom_info_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down
2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def get_transceiver_dom_info_dict(self, port_num):
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes_via_ethtool(
port_num, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return transceiver_dom_info_dict

Expand Down
2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn4410-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def get_transceiver_dom_info_dict(self, port_num):
# in SFF-8636 dom capability definitions evolving with the versions.
qsfp_dom_capability_raw = self._read_eeprom_specific_bytes_via_ethtool(port_num, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return transceiver_dom_info_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def _dom_capability_detect(self):
QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
qsfp_version_compliance = int(
qsfp_version_compliance_raw[0], 16)
dom_capability = sfpi_obj.parse_qsfp_dom_capability(
dom_capability = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
if qsfp_version_compliance >= 0x08:
self.dom_temp_supported = dom_capability['data']['Temp_support']['value'] == 'On'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
'hardware_rev': [QSFP_INFO_OFFSET, 56, 2, 'parse_vendor_rev'],
'serial': [QSFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
'vendor_date': [QSFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_qsfp_dom_capability'],
'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_dom_capability'],
'dom_rev': [QSFP_DOM_OFFSET, 1, 1, 'parse_sfp_dom_rev'],
'ModuleThreshold': [QSFP_DOM_OFFSET1, 128, 24, 'parse_module_threshold_values'],
'ChannelThreshold': [QSFP_DOM_OFFSET1, 176, 16, 'parse_channel_threshold_values'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
'hardware_rev': [QSFP_INFO_OFFSET, 56, 2, 'parse_vendor_rev'],
'serial': [QSFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
'vendor_date': [QSFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_qsfp_dom_capability'],
'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_dom_capability'],
'dom_rev': [QSFP_DOM_OFFSET, 1, 1, 'parse_sfp_dom_rev'],
'ModuleThreshold': [QSFP_DOM_OFFSET1, 128, 24, 'parse_module_threshold_values'],
'ChannelThreshold': [QSFP_DOM_OFFSET1, 176, 16, 'parse_channel_threshold_values'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
'hardware_rev': [QSFP_INFO_OFFSET, 56, 2, 'parse_vendor_rev'],
'serial': [QSFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
'vendor_date': [QSFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_qsfp_dom_capability'],
'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_dom_capability'],
'dom_rev': [QSFP_DOM_OFFSET, 1, 1, 'parse_sfp_dom_rev'],
'ModuleThreshold': [QSFP_DOM_OFFSET1, 128, 24, 'parse_module_threshold_values'],
'ChannelThreshold': [QSFP_DOM_OFFSET1, 176, 16, 'parse_channel_threshold_values'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def get_transceiver_bulk_status(self):
# in SFF-8636 dom capability definitions evolving with the versions.
qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes((offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down Expand Up @@ -793,7 +793,7 @@ def get_tx_bias(self):

qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes((offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down Expand Up @@ -844,7 +844,7 @@ def get_rx_power(self):

qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes((offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down Expand Up @@ -895,7 +895,7 @@ def get_tx_power(self):

qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes((offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def get_transceiver_bulk_status(self):
# in SFF-8636 dom capability definitions evolving with the versions.
qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes((offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
else:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def get_transceiver_bulk_status(self):
qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
(offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
else:
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def _dom_capability_detect(self):
if qsfp_dom_capability_raw is not None:
qsfp_version_compliance_raw = self._read_eeprom_specific_bytes(QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
qsfp_version_compliance = int(qsfp_version_compliance_raw[0], 16)
dom_capability = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
dom_capability = sfpi_obj.parse_dom_capability(qsfp_dom_capability_raw, 0)
if qsfp_version_compliance >= 0x08:
self.dom_temp_supported = dom_capability['data']['Temp_support']['value'] == 'On'
self.dom_volt_supported = dom_capability['data']['Voltage_support']['value'] == 'On'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def get_transceiver_bulk_status(self):
qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
(offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(
qspf_dom_capability_data = sfpi_obj.parse_dom_capability(
qsfp_dom_capability_raw, 0)
else:
return None
Expand Down