Skip to content
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
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)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihirpat1 : Please validate, add UT outcome of following CLIs:

specific port (optics EEPROM/DOM)

  1. show int trans eeprom Ethernet<> -n asic<>
  2. show int trans eeprom --dom Ethernet<> -n asic<>

all ports where optics inserted in LC/Fixed-chassis
3) show int trans eeprom
4)show int trans eeprom --dom

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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