Skip to content

Commit

Permalink
Fix bug where transceiver info is missing after port breakout change (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
talber-nvidia authored Jan 5, 2023
1 parent e119b69 commit 879d630
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sonic-xcvrd/tests/test_xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ def test_SfpStateUpdateTask_handle_port_change_event(self, mock_update_status_hw
retry_eeprom_set = set()
task = SfpStateUpdateTask(DEFAULT_NAMESPACE, port_mapping, retry_eeprom_set)
task.xcvr_table_helper = XcvrTableHelper(DEFAULT_NAMESPACE)
task.xcvr_table_helper.get_status_tbl = mock_table_helper.get_status_tbl
task.xcvr_table_helper.get_intf_tbl = mock_table_helper.get_intf_tbl
task.xcvr_table_helper.get_dom_tbl = mock_table_helper.get_dom_tbl
port_change_event = PortChangeEvent('Ethernet0', 1, 0, PortChangeEvent.PORT_ADD)
wait_time = 5
while wait_time > 0:
Expand Down
1 change: 1 addition & 0 deletions sonic-xcvrd/xcvrd/xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,7 @@ def on_port_config_change(self , port_change_event):
self.port_mapping.handle_port_change_event(port_change_event)
elif port_change_event.event_type == port_mapping.PortChangeEvent.PORT_ADD:
self.port_mapping.handle_port_change_event(port_change_event)
self.on_add_logical_port(port_change_event)

def on_remove_logical_port(self, port_change_event):
"""Called when a logical port is removed from CONFIG_DB.
Expand Down

0 comments on commit 879d630

Please sign in to comment.