Skip to content

Commit

Permalink
fix RFC2737 with update xcvr vendor version key name (sonic-net#241)
Browse files Browse the repository at this point in the history
- What I did

In the TRANSCEIVER_INFO table of STATE_DB, the key of transceiver reversion was changed from "hardware_rev" to "vendor_rev", detail info please refer to PR sonic-net/sonic-platform-daemons#231

RFC2737 implementation needs to be updated with the new key name in order to get the correct info from the state DB

- How I did it

Update the key name from "hardware_rev" to "vendor_rev", update the unit test cases.

- How to verify it

Run the community SNMP test.

- Description for the changelog
  • Loading branch information
keboliu authored Feb 1, 2022
1 parent 3013597 commit 4ee573c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sonic_ax_impl/mibs/ietf/rfc2737.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class XcvrInfoDB(str, Enum):
Transceiver info keys
"""
TYPE = "type"
HARDWARE_REVISION = "hardware_rev"
VENDOR_REVISION = "vendor_rev"
SERIAL_NUMBER = "serial"
MANUFACTURE_NAME = "manufacturer"
MODEL_NAME = "model"
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic0/state_db.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"TRANSCEIVER_INFO|Ethernet0": {
"type": "QSFP+",
"hardware_rev": "A1",
"vendor_rev": "A1",
"serial": "SERIAL_NUM",
"manufacturer": "VENDOR_NAME",
"model": "MODEL_NAME"
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic1/state_db.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"TRANSCEIVER_INFO|Ethernet8": {
"type": "QSFP+",
"hardware_rev": "A1",
"vendor_rev": "A1",
"serial": "SERIAL_NUM",
"manufacturer": "VENDOR_NAME",
"model": "MODEL_NAME"
Expand Down
4 changes: 2 additions & 2 deletions tests/mock_tables/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
},
"TRANSCEIVER_INFO|Ethernet0": {
"type": "QSFP+",
"hardware_rev": "A1",
"vendor_rev": "A1",
"serial": "SERIAL_NUM",
"manufacturer": "VENDOR_NAME",
"model": "MODEL_NAME",
"is_replaceable": "True"
},
"TRANSCEIVER_INFO|Ethernet1": {
"type": "QSFP-DD",
"hardware_rev": "A1",
"vendor_rev": "A1",
"serial": "SERIAL_NUM",
"manufacturer": "VENDOR_NAME",
"model": "MODEL_NAME",
Expand Down

0 comments on commit 4ee573c

Please sign in to comment.