@@ -1400,12 +1400,12 @@ def test_CmisManagerTask_task_run_stop(self, mock_chassis):
1400
1400
cmis_manager .join ()
1401
1401
assert not cmis_manager .is_alive ()
1402
1402
1403
- def test_CmisManagerTask_reset_app_code_and_reinit_all_lanes (self ):
1403
+ def test_CmisManagerTask_decommission_all_datapaths (self ):
1404
1404
mock_xcvr_api = MagicMock ()
1405
1405
port_mapping = PortMapping ()
1406
1406
stop_event = threading .Event ()
1407
1407
task = CmisManagerTask (DEFAULT_NAMESPACE , port_mapping , stop_event )
1408
- task .reset_app_code_and_reinit_all_lanes (mock_xcvr_api )
1408
+ assert task .decommission_all_datapaths (mock_xcvr_api ) == True
1409
1409
1410
1410
assert mock_xcvr_api .set_application .call_count == 1
1411
1411
assert mock_xcvr_api .set_datapath_deinit .call_count == 1
@@ -1415,15 +1415,16 @@ def test_CmisManagerTask_reset_app_code_and_reinit_all_lanes(self):
1415
1415
(2 , {0 : 1 , 1 : 1 , 2 : 1 , 3 : 1 , 4 : 2 , 5 : 2 , 6 : 2 , 7 : 2 }),
1416
1416
(0 , {0 : 1 , 1 : 1 , 2 : 1 , 3 : 1 },)
1417
1417
])
1418
- def test_CmisManagerTask_is_cmis_app_code_reset_required (self , app_new , lane_appl_code ):
1418
+ def test_CmisManagerTask_is_appl_reconfigure_required (self , app_new , lane_appl_code ):
1419
1419
mock_xcvr_api = MagicMock ()
1420
1420
def get_application (lane ):
1421
1421
return lane_appl_code .get (lane , 0 )
1422
1422
mock_xcvr_api .get_application = MagicMock (side_effect = get_application )
1423
1423
port_mapping = PortMapping ()
1424
1424
stop_event = threading .Event ()
1425
1425
task = CmisManagerTask (DEFAULT_NAMESPACE , port_mapping , stop_event )
1426
- task .is_cmis_app_code_reset_required (mock_xcvr_api , app_new )
1426
+ mock_xcvr_api .decommission_all_datapaths = MagicMock (return_value = True )
1427
+ assert task .is_appl_reconfigure_required (mock_xcvr_api , app_new ) == True
1427
1428
1428
1429
DEFAULT_DP_STATE = {
1429
1430
'DP1State' : 'DataPathActivated' ,
0 commit comments