-
Notifications
You must be signed in to change notification settings - Fork 177
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
code fix for copper cable modules with flat memory #235
Conversation
…rd and sonic-utilities repo
This pull request introduces 1 alert when merging 145d6cc into 07e75bc - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 8a4cb6c into 07e75bc - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging f877036 into 07e75bc - view on LGTM.com new alerts:
|
@qinchuanares the expected return type for get_rx_los() should return list because sonic-mgmt test expects it to be of list type. Please fix other APIs as well. |
changed output from dictionary to list
I also changed get_transceiver_bulk_status() and get_transceiver_status() accordingly to adpat to the changes in the aforementioned functions. |
@qinchuanares could you resolve few conflicts? |
Description Set PSU status default to True Add PSU index to PsuStatus to help print the log with PSU id Motivation and Context Issue flow: 1. PSU is in bad state (e.g. PSU is not present, PSU is powered off, PSU overheat and so on) psud startup 2. There is no warning logs in syslog 3. This PR is aimed to fix the issue How Has This Been Tested? 1. Manual test 2. Adjusted unit test
This PR aims to fix issues on copper cable modules with flat memory
Description
Copper cable modules only have flat memory. Some APIs in soic_xcvr\api\public\cmis.py do not handle flat memory gracefully and raise errors. This PR aims to fix those issues and deal with flat memory without errors.
Motivation and Context
See descrition
How Has This Been Tested?
test_cmis.py cover the flat memory case
Additional Information (Optional)
Example CLI output:
root@sonic:~# sfputil show eeprom -d -p Ethernet16
WARNING: api_use_sfpoptoe attr type changed: old <class 'bool'>, new <class 'str'>
Ethernet16: SFP EEPROM detected
Application Advertisement: N/A
Connector: MPO 1x12
Encoding: N/A
Extended Identifier: Power Class 6 (12.0W Max)
Extended RateSelect Compliance: N/A
Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
Length Cable Assembly(m): 0.0
Nominal Bit Rate(100Mbs): 0
Specification compliance: Single Mode Fiber (SMF)
Vendor Date Code(YYYY-MM-DD Lot): 2021-05-24
Vendor Name: MOLEX
Vendor OUI: 00-09-3a
Vendor PN: 1064281000
Vendor Rev: 1.1
Vendor SN: G21211B3113
ChannelMonitorValues:
RX1Power: 0.0001dBm
RX2Power: 0.0001dBm
RX3Power: 0.0001dBm
RX4Power: 0.0001dBm
RX5Power: 0.0dBm
RX6Power: 0.0dBm
RX7Power: 0.0dBm
RX8Power: 0.0dBm
TX1Bias: 0.0mA
TX1Power: 0.0001dBm
TX2Bias: 0.0mA
TX2Power: 0.0001dBm
TX3Bias: 0.0mA
TX3Power: 0.0001dBm
TX4Bias: 0.0mA
TX4Power: 0.0001dBm
TX5Bias: 0.0mA
TX5Power: 0.0dBm
TX6Bias: 0.0mA
TX6Power: 0.0dBm
TX7Bias: 0.0mA
TX7Power: 0.0dBm
TX8Bias: 0.0mA
TX8Power: 0.0dBm
ChannelThresholdValues:
RxPowerHighAlarm : 5.0dBm
RxPowerHighWarning: 4.5dBm
RxPowerLowAlarm : -8.901dBm
RxPowerLowWarning : -6.899dBm
TxBiasHighAlarm : 95.0mA
TxBiasHighWarning : 88.0mA
TxBiasLowAlarm : 8.0mA
TxBiasLowWarning : 10.0mA
TxPowerHighAlarm : 5.0dBm
TxPowerHighWarning: 4.5dBm
TxPowerLowAlarm : -3.401dBm
TxPowerLowWarning : -2.901dBm
ModuleMonitorValues:
Temperature: 21.004C
Vcc: 3.377Volts
ModuleThresholdValues:
TempHighAlarm : 75.0C
TempHighWarning: 72.0C
TempLowAlarm : -5.0C
TempLowWarning : -2.0C
VccHighAlarm : 3.51Volts
VccHighWarning : 3.495Volts
VccLowAlarm : 3.1Volts
VccLowWarning : 3.115Volts
Example API output:
get_transceiver_info
{'type': 'QSFP-DD Double Density 8X Pluggable Transceiver'
'type_abbrv_name': 'QSFP-DD'
'hardware_rev': '1.1'
'serial': 'G21211B3113 '
'manufacturer': 'MOLEX '
'model': '1064281000 '
'connector': 'MPO 1x12'
'encoding': 'N/A'
'ext_identifier': 'Power Class 6 (12.0W Max)'
'ext_rateselect_compliance': 'N/A'
'cable_type': 'Length Cable Assembly(m)'
'cable_length': 0.0
'nominal_bit_rate': 0
'specification_compliance': 'Single Mode Fiber (SMF)'
'vendor_date': '2021-05-24 '
'vendor_oui': '00-09-3a'
'application_advertisement': 'N/A'
'host_electrical_interface': '400GAUI-8 C2M (Annex 120E)'
'media_interface_code': '400GBASE-DR4 (Cl 124)'
'host_lane_count': 8
'media_lane_count': 4
'host_lane_assignment_option': 1
'media_lane_assignment_option': 1
'active_apsel_hostlane1': 2
'active_apsel_hostlane2': 2
'active_apsel_hostlane3': 2
'active_apsel_hostlane4': 2
'active_apsel_hostlane5': 2
'active_apsel_hostlane6': 2
'active_apsel_hostlane7': 2
'active_apsel_hostlane8': 2
'media_interface_technology': '1310 nm DFB'
'vendor_rev': '11'
'cmis_rev': '4.0'
'active_firmware': '3.1'
'inactive_firmware': '3.1'}
get_transceiver_bulk_status
{'rx_los': False
'tx_fault': 'N/A'
'tx_disabled_channel': 0
'temperature': 20.926
'voltage': 3.375
'tx1disable': False
'tx1bias': 0.0
'rx1power': -40.0
'tx1power': -40.0
'tx2disable': False
'tx2bias': 0.0
'rx2power': -40.0
'tx2power': -40.0
'tx3disable': False
'tx3bias': 0.0
'rx3power': -40.0
'tx3power': -40.0
'tx4disable': False
'tx4bias': 0.0
'rx4power': -40.0
'tx4power': -40.0
'tx5disable': False
'tx5bias': 0.0
'rx5power': -inf
'tx5power': -inf
'tx6disable': False
'tx6bias': 0.0
'rx6power': -inf
'tx6power': -inf
'tx7disable': False
'tx7bias': 0.0
'rx7power': -inf
'tx7power': -inf
'tx8disable': False
'tx8bias': 0.0
'rx8power': -inf
'tx8power': -inf
'laser_temperature': 0.0
'prefec_ber': 0.0}
get_transceiver_threshold_info
{'temphighalarm': 75.0
'templowalarm': -5.0
'temphighwarning': 72.0
'templowwarning': -2.0
'vcchighalarm': 3.51
'vcclowalarm': 3.1
'vcchighwarning': 3.495
'vcclowwarning': 3.115
'rxpowerhighalarm': 5.0
'rxpowerlowalarm': -8.901
'rxpowerhighwarning': 4.5
'rxpowerlowwarning': -6.899
'txpowerhighalarm': 5.0
'txpowerlowalarm': -3.401
'txpowerhighwarning': 4.5
'txpowerlowwarning': -2.901
'txbiashighalarm': 380.0
'txbiaslowalarm': 32.0
'txbiashighwarning': 352.0
'txbiaslowwarning': 40.0
'lasertemphighalarm': 0.0
'lasertemplowalarm': 0.0
'lasertemphighwarning': 0.0
'lasertemplowwarning': 0.0
'prefecberhighalarm': 7.699999999999999e-20
'prefecberlowalarm': 1.868e-12
'prefecberhighwarning': 1.368e-13
'prefecberlowwarning': 3.2e-19}
get_transceiver_status
{'module_state': 'ModuleLowPwr'
'module_fault_cause': 'No Fault detected'
'datapath_firmware_fault': False
'module_firmware_fault': False
'module_state_changed': False
'temphighalarm_flag': False
'templowalarm_flag': False
'temphighwarning_flag': False
'templowwarning_flag': False
'vcchighalarm_flag': False
'vcclowalarm_flag': False
'vcchighwarning_flag': False
'vcclowwarning_flag': False
'lasertemphighalarm_flag': False
'lasertemplowalarm_flag': False
'lasertemphighwarning_flag': False
'lasertemplowwarning_flag': False
'DP1State': 'DataPathDeactivated'
'DP2State': 'DataPathDeactivated'
'DP3State': 'DataPathDeactivated'
'DP4State': 'DataPathDeactivated'
'DP5State': 'DataPathDeactivated'
'DP6State': 'DataPathDeactivated'
'DP7State': 'DataPathDeactivated'
'DP8State': 'DataPathDeactivated'
'txoutput_status1': False
'txoutput_status2': False
'txoutput_status3': False
'txoutput_status4': False
'txoutput_status5': False
'txoutput_status6': False
'txoutput_status7': False
'txoutput_status8': False
'rxoutput_status_hostlane1': False
'rxoutput_status_hostlane2': False
'rxoutput_status_hostlane3': False
'rxoutput_status_hostlane4': False
'rxoutput_status_hostlane5': False
'rxoutput_status_hostlane6': False
'rxoutput_status_hostlane7': False
'rxoutput_status_hostlane8': False
'txfault1': 'N/A'
'txfault2': 'N/A'
'txfault3': 'N/A'
'txfault4': 'N/A'
'txfault5': 'N/A'
'txfault6': 'N/A'
'txfault7': 'N/A'
'txfault8': 'N/A'
'txlos_hostlane1': False
'txlos_hostlane2': False
'txlos_hostlane3': False
'txlos_hostlane4': False
'txlos_hostlane5': False
'txlos_hostlane6': False
'txlos_hostlane7': False
'txlos_hostlane8': False
'txcdrlol_hostlane1': False
'txcdrlol_hostlane2': False
'txcdrlol_hostlane3': False
'txcdrlol_hostlane4': False
'txcdrlol_hostlane5': False
'txcdrlol_hostlane6': False
'txcdrlol_hostlane7': False
'txcdrlol_hostlane8': False
'rxlos1': False
'rxlos2': False
'rxlos3': False
'rxlos4': False
'rxlos5': False
'rxlos6': False
'rxlos7': False
'rxlos8': False
'rxcdrlol1': False
'rxcdrlol2': False
'rxcdrlol3': False
'rxcdrlol4': False
'rxcdrlol5': False
'rxcdrlol6': False
'rxcdrlol7': False
'rxcdrlol8': False
'config_state_hostlane1': 'ConfigUndefined'
'config_state_hostlane2': 'ConfigUndefined'
'config_state_hostlane3': 'ConfigUndefined'
'config_state_hostlane4': 'ConfigUndefined'
'config_state_hostlane5': 'ConfigUndefined'
'config_state_hostlane6': 'ConfigUndefined'
'config_state_hostlane7': 'ConfigUndefined'
'config_state_hostlane8': 'ConfigUndefined'
'dpinit_pending_hostlane1': False
'dpinit_pending_hostlane2': False
'dpinit_pending_hostlane3': False
'dpinit_pending_hostlane4': False
'dpinit_pending_hostlane5': False
'dpinit_pending_hostlane6': False
'dpinit_pending_hostlane7': False
'dpinit_pending_hostlane8': False
'txpowerhighalarm_flag1': False
'txpowerlowalarm_flag1': False
'txpowerhighwarning_flag1': False
'txpowerlowwarning_flag1': False
'txpowerhighalarm_flag2': False
'txpowerlowalarm_flag2': False
'txpowerhighwarning_flag2': False
'txpowerlowwarning_flag2': False
'txpowerhighalarm_flag3': False
'txpowerlowalarm_flag3': False
'txpowerhighwarning_flag3': False
'txpowerlowwarning_flag3': False
'txpowerhighalarm_flag4': False
'txpowerlowalarm_flag4': False
'txpowerhighwarning_flag4': False
'txpowerlowwarning_flag4': False
'txpowerhighalarm_flag5': False
'txpowerlowalarm_flag5': False
'txpowerhighwarning_flag5': False
'txpowerlowwarning_flag5': False
'txpowerhighalarm_flag6': False
'txpowerlowalarm_flag6': False
'txpowerhighwarning_flag6': False
'txpowerlowwarning_flag6': False
'txpowerhighalarm_flag7': False
'txpowerlowalarm_flag7': False
'txpowerhighwarning_flag7': False
'txpowerlowwarning_flag7': False
'txpowerhighalarm_flag8': False
'txpowerlowalarm_flag8': False
'txpowerhighwarning_flag8': False
'txpowerlowwarning_flag8': False
'rxpowerhighalarm_flag1': False
'rxpowerlowalarm_flag1': False
'rxpowerhighwarning_flag1': False
'rxpowerlowwarning_flag1': False
'rxpowerhighalarm_flag2': False
'rxpowerlowalarm_flag2': False
'rxpowerhighwarning_flag2': False
'rxpowerlowwarning_flag2': False
'rxpowerhighalarm_flag3': False
'rxpowerlowalarm_flag3': False
'rxpowerhighwarning_flag3': False
'rxpowerlowwarning_flag3': False
'rxpowerhighalarm_flag4': False
'rxpowerlowalarm_flag4': False
'rxpowerhighwarning_flag4': False
'rxpowerlowwarning_flag4': False
'rxpowerhighalarm_flag5': False
'rxpowerlowalarm_flag5': False
'rxpowerhighwarning_flag5': False
'rxpowerlowwarning_flag5': False
'rxpowerhighalarm_flag6': False
'rxpowerlowalarm_flag6': False
'rxpowerhighwarning_flag6': False
'rxpowerlowwarning_flag6': False
'rxpowerhighalarm_flag7': False
'rxpowerlowalarm_flag7': False
'rxpowerhighwarning_flag7': False
'rxpowerlowwarning_flag7': False
'rxpowerhighalarm_flag8': False
'rxpowerlowalarm_flag8': False
'rxpowerhighwarning_flag8': False
'rxpowerlowwarning_flag8': False
'txbiashighalarm_flag1': False
'txbiaslowalarm_flag1': False
'txbiashighwarning_flag1': False
'txbiaslowwarning_flag1': False
'txbiashighalarm_flag2': False
'txbiaslowalarm_flag2': False
'txbiashighwarning_flag2': False
'txbiaslowwarning_flag2': False
'txbiashighalarm_flag3': False
'txbiaslowalarm_flag3': False
'txbiashighwarning_flag3': False
'txbiaslowwarning_flag3': False
'txbiashighalarm_flag4': False
'txbiaslowalarm_flag4': False
'txbiashighwarning_flag4': False
'txbiaslowwarning_flag4': False
'txbiashighalarm_flag5': False
'txbiaslowalarm_flag5': False
'txbiashighwarning_flag5': False
'txbiaslowwarning_flag5': False
'txbiashighalarm_flag6': False
'txbiaslowalarm_flag6': False
'txbiashighwarning_flag6': False
'txbiaslowwarning_flag6': False
'txbiashighalarm_flag7': False
'txbiaslowalarm_flag7': False
'txbiashighwarning_flag7': False
'txbiaslowwarning_flag7': False
'txbiashighalarm_flag8': False
'txbiaslowalarm_flag8': False
'txbiashighwarning_flag8': False
'txbiaslowwarning_flag8': False
'prefecberhighalarm_flag': False
'prefecberlowalarm_flag': True
'prefecberhighwarning_flag': False
'prefecberlowwarning_flag': False}
get_transceiver_loopback
{'simultaneous_host_media_loopback_supported': True
'per_lane_media_loopback_supported': True
'per_lane_host_loopback_supported': True
'host_side_input_loopback_supported': True
'host_side_output_loopback_supported': True
'media_side_input_loopback_supported': True
'media_side_output_loopback_supported': True
'media_output_loopback': False
'media_input_loopback': False
'host_output_loopback_lane1': False
'host_output_loopback_lane2': False
'host_output_loopback_lane3': False
'host_output_loopback_lane4': False
'host_output_loopback_lane5': False
'host_output_loopback_lane6': False
'host_output_loopback_lane7': False
'host_output_loopback_lane8': False
'host_input_loopback_lane1': False
'host_input_loopback_lane2': False
'host_input_loopback_lane3': False
'host_input_loopback_lane4': False
'host_input_loopback_lane5': False
'host_input_loopback_lane6': False
'host_input_loopback_lane7': False
'host_input_loopback_lane8': False}