Przeglądaj źródła

Allow updating transfers in `UNEXECUTED` status

Remove the transfer deployability check from `update_transfer` so that
transfers that have not been executed yet (UNEXECUTED status) can still
be updated.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu 6 dni temu
rodzic
commit
3c05504ffe

+ 0 - 1
coriolis/conductor/rpc/server.py

@@ -3525,7 +3525,6 @@ class ConductorServerEndpoint(object):
             self._check_minion_pools_for_action(ctxt, dummy)
 
         self._check_transfer_running_executions(ctxt, transfer)
-        self._check_transfer_deploy_ability(ctxt, transfer, force=True)
         if updated_properties.get('user_scripts'):
             transfer.user_scripts = updated_properties['user_scripts']
         execution = models.TasksExecution()

+ 0 - 8
coriolis/tests/conductor/rpc/test_server.py

@@ -4985,8 +4985,6 @@ class ConductorServerEndpointTestCase(test_base.CoriolisBaseTestCase):
     @mock.patch.object(server.ConductorServerEndpoint, "_create_task")
     @mock.patch.object(utils, "sanitize_task_info")
     @mock.patch.object(models, "TasksExecution")
-    @mock.patch.object(server.ConductorServerEndpoint,
-                       "_check_transfer_deploy_ability")
     @mock.patch.object(server.ConductorServerEndpoint,
                        "_check_transfer_running_executions")
     @mock.patch.object(server.ConductorServerEndpoint,
@@ -5001,7 +4999,6 @@ class ConductorServerEndpointTestCase(test_base.CoriolisBaseTestCase):
         mock_transfer,
         mock_check_minion_pools_for_action,
         mock_check_transfer_running_executions,
-        mock_check_transfer_deploy_ability,
         mock_TasksExecution,
         mock_sanitize_task_info,
         mock_create_task,
@@ -5044,11 +5041,6 @@ class ConductorServerEndpointTestCase(test_base.CoriolisBaseTestCase):
             mock.sentinel.context,
             mock_get_transfer.return_value,
         )
-        mock_check_transfer_deploy_ability.assert_called_once_with(
-            mock.sentinel.context,
-            mock_get_transfer.return_value,
-            force=True,
-        )
         self.assertEqual(
             execution.action,
             mock_get_transfer.return_value