@@ -206,7 +206,7 @@ def _wrapper_get_sfp_type(physical_port):
206206# Remove unnecessary unit from the raw data
207207
208208
209- def beautify_dom_info_dict (dom_info_dict ):
209+ def beautify_dom_info_dict (dom_info_dict , physical_port ):
210210 dom_info_dict ['temperature' ] = strip_unit_and_beautify (dom_info_dict ['temperature' ], TEMP_UNIT )
211211 dom_info_dict ['voltage' ] = strip_unit_and_beautify (dom_info_dict ['voltage' ], VOLT_UNIT )
212212 dom_info_dict ['rx1power' ] = strip_unit_and_beautify (dom_info_dict ['rx1power' ], POWER_UNIT )
@@ -221,6 +221,19 @@ def beautify_dom_info_dict(dom_info_dict):
221221 dom_info_dict ['tx2power' ] = strip_unit_and_beautify (dom_info_dict ['tx2power' ], POWER_UNIT )
222222 dom_info_dict ['tx3power' ] = strip_unit_and_beautify (dom_info_dict ['tx3power' ], POWER_UNIT )
223223 dom_info_dict ['tx4power' ] = strip_unit_and_beautify (dom_info_dict ['tx4power' ], POWER_UNIT )
224+ if _wrapper_get_sfp_type (physical_port ) == 'QSFP_DD' :
225+ dom_info_dict ['rx5power' ] = strip_unit_and_beautify (dom_info_dict ['rx5power' ], POWER_UNIT )
226+ dom_info_dict ['rx6power' ] = strip_unit_and_beautify (dom_info_dict ['rx6power' ], POWER_UNIT )
227+ dom_info_dict ['rx7power' ] = strip_unit_and_beautify (dom_info_dict ['rx7power' ], POWER_UNIT )
228+ dom_info_dict ['rx8power' ] = strip_unit_and_beautify (dom_info_dict ['rx8power' ], POWER_UNIT )
229+ dom_info_dict ['tx5bias' ] = strip_unit_and_beautify (dom_info_dict ['tx5bias' ], BIAS_UNIT )
230+ dom_info_dict ['tx6bias' ] = strip_unit_and_beautify (dom_info_dict ['tx6bias' ], BIAS_UNIT )
231+ dom_info_dict ['tx7bias' ] = strip_unit_and_beautify (dom_info_dict ['tx7bias' ], BIAS_UNIT )
232+ dom_info_dict ['tx8bias' ] = strip_unit_and_beautify (dom_info_dict ['tx8bias' ], BIAS_UNIT )
233+ dom_info_dict ['tx5power' ] = strip_unit_and_beautify (dom_info_dict ['tx5power' ], POWER_UNIT )
234+ dom_info_dict ['tx6power' ] = strip_unit_and_beautify (dom_info_dict ['tx6power' ], POWER_UNIT )
235+ dom_info_dict ['tx7power' ] = strip_unit_and_beautify (dom_info_dict ['tx7power' ], POWER_UNIT )
236+ dom_info_dict ['tx8power' ] = strip_unit_and_beautify (dom_info_dict ['tx8power' ], POWER_UNIT )
224237
225238
226239def beautify_dom_threshold_info_dict (dom_info_dict ):
@@ -399,7 +412,7 @@ def post_port_dom_info_to_db(logical_port_name, table, stop_event=threading.Even
399412 try :
400413 dom_info_dict = _wrapper_get_transceiver_dom_info (physical_port )
401414 if dom_info_dict is not None :
402- beautify_dom_info_dict (dom_info_dict )
415+ beautify_dom_info_dict (dom_info_dict , physical_port )
403416 if _wrapper_get_sfp_type (physical_port ) == 'QSFP_DD' :
404417 fvs = swsscommon .FieldValuePairs (
405418 [('temperature' , dom_info_dict ['temperature' ]),
0 commit comments