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

Changed xcvrd to pull all fields #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 4 additions & 16 deletions sonic-xcvrd/scripts/xcvrd
Original file line number Diff line number Diff line change
Expand Up @@ -254,23 +254,11 @@ def post_port_sfp_info_to_db(logical_port_name, table, transceiver_dict,
try:
port_info_dict = _wrapper_get_transceiver_info(physical_port)
if port_info_dict is not None:
port_info_dict['application_advertisement'] = port_info_dict.get('application_advertisement', 'N/A')

transceiver_dict[physical_port]=port_info_dict
fvs = swsscommon.FieldValuePairs([('type', port_info_dict['type']),
('hardware_rev', port_info_dict['hardware_rev']),
('serial', port_info_dict['serial']),
('manufacturer', port_info_dict['manufacturer']),
('model', port_info_dict['model']),
('vendor_oui',port_info_dict['vendor_oui']),
('vendor_date',port_info_dict['vendor_date']),
('connector',port_info_dict['connector']),
('encoding',port_info_dict['encoding']),
('ext_identifier',port_info_dict['ext_identifier']),
('ext_rateselect_compliance',port_info_dict['ext_rateselect_compliance']),
('cable_type',port_info_dict['cable_type']),
('cable_length',port_info_dict['cable_length']),
('specification_compliance',port_info_dict['specification_compliance']),
('nominal_bit_rate',port_info_dict['nominal_bit_rate']),
('application_advertisement',port_info_dict['application_advertisement'] if 'application_advertisement' in port_info_dict else 'N/A')])

fvs = swsscommon.FieldValuePairs(list(port_info_dict.items()))
table.set(port_name, fvs)
else:
return SFP_EEPROM_NOT_READY
Expand Down