Add support for 'Extended Specification Compliance' for QSFP cables parser (#5096)

Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com>
This commit is contained in:
shlomibitton 2020-08-07 00:16:59 +03:00 committed by GitHub
parent 08f3b9720b
commit 995bd09486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ except ImportError as e:
# definitions of the offset and width for values in XCVR info eeprom # definitions of the offset and width for values in XCVR info eeprom
XCVR_INTFACE_BULK_OFFSET = 0 XCVR_INTFACE_BULK_OFFSET = 0
XCVR_INTFACE_BULK_WIDTH_QSFP = 20 XCVR_INTFACE_BULK_WIDTH_QSFP = 65
XCVR_INTFACE_BULK_WIDTH_SFP = 21 XCVR_INTFACE_BULK_WIDTH_SFP = 21
XCVR_TYPE_OFFSET = 0 XCVR_TYPE_OFFSET = 0
XCVR_TYPE_WIDTH = 1 XCVR_TYPE_WIDTH = 1
@ -827,6 +827,8 @@ class SFP(SfpBase):
for key in qsfp_compliance_code_tup: for key in qsfp_compliance_code_tup:
if key in sfp_interface_bulk_data['data']['Specification compliance']['value']: if key in sfp_interface_bulk_data['data']['Specification compliance']['value']:
compliance_code_dict[key] = sfp_interface_bulk_data['data']['Specification compliance']['value'][key]['value'] compliance_code_dict[key] = sfp_interface_bulk_data['data']['Specification compliance']['value'][key]['value']
if sfp_interface_bulk_data['data']['Extended Specification compliance']['value'] != "Unspecified":
compliance_code_dict['Extended Specification compliance'] = sfp_interface_bulk_data['data']['Extended Specification compliance']['value']
transceiver_info_dict['specification_compliance'] = str(compliance_code_dict) transceiver_info_dict['specification_compliance'] = str(compliance_code_dict)
transceiver_info_dict['nominal_bit_rate'] = str(sfp_interface_bulk_data['data']['Nominal Bit Rate(100Mbs)']['value']) transceiver_info_dict['nominal_bit_rate'] = str(sfp_interface_bulk_data['data']['Nominal Bit Rate(100Mbs)']['value'])