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

[SFP-refactor]Fix vendor revision key issue #4816

Merged
merged 2 commits into from
Dec 23, 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
2 changes: 1 addition & 1 deletion tests/common/platform/transceiver_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def check_transceiver_details(dut, asic_index, interfaces, xcvr_skip_list):
"""
asichost = dut.asic_instance(asic_index)
logging.info("Check detailed transceiver information of each connected port")
expected_fields = ["type", "hardware_rev", "serial", "manufacturer", "model"]
expected_fields = ["type", "vendor_rev", "serial", "manufacturer", "model"]
for intf in interfaces:
if intf not in xcvr_skip_list[dut.hostname]:
cmd = 'redis-cli -n 6 hgetall "TRANSCEIVER_INFO|%s"' % intf
Expand Down
5 changes: 4 additions & 1 deletion tests/platform_tests/api/test_sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TestSfpApi(PlatformApiTestBase):
'type',
'manufacturer',
'model',
'hardware_rev',
'vendor_rev',
'serial',
'vendor_oui',
'vendor_date',
Expand Down Expand Up @@ -259,6 +259,9 @@ def test_get_transceiver_info(self, duthosts, enum_rand_one_per_hwsku_hostname,

unexpected_keys = set(actual_keys) - set(self.EXPECTED_XCVR_INFO_KEYS + self.NEWLY_ADDED_XCVR_INFO_KEYS)
for key in unexpected_keys:
#hardware_rev is applicable only for QSFP-DD
if key == 'hardware_rev' and info_dict["type_abbrv_name"] == "QSFP-DD":
continue
aravindmani-1 marked this conversation as resolved.
Show resolved Hide resolved
self.expect(False, "Transceiver {} info contains unexpected field '{}'".format(i, key))
self.assert_expectations()

Expand Down
2 changes: 1 addition & 1 deletion tests/snmp/test_snmp_phy_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def test_transceiver_info(duthosts, enum_rand_one_per_hwsku_hostname, snmp_physi
assert transceiver_snmp_fact['entPhysClass'] == PHYSICAL_CLASS_PORT
assert transceiver_snmp_fact['entPhyParentRelPos'] == -1
assert transceiver_snmp_fact['entPhysName'] == name
assert transceiver_snmp_fact['entPhysHwVer'] == transceiver_info['hardware_rev']
assert transceiver_snmp_fact['entPhysHwVer'] == transceiver_info['vendor_rev']
assert transceiver_snmp_fact['entPhysFwVer'] == ''
assert transceiver_snmp_fact['entPhysSwVer'] == ''
assert transceiver_snmp_fact['entPhysSerialNum'] == transceiver_info['serial']
Expand Down