Skip to content

Commit

Permalink
Transceiver eeprom dom CLI modification to show output from TRANSCEIV…
Browse files Browse the repository at this point in the history
…ER_DOM_THRESHOLD table (#2535)

* EEPROM CLI support to dump output from TRANSCEIVER_DOM_THRESHOLD table

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Resolved test failures

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
  • Loading branch information
mihirpat1 authored Dec 5, 2022
1 parent 42f51c2 commit 00c01b3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/sfpshow
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ class SFPShow(object):
if dump_dom:
sfp_type = sfp_info_dict['type']
dom_info_dict = state_db.get_all(state_db.STATE_DB, 'TRANSCEIVER_DOM_SENSOR|{}'.format(interface_name))
dom_info_dict.update(state_db.get_all(state_db.STATE_DB, 'TRANSCEIVER_DOM_THRESHOLD|{}'.format(interface_name)))
dom_output = self.convert_dom_to_output_string(sfp_type, dom_info_dict)
output += dom_output
else:
Expand Down
4 changes: 3 additions & 1 deletion tests/mock_tables/asic0/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"tx1power": "N/A",
"tx2power": "N/A",
"tx3power": "N/A",
"tx4power": "N/A",
"tx4power": "N/A"
},
"TRANSCEIVER_DOM_THRESHOLD|Ethernet0": {
"rxpowerhighalarm": "3.4001",
"rxpowerhighwarning": "2.4000",
"rxpowerlowalarm": "-13.5067",
Expand Down
4 changes: 3 additions & 1 deletion tests/mock_tables/asic1/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"tx1power": "N/A",
"tx2power": "N/A",
"tx3power": "N/A",
"tx4power": "N/A",
"tx4power": "N/A"
},
"TRANSCEIVER_DOM_THRESHOLD|Ethernet64": {
"rxpowerhighalarm": "3.4001",
"rxpowerhighwarning": "2.4000",
"rxpowerlowalarm": "-13.5067",
Expand Down
8 changes: 6 additions & 2 deletions tests/mock_tables/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
"tx1power": "N/A",
"tx2power": "N/A",
"tx3power": "N/A",
"tx4power": "N/A",
"tx4power": "N/A"
},
"TRANSCEIVER_DOM_THRESHOLD|Ethernet0": {
"rxpowerhighalarm": "3.4001",
"rxpowerhighwarning": "2.4000",
"rxpowerlowalarm": "-13.5067",
Expand Down Expand Up @@ -111,7 +113,9 @@
"tx5power": "1.175",
"tx6power": "1.175",
"tx7power": "1.175",
"tx8power": "1.175",
"tx8power": "1.175"
},
"TRANSCEIVER_DOM_THRESHOLD|Ethernet8": {
"rxpowerhighalarm": "6.9999",
"rxpowerhighwarning": "4.9999",
"rxpowerlowalarm": "-11.9044",
Expand Down

0 comments on commit 00c01b3

Please sign in to comment.