Skip to content

Commit

Permalink
Dell S6100: Addition of SFP type_abbrv_name field (#10846)
Browse files Browse the repository at this point in the history
* Dell S6100: Addition of SFP type_abbrv_name field

* Update sfp.py

* Update sfp.py

Co-authored-by: Aravind Mani <aravind.m1@dell.com>
  • Loading branch information
aravindmani-1 and aravindmani-1 authored May 19, 2022
1 parent 77298da commit cceef8e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'encoding', 'ext_identifier', 'ext_rateselect_compliance',
'cable_type', 'cable_length', 'nominal_bit_rate',
'specification_compliance', 'vendor_date', 'vendor_oui',
'application_advertisement']
'type_abbrv_name', 'application_advertisement']

dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status',
'power_lpmode', 'tx_disable', 'tx_disable_channel',
Expand Down Expand Up @@ -91,6 +91,7 @@
'nominal_bit_rate': [INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
'specification_compliance':
[INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
'type_abbrv_name': [INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
'manufacturer': [INFO_OFFSET, 20, 16, 'parse_vendor_name'],
'vendor_oui': [INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
'model': [INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
Expand Down Expand Up @@ -198,6 +199,7 @@ def get_transceiver_info(self):
ext_id = iface_data['data']['Extended Identifier']['value']
rate_identifier = iface_data['data']['RateIdentifier']['value']
identifier = iface_data['data']['type']['value']
type_abbrv_name = iface_data['data']['type_abbrv_name']['value']
bit_rate = str(
iface_data['data']['Nominal Bit Rate(100Mbs)']['value'])

Expand Down Expand Up @@ -254,6 +256,7 @@ def get_transceiver_info(self):
return transceiver_info_dict

# Fill The Dictionary and return
transceiver_info_dict['type_abbrv_name'] = type_abbrv_name
transceiver_info_dict['type'] = identifier
transceiver_info_dict['hardware_rev'] = vendor_rev
transceiver_info_dict['serial'] = vendor_sn
Expand Down

0 comments on commit cceef8e

Please sign in to comment.