Skip to content

Commit c978449

Browse files
bbinxieabdosigracelicdarlakshmstephenxs
authored
update from azure201911 (#203)
* [brcmsai]: Updated BRCM SAI Debina package to 3.7.5.1-2 (sonic-net#4916) Fix for Copp Rules not having Policer Rate-Limit applied. Signed-off-by: Abhishek Dosi <[email protected]> * [nephos]: upgrade Nephos SAI version to c749df (sonic-net#4814) Verified with Nephos nps8365 based platform Accton AS7116-54x. * "[config]: Multi ASIC loopback changes (sonic-net#4895) Resubmitting the changes for (sonic-net#4825) with fixes for sonic-bgpcdgd test failures Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]> * [mellanox]: Support warm reboot on MSN4700 (sonic-net#4910) * [Submodule Update] Sonic-platform-common [sfp_base] Update return value documentation of channel-specific methods (#98) [SfpBase] Fix key name typo in docstring (#99) [sfp] Tweak key names of some transceiver info fields (#97) [sfputil] Make SfpUtilHelper.get_physical_to_logical noexcept as in SfpUtilBase (#96) * [Submodule update] sonic-platform-daemons [xcvrd] Update key names in 'get_media_settings_value()' (#63) [xcvrd] Tweak some transceiver info key names (#62) * [Submodule update] sonic-utilities [sfpshow][mock_state_db] Tweak key names of some transceiver info fields (sonic-net#958) [config] Fix syntax error (sonic-net#966) [config] Fix indentation level in _get_disabled_services_list() (sonic-net#965) * [Submodule Update] sonic-swss [aclorch] Use IPv6 Next Header internally for protocol number on MLNX platform (sonic-net#1343) * [Submodule Update] Add support for attribute capability query in lua script (sonic-net#362) * Cherry-pick was not clean. Fixing it. Signed-off-by: Abhishek Dosi <[email protected]> * [telemetry] Call sonic-cfggen Once (sonic-net#4901) sonic-cfggen call is slow and this is taking place in the SONiC boot up process. The change uses templates to assemble all required vars into single template file. With this change, telemetry now calls once into sonic-cfggen. signed-off-by: Tamer Ahmed <[email protected]> * [mgmt docker] move pycryptodome installation to the end of the docker building (sonic-net#4917) * [mgmt docker] move pycryptodome installation to the end of the docker building Signed-off-by: Ying Xie <[email protected]> * pin down the version to current: 3.9.8 * comment * Add support for bcmsh and bcmcmd utlitites in multi ASIC devices (sonic-net#4926) Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]> This PR has changes to support accessing the bcmsh and bcmcmd utilities on multi ASIC devices Changes done - move the link of /var/run/sswsyncd from docker-syncd-brcm.mk to docker_image_ctl.j2 - update the bcmsh and bcmcmd scripts to take -n [ASIC_ID] as an argument on multi ASIC platforms * [caclmgrd] Improve code reuse (sonic-net#4931) Improve code reuse in `generate_block_ip2me_traffic_iptables_commands()` function. * [Submodule Update] sonic-utilities Intf table migration for APP_DB entries during warmboot (sonic-net#980) [Multi NPU] Time Improvements to the config reload/load_minigraph commands (sonic-net#917) * [Submodule Update] sonic-py-swssdk [MultiDB]: use python class composition to avoid confusion in base class (#74) * [Submodule update] sonic-snmpagent. Movent to 201911 Branch with with following PR's : Implement cbgpPeer2State in CiscoBgp4MIB (#119) Fix index nodes in LLDP tables whose access right is not-accessible. (#112) Fix quagga/FRR parser on IPv6 BGP sessions (#122) [lint] Fix some syntax errors or warnings (#127) Update README.md: Add lgtm badges (#128) [Multi-asic]: Support multi-asic platform (#126) Simplify test code (#132) [Multi-asic]: Namespace support for LLDP and Sensor tables (#131) Fix undefined variable and warning message (#134) Fix SNMP AgentX socket connection timeout when using Namespace.get_all() (#140) [Namespace] Fix interfaces counters in InterfacesMIB RFC 2863 (#141) Fix LGTM reported alert of PR#141 (#142) * [bgpcfgd] - Fix a key error during delete (sonic-net#4946) * [Submodule Update] sonic-utilities Fix the None Type Exception when Interface Table does not exist (cold boot) as part of db migration (sonic-net#986) * Fix the below frr start.sh jija2 exception in 201911 image syslog: (sonic-net#4958) File "/usr/local/bin/sonic-cfggen", line 380, in <module> main() File "/usr/local/bin/sonic-cfggen", line 354, in main print(template.render(data)) File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1090, in render self.environment.handle_exception() File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 832, in handle_exception reraise(*rewrite_traceback_stack(source=source)) File "<template>", line 1, in top-level template code File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 471, in getattr return getattr(obj, attribute) jinja2.exceptions.UndefinedError: 'WARM_RESTART' is undefined Signed-off-by: Abhishek Dosi <[email protected]> * [Submodule update] sonic-snmpagent [201911] Fix interface counters in RFC1213 (#144) * [docker-ptf] Add support for spytest to ptf container (sonic-net#4410) - Install apt and pip dependencies - Define traffic generator service Signed-off-by: Danny Allen <[email protected]> * [arista] update Arista drivers submodules (sonic-net#4967) Merge most of the changes that recently made it to master. This will be the last such merge operation and future commits will only cherry-pick fixes and targeted features. Major fixes and features, - reboot cause enhancement with more hardware reboot cause reporting - fix reboot cause parsing issue with 201811 release - fix get_change_event logic - fix error message on missing sysfs entry by our plugins - final piece of the platform refactors for fan and sensor reporting through the platform API * [201911][devices] Update SFP keys to align with new standard (sonic-net#4976) Align SFP key names with new standard defined in sonic-net/sonic-platform-common#97 - hardwarerev -> hardware_rev - serialnum -> serial - manufacturename -> manufacturer - modelname -> model - Connector -> connector * [201911][sonic-telemetry] Update submodule (sonic-net#4987) Point submodule to new 201911 branch of sonic-telemetry and update pointer to the current HEAD of the 201911 branch * src/sonic-telemetry aaa9188...01b5365 (1): > [testdata] Update SFP keys to align with new standard (#39) * [201911][sudoers] Add `sonic_installer list` to read-only commands (sonic-net#4997) `sonic_installer list` is a read-only command. Specify it as such in the sudoers file. This will also ensure the new `show boot` command, which calls `sudo sonic_installer list` under the hood doesn't fail due to permissions. * [caclmgrd] Filter DHCP packets based on dest port only (sonic-net#4995) Co-authored-by: abdosi <[email protected]> Co-authored-by: gracelicd <[email protected]> Co-authored-by: arlakshm <[email protected]> Co-authored-by: Stephen Sun <[email protected]> Co-authored-by: Abhishek Dosi <[email protected]> Co-authored-by: Tamer Ahmed <[email protected]> Co-authored-by: Ying Xie <[email protected]> Co-authored-by: Joe LeVeque <[email protected]> Co-authored-by: Prince Sunny <[email protected]> Co-authored-by: Danny Allen <[email protected]> Co-authored-by: Samuel Angebault <[email protected]>
1 parent 9f96a22 commit c978449

File tree

23 files changed

+227
-210
lines changed

23 files changed

+227
-210
lines changed

.gitmodules

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
[submodule "src/sonic-telemetry"]
7373
path = src/sonic-telemetry
7474
url = https://github.com/Azure/sonic-telemetry
75+
branch = 201911
7576
[submodule "Switch-SDK-drivers"]
7677
path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
7778
url = https://github.com/Mellanox/Switch-SDK-drivers

device/accton/x86_64-accton_as7116_54x-r0/sonic_platform/sfp.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def __init__(self, sfp_index, sfp_type):
195195
self.port_to_eeprom_mapping[p_num] = eeprom_path.format(
196196
self.port_to_i2c_mapping[p_num])
197197

198-
self.info_dict_keys = ['type', 'hardwarerev', 'serialnum', 'manufacturename', 'modelname', 'Connector', 'encoding', 'ext_identifier',
198+
self.info_dict_keys = ['type', 'hardware_rev', 'serial', 'manufacturer', 'model', 'connector', 'encoding', 'ext_identifier',
199199
'ext_rateselect_compliance', 'cable_type', 'cable_length', 'nominal_bit_rate', 'specification_compliance', 'vendor_date', 'vendor_oui']
200200

201201
self.dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status', 'power_lpmode', 'tx_disable', 'tx_disable_channel', 'temperature', 'voltage',
@@ -308,11 +308,11 @@ def get_sfp_transceiver_info(self):
308308
keys |Value Format |Information
309309
---------------------------|---------------|----------------------------
310310
type |1*255VCHAR |type of SFP
311-
hardwarerev |1*255VCHAR |hardware version of SFP
312-
serialnum |1*255VCHAR |serial number of the SFP
313-
manufacturename |1*255VCHAR |SFP vendor name
314-
modelname |1*255VCHAR |SFP model name
315-
Connector |1*255VCHAR |connector information
311+
hardware_rev |1*255VCHAR |hardware version of SFP
312+
serial |1*255VCHAR |serial number of the SFP
313+
manufacturer |1*255VCHAR |SFP vendor name
314+
model |1*255VCHAR |SFP model name
315+
connector |1*255VCHAR |connector information
316316
encoding |1*255VCHAR |encoding information
317317
ext_identifier |1*255VCHAR |extend identifier
318318
ext_rateselect_compliance |1*255VCHAR |extended rateSelect compliance
@@ -371,17 +371,17 @@ def get_sfp_transceiver_info(self):
371371

372372
if sfp_interface_bulk_data:
373373
transceiver_info_dict['type'] = sfp_interface_bulk_data['data']['type']['value']
374-
transceiver_info_dict['Connector'] = sfp_interface_bulk_data['data']['Connector']['value']
374+
transceiver_info_dict['connector'] = sfp_interface_bulk_data['data']['Connector']['value']
375375
transceiver_info_dict['encoding'] = sfp_interface_bulk_data['data']['EncodingCodes']['value']
376376
transceiver_info_dict['ext_identifier'] = sfp_interface_bulk_data['data']['Extended Identifier']['value']
377377
transceiver_info_dict['ext_rateselect_compliance'] = sfp_interface_bulk_data['data']['RateIdentifier']['value']
378378
transceiver_info_dict['type_abbrv_name'] = sfp_interface_bulk_data['data']['type_abbrv_name']['value']
379379

380-
transceiver_info_dict['manufacturename'] = sfp_vendor_name_data[
380+
transceiver_info_dict['manufacturer'] = sfp_vendor_name_data[
381381
'data']['Vendor Name']['value'] if sfp_vendor_name_data else 'N/A'
382-
transceiver_info_dict['modelname'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
383-
transceiver_info_dict['hardwarerev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
384-
transceiver_info_dict['serialnum'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
382+
transceiver_info_dict['model'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
383+
transceiver_info_dict['hardware_rev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
384+
transceiver_info_dict['serial'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
385385
transceiver_info_dict['vendor_oui'] = sfp_vendor_oui_data['data']['Vendor OUI']['value'] if sfp_vendor_oui_data else 'N/A'
386386
transceiver_info_dict['vendor_date'] = sfp_vendor_date_data[
387387
'data']['VendorDataCode(YYYY-MM-DD Lot)']['value'] if sfp_vendor_date_data else 'N/A'
@@ -562,11 +562,11 @@ def get_qsfp_transceiver_info(self):
562562
keys |Value Format |Information
563563
---------------------------|---------------|----------------------------
564564
type |1*255VCHAR |type of SFP
565-
hardwarerev |1*255VCHAR |hardware version of SFP
566-
serialnum |1*255VCHAR |serial number of the SFP
567-
manufacturename |1*255VCHAR |SFP vendor name
568-
modelname |1*255VCHAR |SFP model name
569-
Connector |1*255VCHAR |connector information
565+
hardware_rev |1*255VCHAR |hardware version of SFP
566+
serial |1*255VCHAR |serial number of the SFP
567+
manufacturer |1*255VCHAR |SFP vendor name
568+
model |1*255VCHAR |SFP model name
569+
connector |1*255VCHAR |connector information
570570
encoding |1*255VCHAR |encoding information
571571
ext_identifier |1*255VCHAR |extend identifier
572572
ext_rateselect_compliance |1*255VCHAR |extended rateSelect compliance
@@ -625,17 +625,17 @@ def get_qsfp_transceiver_info(self):
625625

626626
if sfp_interface_bulk_data:
627627
transceiver_info_dict['type'] = sfp_interface_bulk_data['data']['type']['value']
628-
transceiver_info_dict['Connector'] = sfp_interface_bulk_data['data']['Connector']['value']
628+
transceiver_info_dict['connector'] = sfp_interface_bulk_data['data']['Connector']['value']
629629
transceiver_info_dict['encoding'] = sfp_interface_bulk_data['data']['EncodingCodes']['value']
630630
transceiver_info_dict['ext_identifier'] = sfp_interface_bulk_data['data']['Extended Identifier']['value']
631631
transceiver_info_dict['ext_rateselect_compliance'] = sfp_interface_bulk_data['data']['RateIdentifier']['value']
632632
transceiver_info_dict['type_abbrv_name'] = sfp_interface_bulk_data['data']['type_abbrv_name']['value']
633633

634-
transceiver_info_dict['manufacturename'] = sfp_vendor_name_data[
634+
transceiver_info_dict['manufacturer'] = sfp_vendor_name_data[
635635
'data']['Vendor Name']['value'] if sfp_vendor_name_data else 'N/A'
636-
transceiver_info_dict['modelname'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
637-
transceiver_info_dict['hardwarerev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
638-
transceiver_info_dict['serialnum'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
636+
transceiver_info_dict['model'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
637+
transceiver_info_dict['hardware_rev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
638+
transceiver_info_dict['serial'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
639639
transceiver_info_dict['vendor_oui'] = sfp_vendor_oui_data['data']['Vendor OUI']['value'] if sfp_vendor_oui_data else 'N/A'
640640
transceiver_info_dict['vendor_date'] = sfp_vendor_date_data[
641641
'data']['VendorDataCode(YYYY-MM-DD Lot)']['value'] if sfp_vendor_date_data else 'N/A'
@@ -1121,7 +1121,7 @@ def get_model(self):
11211121
string: Model/part number of device
11221122
"""
11231123
transceiver_dom_info_dict = self.get_transceiver_info()
1124-
return transceiver_dom_info_dict.get("modelname", "N/A")
1124+
return transceiver_dom_info_dict.get("model", "N/A")
11251125

11261126
def get_serial(self):
11271127
"""
@@ -1130,4 +1130,4 @@ def get_serial(self):
11301130
string: Serial number of device
11311131
"""
11321132
transceiver_dom_info_dict = self.get_transceiver_info()
1133-
return transceiver_dom_info_dict.get("serialnum", "N/A")
1133+
return transceiver_dom_info_dict.get("serial", "N/A")

device/arista/x86_64-arista_7280cr3_32p4/fancontrol

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
INTERVAL=5
2-
DEVPATH=hwmon2=devices/pci0000:00/0000:00:09.0 hwmon4=devices/pci0000:00/0000:00:09.0/i2c-56/56-004c
3-
DEVNAME=hwmon2=scd_fan_p3 hwmon4=max6658
4-
FCTEMPS=hwmon2/pwm6=hwmon4/temp1_input hwmon2/pwm5=hwmon4/temp1_input hwmon2/pwm4=hwmon4/temp1_input hwmon2/pwm4=hwmon4/temp1_input hwmon2/pwm2=hwmon4/temp1_input hwmon2/pwm1=hwmon4/temp1_input
2+
DEVPATH=hwmon2=devices/pci0000:00/0000:00:09.0 hwmon3=devices/pci0000:00/0000:00:09.0/i2c-56/56-004c
3+
DEVNAME=hwmon2=scd_fan_p3 hwmon3=max6658
4+
FCTEMPS=hwmon2/pwm6=hwmon3/temp1_input hwmon2/pwm5=hwmon3/temp1_input hwmon2/pwm4=hwmon3/temp1_input hwmon2/pwm3=hwmon3/temp1_input hwmon2/pwm2=hwmon3/temp1_input hwmon2/pwm1=hwmon3/temp1_input
55
FCFANS=hwmon2/pwm6=hwmon2/fan6_input hwmon2/pwm5=hwmon2/fan5_input hwmon2/pwm4=hwmon2/fan4_input hwmon2/pwm3=hwmon2/fan3_input hwmon2/pwm2=hwmon2/fan2_input hwmon2/pwm1=hwmon2/fan1_input
66
MINTEMP=hwmon2/pwm6=50 hwmon2/pwm5=50 hwmon2/pwm4=50 hwmon2/pwm3=50 hwmon2/pwm2=50 hwmon2/pwm1=50
77
MINPWM=hwmon2/pwm6=128 hwmon2/pwm5=128 hwmon2/pwm4=128 hwmon2/pwm3=128 hwmon2/pwm2=128 hwmon2/pwm1=128

device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(self, sfp_index):
105105
self.port_to_eeprom_mapping[x] = eeprom_path.format(
106106
self.port_to_i2c_mapping[x])
107107

108-
self.info_dict_keys = ['type', 'hardwarerev', 'serialnum', 'manufacturename', 'modelname', 'Connector', 'encoding', 'ext_identifier',
108+
self.info_dict_keys = ['type', 'hardware_rev', 'serial', 'manufacturer', 'model', 'connector', 'encoding', 'ext_identifier',
109109
'ext_rateselect_compliance', 'cable_type', 'cable_length', 'nominal_bit_rate', 'specification_compliance', 'vendor_date', 'vendor_oui']
110110

111111
self.dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status', 'power_lpmode', 'tx_disable', 'tx_disable_channel', 'temperature', 'voltage',
@@ -185,11 +185,11 @@ def get_transceiver_info(self):
185185
keys |Value Format |Information
186186
---------------------------|---------------|----------------------------
187187
type |1*255VCHAR |type of SFP
188-
hardwarerev |1*255VCHAR |hardware version of SFP
189-
serialnum |1*255VCHAR |serial number of the SFP
190-
manufacturename |1*255VCHAR |SFP vendor name
191-
modelname |1*255VCHAR |SFP model name
192-
Connector |1*255VCHAR |connector information
188+
hardware_rev |1*255VCHAR |hardware version of SFP
189+
serial |1*255VCHAR |serial number of the SFP
190+
manufacturer |1*255VCHAR |SFP vendor name
191+
model |1*255VCHAR |SFP model name
192+
connector |1*255VCHAR |connector information
193193
encoding |1*255VCHAR |encoding information
194194
ext_identifier |1*255VCHAR |extend identifier
195195
ext_rateselect_compliance |1*255VCHAR |extended rateSelect compliance
@@ -248,17 +248,17 @@ def get_transceiver_info(self):
248248

249249
if sfp_interface_bulk_data:
250250
transceiver_info_dict['type'] = sfp_interface_bulk_data['data']['type']['value']
251-
transceiver_info_dict['Connector'] = sfp_interface_bulk_data['data']['Connector']['value']
251+
transceiver_info_dict['connector'] = sfp_interface_bulk_data['data']['Connector']['value']
252252
transceiver_info_dict['encoding'] = sfp_interface_bulk_data['data']['EncodingCodes']['value']
253253
transceiver_info_dict['ext_identifier'] = sfp_interface_bulk_data['data']['Extended Identifier']['value']
254254
transceiver_info_dict['ext_rateselect_compliance'] = sfp_interface_bulk_data['data']['RateIdentifier']['value']
255255
transceiver_info_dict['type_abbrv_name'] = sfp_interface_bulk_data['data']['type_abbrv_name']['value']
256256

257-
transceiver_info_dict['manufacturename'] = sfp_vendor_name_data[
257+
transceiver_info_dict['manufacturer'] = sfp_vendor_name_data[
258258
'data']['Vendor Name']['value'] if sfp_vendor_name_data else 'N/A'
259-
transceiver_info_dict['modelname'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
260-
transceiver_info_dict['hardwarerev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
261-
transceiver_info_dict['serialnum'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
259+
transceiver_info_dict['model'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
260+
transceiver_info_dict['hardware_rev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
261+
transceiver_info_dict['serial'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
262262
transceiver_info_dict['vendor_oui'] = sfp_vendor_oui_data['data']['Vendor OUI']['value'] if sfp_vendor_oui_data else 'N/A'
263263
transceiver_info_dict['vendor_date'] = sfp_vendor_date_data[
264264
'data']['VendorDataCode(YYYY-MM-DD Lot)']['value'] if sfp_vendor_date_data else 'N/A'
@@ -705,7 +705,7 @@ def get_model(self):
705705
string: Model/part number of device
706706
"""
707707
transceiver_dom_info_dict = self.get_transceiver_info()
708-
return transceiver_dom_info_dict.get("modelname", "N/A")
708+
return transceiver_dom_info_dict.get("model", "N/A")
709709

710710
def get_serial(self):
711711
"""
@@ -714,4 +714,4 @@ def get_serial(self):
714714
string: Serial number of device
715715
"""
716716
transceiver_dom_info_dict = self.get_transceiver_info()
717-
return transceiver_dom_info_dict.get("serialnum", "N/A")
717+
return transceiver_dom_info_dict.get("serial", "N/A")

device/celestica/x86_64-cel_seastone-r0/sonic_platform/sfp.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self, sfp_index):
109109
p_num = x - 1 if self.PORT_START == 1 else x
110110
self.port_to_eeprom_mapping[x] = eeprom_path.format(p_num + 26)
111111

112-
self.info_dict_keys = ['type', 'hardwarerev', 'serialnum', 'manufacturename', 'modelname', 'Connector', 'encoding', 'ext_identifier',
112+
self.info_dict_keys = ['type', 'hardware_rev', 'serial', 'manufacturer', 'model', 'connector', 'encoding', 'ext_identifier',
113113
'ext_rateselect_compliance', 'cable_type', 'cable_length', 'nominal_bit_rate', 'specification_compliance', 'vendor_date', 'vendor_oui']
114114

115115
self.dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status', 'power_lpmode', 'tx_disable', 'tx_disable_channel', 'temperature', 'voltage',
@@ -189,11 +189,11 @@ def get_transceiver_info(self):
189189
keys |Value Format |Information
190190
---------------------------|---------------|----------------------------
191191
type |1*255VCHAR |type of SFP
192-
hardwarerev |1*255VCHAR |hardware version of SFP
193-
serialnum |1*255VCHAR |serial number of the SFP
194-
manufacturename |1*255VCHAR |SFP vendor name
195-
modelname |1*255VCHAR |SFP model name
196-
Connector |1*255VCHAR |connector information
192+
hardware_rev |1*255VCHAR |hardware version of SFP
193+
serial |1*255VCHAR |serial number of the SFP
194+
manufacturer |1*255VCHAR |SFP vendor name
195+
model |1*255VCHAR |SFP model name
196+
connector |1*255VCHAR |connector information
197197
encoding |1*255VCHAR |encoding information
198198
ext_identifier |1*255VCHAR |extend identifier
199199
ext_rateselect_compliance |1*255VCHAR |extended rateSelect compliance
@@ -252,17 +252,17 @@ def get_transceiver_info(self):
252252

253253
if sfp_interface_bulk_data:
254254
transceiver_info_dict['type'] = sfp_interface_bulk_data['data']['type']['value']
255-
transceiver_info_dict['Connector'] = sfp_interface_bulk_data['data']['Connector']['value']
255+
transceiver_info_dict['connector'] = sfp_interface_bulk_data['data']['Connector']['value']
256256
transceiver_info_dict['encoding'] = sfp_interface_bulk_data['data']['EncodingCodes']['value']
257257
transceiver_info_dict['ext_identifier'] = sfp_interface_bulk_data['data']['Extended Identifier']['value']
258258
transceiver_info_dict['ext_rateselect_compliance'] = sfp_interface_bulk_data['data']['RateIdentifier']['value']
259259
transceiver_info_dict['type_abbrv_name'] = sfp_interface_bulk_data['data']['type_abbrv_name']['value']
260260

261-
transceiver_info_dict['manufacturename'] = sfp_vendor_name_data[
261+
transceiver_info_dict['manufacturer'] = sfp_vendor_name_data[
262262
'data']['Vendor Name']['value'] if sfp_vendor_name_data else 'N/A'
263-
transceiver_info_dict['modelname'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
264-
transceiver_info_dict['hardwarerev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
265-
transceiver_info_dict['serialnum'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
263+
transceiver_info_dict['model'] = sfp_vendor_pn_data['data']['Vendor PN']['value'] if sfp_vendor_pn_data else 'N/A'
264+
transceiver_info_dict['hardware_rev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value'] if sfp_vendor_rev_data else 'N/A'
265+
transceiver_info_dict['serial'] = sfp_vendor_sn_data['data']['Vendor SN']['value'] if sfp_vendor_sn_data else 'N/A'
266266
transceiver_info_dict['vendor_oui'] = sfp_vendor_oui_data['data']['Vendor OUI']['value'] if sfp_vendor_oui_data else 'N/A'
267267
transceiver_info_dict['vendor_date'] = sfp_vendor_date_data[
268268
'data']['VendorDataCode(YYYY-MM-DD Lot)']['value'] if sfp_vendor_date_data else 'N/A'
@@ -925,7 +925,7 @@ def get_model(self):
925925
string: Model/part number of device
926926
"""
927927
transceiver_dom_info_dict = self.get_transceiver_info()
928-
return transceiver_dom_info_dict.get("modelname", "N/A")
928+
return transceiver_dom_info_dict.get("model", "N/A")
929929

930930
def get_serial(self):
931931
"""
@@ -934,7 +934,7 @@ def get_serial(self):
934934
string: Serial number of device
935935
"""
936936
transceiver_dom_info_dict = self.get_transceiver_info()
937-
return transceiver_dom_info_dict.get("serialnum", "N/A")
937+
return transceiver_dom_info_dict.get("serial", "N/A")
938938

939939
def get_status(self):
940940
"""

0 commit comments

Comments
 (0)