Selaa lähdekoodia

Refactor conductor layer

Daniel Vincze 1 vuosi sitten
vanhempi
sitoutus
cfff2f199d
48 muutettua tiedostoa jossa 1275 lisäystä ja 1331 poistoa
  1. 1 1
      coriolis/api/v1/replica_schedules.py
  2. 3 3
      coriolis/api/v1/replicas.py
  3. 2 2
      coriolis/cmd/replica_cron.py
  4. 78 77
      coriolis/conductor/rpc/client.py
  5. 297 309
      coriolis/conductor/rpc/server.py
  6. 44 71
      coriolis/constants.py
  7. 1 1
      coriolis/db/sqlalchemy/models.py
  8. 1 1
      coriolis/deployments/api.py
  9. 2 2
      coriolis/diagnostics/api.py
  10. 4 4
      coriolis/exception.py
  11. 2 2
      coriolis/minion_manager/rpc/client.py
  12. 8 7
      coriolis/minion_manager/rpc/server.py
  13. 6 6
      coriolis/minion_manager/rpc/tasks.py
  14. 7 7
      coriolis/providers/factory.py
  15. 5 5
      coriolis/replica_tasks_executions/api.py
  16. 6 6
      coriolis/replicas/api.py
  17. 3 3
      coriolis/scheduler/scheduler_utils.py
  18. 16 40
      coriolis/tasks/factory.py
  19. 4 4
      coriolis/tasks/osmorphing_tasks.py
  20. 42 42
      coriolis/tasks/replica_tasks.py
  21. 1 1
      coriolis/tests/api/v1/test_replica_schedules.py
  22. 3 3
      coriolis/tests/cmd/test_replica_cron.py
  23. 0 182
      coriolis/tests/conductor/rpc/data/deploy_replica_instance_config.yml
  24. 182 0
      coriolis/tests/conductor/rpc/data/deploy_transfer_instance_config.yml
  25. 65 65
      coriolis/tests/conductor/rpc/data/execute_transfer_tasks_config.yml
  26. 6 6
      coriolis/tests/conductor/rpc/data/update_transfer_config.yml
  27. 63 62
      coriolis/tests/conductor/rpc/test_client.py
  28. 218 218
      coriolis/tests/conductor/rpc/test_server.py
  29. 10 10
      coriolis/tests/db/test_api.py
  30. 4 2
      coriolis/tests/minion_manager/rpc/test_client.py
  31. 13 13
      coriolis/tests/minion_manager/rpc/test_tasks.py
  32. 0 69
      coriolis/tests/replica_cron/test_api.py
  33. 21 19
      coriolis/tests/replica_tasks_executions/test_api.py
  34. 23 23
      coriolis/tests/replicas/test_api.py
  35. 2 2
      coriolis/tests/tasks/test_osmorphing_tasks.py
  36. 31 31
      coriolis/tests/tasks/test_replica_tasks.py
  37. 0 0
      coriolis/tests/transfer_cron/__init__.py
  38. 0 0
      coriolis/tests/transfer_cron/rpc/__init__.py
  39. 2 2
      coriolis/tests/transfer_cron/rpc/test_client.py
  40. 13 13
      coriolis/tests/transfer_cron/rpc/test_server.py
  41. 69 0
      coriolis/tests/transfer_cron/test_api.py
  42. 3 3
      coriolis/tests/worker/rpc/test_server.py
  43. 0 0
      coriolis/transfer_cron/__init__.py
  44. 5 5
      coriolis/transfer_cron/api.py
  45. 0 0
      coriolis/transfer_cron/rpc/__init__.py
  46. 3 3
      coriolis/transfer_cron/rpc/client.py
  47. 3 3
      coriolis/transfer_cron/rpc/server.py
  48. 3 3
      coriolis/worker/rpc/server.py

+ 1 - 1
coriolis/api/v1/replica_schedules.py

@@ -5,8 +5,8 @@ from coriolis.api.v1.views import replica_schedule_view
 from coriolis.api import wsgi as api_wsgi
 from coriolis import exception
 from coriolis.policies import replica_schedules as schedules_policies
-from coriolis.replica_cron import api
 from coriolis import schemas
+from coriolis.transfer_cron import api
 
 import jsonschema
 from oslo_log import log as logging

+ 3 - 3
coriolis/api/v1/replicas.py

@@ -27,8 +27,8 @@ CONF.register_opts(REPLICA_API_OPTS, 'api')
 LOG = logging.getLogger(__name__)
 
 SUPPORTED_REPLICA_SCENARIOS = [
-    constants.REPLICA_SCENARIO_REPLICA,
-    constants.REPLICA_SCENARIO_LIVE_MIGRATION]
+    constants.TRANSFER_SCENARIO_REPLICA,
+    constants.TRANSFER_SCENARIO_LIVE_MIGRATION]
 
 
 class ReplicaController(api_wsgi.Controller):
@@ -79,7 +79,7 @@ class ReplicaController(api_wsgi.Controller):
                                 f"'{scenario}', must be one of: "
                                 f"{SUPPORTED_REPLICA_SCENARIOS}")
         else:
-            scenario = constants.REPLICA_SCENARIO_REPLICA
+            scenario = constants.TRANSFER_SCENARIO_REPLICA
             LOG.warn(
                 "No Replica 'scenario' field set in Replica body, "
                 f"defaulting to: '{scenario}'")

+ 2 - 2
coriolis/cmd/replica_cron.py

@@ -6,8 +6,8 @@ import sys
 from oslo_config import cfg
 
 from coriolis import constants
-from coriolis.replica_cron.rpc import server as rpc_server
 from coriolis import service
+from coriolis.transfer_cron.rpc import server as rpc_server
 from coriolis import utils
 
 CONF = cfg.CONF
@@ -19,7 +19,7 @@ def main():
     utils.setup_logging()
 
     server = service.MessagingService(
-        constants.REPLICA_CRON_MAIN_MESSAGING_TOPIC,
+        constants.TRANSFER_CRON_MAIN_MESSAGING_TOPIC,
         [rpc_server.ReplicaCronServerEndpoint()],
         rpc_server.VERSION, worker_count=1)
     launcher = service.service.launch(

+ 78 - 77
coriolis/conductor/rpc/client.py

@@ -128,49 +128,49 @@ class ConductorClient(rpc.BaseRPCClient):
             platform_name=platform_name,
             provider_type=provider_type)
 
-    def execute_replica_tasks(self, ctxt, replica_id,
-                              shutdown_instances=False):
+    def execute_transfer_tasks(self, ctxt, transfer_id,
+                               shutdown_instances=False):
         return self._call(
-            ctxt, 'execute_replica_tasks', replica_id=replica_id,
+            ctxt, 'execute_transfer_tasks', transfer_id=transfer_id,
             shutdown_instances=shutdown_instances)
 
-    def get_replica_tasks_executions(self, ctxt, replica_id,
-                                     include_tasks=False):
+    def get_transfer_tasks_executions(self, ctxt, transfer_id,
+                                      include_tasks=False):
         return self._call(
-            ctxt, 'get_replica_tasks_executions',
-            replica_id=replica_id,
+            ctxt, 'get_transfer_tasks_executions',
+            transfer_id=transfer_id,
             include_tasks=include_tasks)
 
-    def get_replica_tasks_execution(self, ctxt, replica_id, execution_id,
-                                    include_task_info=False):
+    def get_transfer_tasks_execution(self, ctxt, transfer_id, execution_id,
+                                     include_task_info=False):
         return self._call(
-            ctxt, 'get_replica_tasks_execution', replica_id=replica_id,
+            ctxt, 'get_transfer_tasks_execution', transfer_id=transfer_id,
             execution_id=execution_id, include_task_info=include_task_info)
 
-    def delete_replica_tasks_execution(self, ctxt, replica_id, execution_id):
+    def delete_transfer_tasks_execution(self, ctxt, transfer_id, execution_id):
         return self._call(
-            ctxt, 'delete_replica_tasks_execution', replica_id=replica_id,
+            ctxt, 'delete_transfer_tasks_execution', transfer_id=transfer_id,
             execution_id=execution_id)
 
-    def cancel_replica_tasks_execution(self, ctxt, replica_id, execution_id,
-                                       force):
+    def cancel_transfer_tasks_execution(self, ctxt, transfer_id, execution_id,
+                                        force):
         return self._call(
-            ctxt, 'cancel_replica_tasks_execution', replica_id=replica_id,
+            ctxt, 'cancel_transfer_tasks_execution', transfer_id=transfer_id,
             execution_id=execution_id, force=force)
 
-    def create_instances_replica(self, ctxt,
-                                 replica_scenario,
-                                 origin_endpoint_id,
-                                 destination_endpoint_id,
-                                 origin_minion_pool_id,
-                                 destination_minion_pool_id,
-                                 instance_osmorphing_minion_pool_mappings,
-                                 source_environment, destination_environment,
-                                 instances, network_map, storage_mappings,
-                                 notes=None, user_scripts=None):
-        return self._call(
-            ctxt, 'create_instances_replica',
-            replica_scenario=replica_scenario,
+    def create_instances_transfer(self, ctxt,
+                                  transfer_scenario,
+                                  origin_endpoint_id,
+                                  destination_endpoint_id,
+                                  origin_minion_pool_id,
+                                  destination_minion_pool_id,
+                                  instance_osmorphing_minion_pool_mappings,
+                                  source_environment, destination_environment,
+                                  instances, network_map, storage_mappings,
+                                  notes=None, user_scripts=None):
+        return self._call(
+            ctxt, 'create_instances_transfer',
+            transfer_scenario=transfer_scenario,
             origin_endpoint_id=origin_endpoint_id,
             destination_endpoint_id=destination_endpoint_id,
             origin_minion_pool_id=origin_minion_pool_id,
@@ -185,25 +185,25 @@ class ConductorClient(rpc.BaseRPCClient):
             source_environment=source_environment,
             user_scripts=user_scripts)
 
-    def get_replicas(self, ctxt, include_tasks_executions=False,
-                     include_task_info=False):
+    def get_transfers(self, ctxt, include_tasks_executions=False,
+                      include_task_info=False):
         return self._call(
-            ctxt, 'get_replicas',
+            ctxt, 'get_transfers',
             include_tasks_executions=include_tasks_executions,
             include_task_info=include_task_info)
 
-    def get_replica(self, ctxt, replica_id, include_task_info=False):
+    def get_transfer(self, ctxt, transfer_id, include_task_info=False):
         return self._call(
-            ctxt, 'get_replica', replica_id=replica_id,
+            ctxt, 'get_transfer', transfer_id=transfer_id,
             include_task_info=include_task_info)
 
-    def delete_replica(self, ctxt, replica_id):
+    def delete_transfer(self, ctxt, transfer_id):
         self._call(
-            ctxt, 'delete_replica', replica_id=replica_id)
+            ctxt, 'delete_transfer', transfer_id=transfer_id)
 
-    def delete_replica_disks(self, ctxt, replica_id):
+    def delete_transfer_disks(self, ctxt, transfer_id):
         return self._call(
-            ctxt, 'delete_replica_disks', replica_id=replica_id)
+            ctxt, 'delete_transfer_disks', transfer_id=transfer_id)
 
     def get_deployments(self, ctxt, include_tasks=False,
                         include_task_info=False):
@@ -216,12 +216,12 @@ class ConductorClient(rpc.BaseRPCClient):
             ctxt, 'get_deployment', deployment_id=deployment_id,
             include_task_info=include_task_info)
 
-    def deploy_replica_instances(
-            self, ctxt, replica_id,
+    def deploy_transfer_instances(
+            self, ctxt, transfer_id,
             instance_osmorphing_minion_pool_mappings=None, clone_disks=False,
             force=False, skip_os_morphing=False, user_scripts=None):
         return self._call(
-            ctxt, 'deploy_replica_instances', replica_id=replica_id,
+            ctxt, 'deploy_transfer_instances', transfer_id=transfer_id,
             instance_osmorphing_minion_pool_mappings=(
                 instance_osmorphing_minion_pool_mappings),
             clone_disks=clone_disks, force=force,
@@ -283,48 +283,48 @@ class ConductorClient(rpc.BaseRPCClient):
             new_current_step=new_current_step,
             new_total_steps=new_total_steps, new_message=new_message)
 
-    def create_replica_schedule(self, ctxt, replica_id,
-                                schedule, enabled, exp_date,
-                                shutdown_instance):
+    def create_transfer_schedule(self, ctxt, transfer_id,
+                                 schedule, enabled, exp_date,
+                                 shutdown_instance):
         return self._call(
-            ctxt, 'create_replica_schedule',
-            replica_id=replica_id,
+            ctxt, 'create_transfer_schedule',
+            transfer_id=transfer_id,
             schedule=schedule,
             enabled=enabled,
             exp_date=exp_date,
             shutdown_instance=shutdown_instance)
 
-    def update_replica_schedule(self, ctxt, replica_id, schedule_id,
-                                updated_values):
+    def update_transfer_schedule(self, ctxt, transfer_id, schedule_id,
+                                 updated_values):
         return self._call(
-            ctxt, 'update_replica_schedule',
-            replica_id=replica_id,
+            ctxt, 'update_transfer_schedule',
+            transfer_id=transfer_id,
             schedule_id=schedule_id,
             updated_values=updated_values)
 
-    def delete_replica_schedule(self, ctxt, replica_id, schedule_id):
+    def delete_transfer_schedule(self, ctxt, transfer_id, schedule_id):
         return self._call(
-            ctxt, 'delete_replica_schedule',
-            replica_id=replica_id,
+            ctxt, 'delete_transfer_schedule',
+            transfer_id=transfer_id,
             schedule_id=schedule_id)
 
-    def get_replica_schedules(self, ctxt, replica_id=None, expired=True):
+    def get_transfer_schedules(self, ctxt, transfer_id=None, expired=True):
         return self._call(
-            ctxt, 'get_replica_schedules',
-            replica_id=replica_id, expired=expired)
+            ctxt, 'get_transfer_schedules',
+            transfer_id=transfer_id, expired=expired)
 
-    def get_replica_schedule(self, ctxt, replica_id,
-                             schedule_id, expired=True):
+    def get_transfer_schedule(self, ctxt, transfer_id,
+                              schedule_id, expired=True):
         return self._call(
-            ctxt, 'get_replica_schedule',
-            replica_id=replica_id,
+            ctxt, 'get_transfer_schedule',
+            transfer_id=transfer_id,
             schedule_id=schedule_id,
             expired=expired)
 
-    def update_replica(self, ctxt, replica_id, updated_properties):
+    def update_transfer(self, ctxt, transfer_id, updated_properties):
         return self._call(
-            ctxt, 'update_replica',
-            replica_id=replica_id,
+            ctxt, 'update_transfer',
+            transfer_id=transfer_id,
             updated_properties=updated_properties)
 
     def get_diagnostics(self, ctxt):
@@ -391,31 +391,32 @@ class ConductorClient(rpc.BaseRPCClient):
         return self._call(
             ctxt, 'delete_service', service_id=service_id)
 
-    def confirm_replica_minions_allocation(
-            self, ctxt, replica_id, minion_machine_allocations):
+    def confirm_transfer_minions_allocation(
+            self, ctxt, transfer_id, minion_machine_allocations):
         self._call(
-            ctxt, 'confirm_replica_minions_allocation', replica_id=replica_id,
+            ctxt, 'confirm_transfer_minions_allocation',
+            transfer_id=transfer_id,
             minion_machine_allocations=minion_machine_allocations)
 
-    def report_replica_minions_allocation_error(
-            self, ctxt, replica_id, minion_allocation_error_details):
+    def report_transfer_minions_allocation_error(
+            self, ctxt, transfer_id, minion_allocation_error_details):
         self._call(
-            ctxt, 'report_replica_minions_allocation_error',
-            replica_id=replica_id,
+            ctxt, 'report_transfer_minions_allocation_error',
+            transfer_id=transfer_id,
             minion_allocation_error_details=minion_allocation_error_details)
 
-    def confirm_migration_minions_allocation(
-            self, ctxt, migration_id, minion_machine_allocations):
+    def confirm_deployment_minions_allocation(
+            self, ctxt, deployment_id, minion_machine_allocations):
         self._call(
-            ctxt, 'confirm_migration_minions_allocation',
-            migration_id=migration_id,
+            ctxt, 'confirm_deployment_minions_allocation',
+            deployment_id=deployment_id,
             minion_machine_allocations=minion_machine_allocations)
 
-    def report_migration_minions_allocation_error(
-            self, ctxt, migration_id, minion_allocation_error_details):
+    def report_deployment_minions_allocation_error(
+            self, ctxt, deployment_id, minion_allocation_error_details):
         self._call(
-            ctxt, 'report_migration_minions_allocation_error',
-            migration_id=migration_id,
+            ctxt, 'report_deployment_minions_allocation_error',
+            deployment_id=deployment_id,
             minion_allocation_error_details=minion_allocation_error_details)
 
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 297 - 309
coriolis/conductor/rpc/server.py


+ 44 - 71
coriolis/constants.py

@@ -3,8 +3,8 @@
 
 DEFAULT_CORIOLIS_REGION_NAME = "Default Region"
 
-REPLICA_SCENARIO_REPLICA = "replica"
-REPLICA_SCENARIO_LIVE_MIGRATION = "live_migration"
+TRANSFER_SCENARIO_REPLICA = "replica"
+TRANSFER_SCENARIO_LIVE_MIGRATION = "live_migration"
 
 EXECUTION_STATUS_UNEXECUTED = "UNEXECUTED"
 EXECUTION_STATUS_RUNNING = "RUNNING"
@@ -82,62 +82,37 @@ FINALIZED_TASK_STATUSES = [
     TASK_STATUS_FAILED_TO_CANCEL
 ]
 
-TASK_TYPE_DEPLOY_MIGRATION_SOURCE_RESOURCES = (
-    "DEPLOY_MIGRATION_SOURCE_RESOURCES")
-TASK_TYPE_DEPLOY_MIGRATION_TARGET_RESOURCES = (
-    "DEPLOY_MIGRATION_TARGET_RESOURCES")
-TASK_TYPE_DELETE_MIGRATION_SOURCE_RESOURCES = (
-    "DELETE_MIGRATION_SOURCE_RESOURCES")
-TASK_TYPE_DELETE_MIGRATION_TARGET_RESOURCES = (
-    "DELETE_MIGRATION_TARGET_RESOURCES")
-TASK_TYPE_DEPLOY_INSTANCE_RESOURCES = "DEPLOY_INSTANCE_RESOURCES"
 TASK_TYPE_FINALIZE_INSTANCE_DEPLOYMENT = "FINALIZE_INSTANCE_DEPLOYMENT"
 TASK_TYPE_CLEANUP_FAILED_INSTANCE_DEPLOYMENT = (
     "CLEANUP_FAILED_INSTANCE_DEPLOYMENT")
-TASK_TYPE_CLEANUP_INSTANCE_SOURCE_STORAGE = (
-    "CLEANUP_INSTANCE_SOURCE_STORAGE")
-TASK_TYPE_CLEANUP_INSTANCE_TARGET_STORAGE = (
-    "CLEANUP_INSTANCE_TARGET_STORAGE")
-
-TASK_TYPE_CREATE_INSTANCE_DISKS = "CREATE_INSTANCE_DISKS"
 
 TASK_TYPE_DEPLOY_OS_MORPHING_RESOURCES = "DEPLOY_OS_MORPHING_RESOURCES"
 TASK_TYPE_OS_MORPHING = "OS_MORPHING"
 TASK_TYPE_DELETE_OS_MORPHING_RESOURCES = "DELETE_OS_MORPHING_RESOURCES"
 
 TASK_TYPE_GET_INSTANCE_INFO = "GET_INSTANCE_INFO"
-TASK_TYPE_DEPLOY_REPLICA_DISKS = "DEPLOY_REPLICA_DISKS"
-TASK_TYPE_DELETE_REPLICA_SOURCE_DISK_SNAPSHOTS = (
-    "DELETE_REPLICA_SOURCE_DISK_SNAPSHOTS")
-TASK_TYPE_DELETE_REPLICA_DISKS = "DELETE_REPLICA_DISKS"
+TASK_TYPE_DEPLOY_TRANSFER_DISKS = "DEPLOY_TRANSFER_DISKS"
+TASK_TYPE_DELETE_TRANSFER_SOURCE_DISK_SNAPSHOTS = (
+    "DELETE_TRANSFER_SOURCE_DISK_SNAPSHOTS")
+TASK_TYPE_DELETE_TRANSFER_DISKS = "DELETE_TRANSFER_DISKS"
 TASK_TYPE_REPLICATE_DISKS = "REPLICATE_DISKS"
-TASK_TYPE_DEPLOY_REPLICA_SOURCE_RESOURCES = "DEPLOY_REPLICA_SOURCE_RESOURCES"
-TASK_TYPE_DELETE_REPLICA_SOURCE_RESOURCES = "DELETE_REPLICA_SOURCE_RESOURCES"
-TASK_TYPE_DEPLOY_REPLICA_TARGET_RESOURCES = "DEPLOY_REPLICA_TARGET_RESOURCES"
-TASK_TYPE_DELETE_REPLICA_TARGET_RESOURCES = "DELETE_REPLICA_TARGET_RESOURCES"
+TASK_TYPE_DEPLOY_TRANSFER_SOURCE_RESOURCES = "DEPLOY_TRANSFER_SOURCE_RESOURCES"
+TASK_TYPE_DELETE_TRANSFER_SOURCE_RESOURCES = "DELETE_TRANSFER_SOURCE_RESOURCES"
+TASK_TYPE_DEPLOY_TRANSFER_TARGET_RESOURCES = "DEPLOY_TRANSFER_TARGET_RESOURCES"
+TASK_TYPE_DELETE_TRANSFER_TARGET_RESOURCES = "DELETE_TRANSFER_TARGET_RESOURCES"
 TASK_TYPE_SHUTDOWN_INSTANCE = "SHUTDOWN_INSTANCE"
-TASK_TYPE_DEPLOY_REPLICA_INSTANCE_RESOURCES = (
-    "DEPLOY_REPLICA_INSTANCE_RESOURCES")
-TASK_TYPE_FINALIZE_REPLICA_INSTANCE_DEPLOYMENT = (
-    "FINALIZE_REPLICA_INSTANCE_DEPLOYMENT")
-TASK_TYPE_CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT = (
-    "CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT")
-TASK_TYPE_CREATE_REPLICA_DISK_SNAPSHOTS = "CREATE_REPLICA_DISK_SNAPSHOTS"
-TASK_TYPE_DELETE_REPLICA_TARGET_DISK_SNAPSHOTS = (
-    "DELETE_REPLICA_TARGET_DISK_SNAPSHOTS")
-TASK_TYPE_RESTORE_REPLICA_DISK_SNAPSHOTS = "RESTORE_REPLICA_DISK_SNAPSHOTS"
+TASK_TYPE_DEPLOY_INSTANCE_RESOURCES = "DEPLOY_INSTANCE_RESOURCES"
+TASK_TYPE_CREATE_TRANSFER_DISK_SNAPSHOTS = "CREATE_TRANSFER_DISK_SNAPSHOTS"
+TASK_TYPE_DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS = (
+    "DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS")
+TASK_TYPE_RESTORE_TRANSFER_DISK_SNAPSHOTS = "RESTORE_TRANSFER_DISK_SNAPSHOTS"
 TASK_TYPE_GET_OPTIMAL_FLAVOR = "GET_OPTIMAL_FLAVOR"
-TASK_TYPE_VALIDATE_MIGRATION_SOURCE_INPUTS = (
-    "VALIDATE_MIGRATION_SOURCE_INPUTS")
-TASK_TYPE_VALIDATE_MIGRATION_DESTINATION_INPUTS = (
-    "VALIDATE_MIGRATION_DESTINATION_INPUTS")
-TASK_TYPE_VALIDATE_REPLICA_SOURCE_INPUTS = "VALIDATE_REPLICA_SOURCE_INPUTS"
-TASK_TYPE_VALIDATE_REPLICA_DESTINATION_INPUTS = (
-    "VALIDATE_REPLICA_DESTINATION_INPUTS")
-TASK_TYPE_VALIDATE_REPLICA_DEPLOYMENT_INPUTS = (
-    "VALIDATE_REPLICA_DEPLOYMENT_INPUTS")
-TASK_TYPE_UPDATE_SOURCE_REPLICA = "UPDATE_SOURCE_REPLICA"
-TASK_TYPE_UPDATE_DESTINATION_REPLICA = "UPDATE_DESTINATION_REPLICA"
+TASK_TYPE_VALIDATE_TRANSFER_SOURCE_INPUTS = "VALIDATE_TRANSFER_SOURCE_INPUTS"
+TASK_TYPE_VALIDATE_TRANSFER_DESTINATION_INPUTS = (
+    "VALIDATE_TRANSFER_DESTINATION_INPUTS")
+TASK_TYPE_VALIDATE_DEPLOYMENT_INPUTS = "VALIDATE_DEPLOYMENT_INPUTS"
+TASK_TYPE_UPDATE_SOURCE_TRANSFER = "UPDATE_SOURCE_TRANSFER"
+TASK_TYPE_UPDATE_DESTINATION_TRANSFER = "UPDATE_DESTINATION_TRANSFER"
 
 TASK_TYPE_VALIDATE_SOURCE_MINION_POOL_OPTIONS = (
     "VALIDATE_SOURCE_MINION_POOL_ENVIRONMENT_OPTIONS")
@@ -214,8 +189,8 @@ PROVIDER_PLATFORM_DESTINATION = "destination"
 
 PROVIDER_TYPE_IMPORT = 1
 PROVIDER_TYPE_EXPORT = 2
-PROVIDER_TYPE_REPLICA_IMPORT = 4
-PROVIDER_TYPE_REPLICA_EXPORT = 8
+PROVIDER_TYPE_TRANSFER_IMPORT = 4
+PROVIDER_TYPE_TRANSFER_EXPORT = 8
 PROVIDER_TYPE_ENDPOINT = 16
 PROVIDER_TYPE_ENDPOINT_INSTANCES = 32
 PROVIDER_TYPE_OS_MORPHING = 64
@@ -223,16 +198,18 @@ PROVIDER_TYPE_ENDPOINT_NETWORKS = 128
 PROVIDER_TYPE_INSTANCE_FLAVOR = 256
 PROVIDER_TYPE_DESTINATION_ENDPOINT_OPTIONS = 512
 PROVIDER_TYPE_SETUP_LIBS = 1024
-PROVIDER_TYPE_VALIDATE_MIGRATION_EXPORT = 2048
-PROVIDER_TYPE_VALIDATE_REPLICA_EXPORT = 4096
-PROVIDER_TYPE_VALIDATE_MIGRATION_IMPORT = 8192
-PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT = 16384
+PROVIDER_TYPE_VALIDATE_TRANSFER_EXPORT = 4096
+PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT = 16384
 PROVIDER_TYPE_ENDPOINT_STORAGE = 32768
-PROVIDER_TYPE_SOURCE_REPLICA_UPDATE = 65536
+PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE = 65536
 PROVIDER_TYPE_SOURCE_ENDPOINT_OPTIONS = 131072
-PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE = 262144
+PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE = 262144
 PROVIDER_TYPE_SOURCE_MINION_POOL = 524288
 PROVIDER_TYPE_DESTINATION_MINION_POOL = 1048576
+# NOTE(dvincze): These are deprecated, we should remove them,
+# and de-increment the rest
+PROVIDER_TYPE_VALIDATE_MIGRATION_EXPORT = 2048
+PROVIDER_TYPE_VALIDATE_MIGRATION_IMPORT = 8192
 
 DISK_FORMAT_VMDK = 'vmdk'
 DISK_FORMAT_RAW = 'raw'
@@ -284,14 +261,13 @@ VALID_COMPRESSION_FORMATS = [
     COMPRESSION_FORMAT_ZLIB
 ]
 
-TRANSFER_ACTION_TYPE_MIGRATION = "migration"
-TRANSFER_ACTION_TYPE_REPLICA = "replica"
+TRANSFER_ACTION_TYPE_DEPLOYMENT = "deployment"
+TRANSFER_ACTION_TYPE_TRANSFER = "transfer"
 
-EXECUTION_TYPE_REPLICA_EXECUTION = "replica_execution"
-EXECUTION_TYPE_REPLICA_DISKS_DELETE = "replica_disks_delete"
-EXECUTION_TYPE_REPLICA_DEPLOY = "replica_deploy"
-EXECUTION_TYPE_MIGRATION = "migration"
-EXECUTION_TYPE_REPLICA_UPDATE = "replica_update"
+EXECUTION_TYPE_TRANSFER_EXECUTION = "transfer_execution"
+EXECUTION_TYPE_TRANSFER_DISKS_DELETE = "transfer_disks_delete"
+EXECUTION_TYPE_DEPLOYMENT = "deployment"
+EXECUTION_TYPE_TRANSFER_UPDATE = "transfer_update"
 EXECUTION_TYPE_MINION_POOL_MAINTENANCE = "minion_pool_maintenance"
 EXECUTION_TYPE_MINION_POOL_UPDATE = "minion_pool_update"
 EXECUTION_TYPE_MINION_POOL_SET_UP_SHARED_RESOURCES = (
@@ -306,10 +282,8 @@ TASK_LOCK_NAME_FORMAT = "task-%s"
 TASKFLOW_LOCK_NAME_FORMAT = "taskflow-%s"
 EXECUTION_LOCK_NAME_FORMAT = "execution-%s"
 ENDPOINT_LOCK_NAME_FORMAT = "endpoint-%s"
-MIGRATION_LOCK_NAME_FORMAT = "migration-%s"
-# NOTE(aznashwan): intentionately left identical to Migration locks.
-DEPLOYMENT_LOCK_NAME_FORMAT = "migration-%s"
-REPLICA_LOCK_NAME_FORMAT = "replica-%s"
+DEPLOYMENT_LOCK_NAME_FORMAT = "deployment-%s"
+TRANSFER_LOCK_NAME_FORMAT = "transfer-%s"
 SCHEDULE_LOCK_NAME_FORMAT = "schedule-%s"
 REGION_LOCK_NAME_FORMAT = "region-%s"
 SERVICE_LOCK_NAME_FORMAT = "service-%s"
@@ -317,11 +291,10 @@ MINION_POOL_LOCK_NAME_FORMAT = "minion-pool-%s"
 MINION_MACHINE_LOCK_NAME_FORMAT = "minion-pool-%s-machine-%s"
 
 EXECUTION_TYPE_TO_ACTION_LOCK_NAME_FORMAT_MAP = {
-    EXECUTION_TYPE_MIGRATION: MIGRATION_LOCK_NAME_FORMAT,
-    EXECUTION_TYPE_REPLICA_EXECUTION: REPLICA_LOCK_NAME_FORMAT,
-    EXECUTION_TYPE_REPLICA_DEPLOY: REPLICA_LOCK_NAME_FORMAT,
-    EXECUTION_TYPE_REPLICA_UPDATE: REPLICA_LOCK_NAME_FORMAT,
-    EXECUTION_TYPE_REPLICA_DISKS_DELETE: REPLICA_LOCK_NAME_FORMAT,
+    EXECUTION_TYPE_TRANSFER_EXECUTION: TRANSFER_LOCK_NAME_FORMAT,
+    EXECUTION_TYPE_DEPLOYMENT: TRANSFER_LOCK_NAME_FORMAT,
+    EXECUTION_TYPE_TRANSFER_UPDATE: TRANSFER_LOCK_NAME_FORMAT,
+    EXECUTION_TYPE_TRANSFER_DISKS_DELETE: TRANSFER_LOCK_NAME_FORMAT,
     EXECUTION_TYPE_MINION_POOL_MAINTENANCE: MINION_POOL_LOCK_NAME_FORMAT,
     EXECUTION_TYPE_MINION_POOL_UPDATE: MINION_POOL_LOCK_NAME_FORMAT,
     EXECUTION_TYPE_MINION_POOL_SET_UP_SHARED_RESOURCES: (
@@ -340,7 +313,7 @@ SERVICE_MESSAGING_TOPIC_FORMAT = "%(main_topic)s.%(host)s"
 CONDUCTOR_MAIN_MESSAGING_TOPIC = "coriolis_conductor"
 WORKER_MAIN_MESSAGING_TOPIC = "coriolis_worker"
 SCHEDULER_MAIN_MESSAGING_TOPIC = "coriolis_scheduler"
-REPLICA_CRON_MAIN_MESSAGING_TOPIC = "coriolis_replica_cron_worker"
+TRANSFER_CRON_MAIN_MESSAGING_TOPIC = "coriolis_transfer_cron_worker"
 MINION_MANAGER_MAIN_MESSAGING_TOPIC = "coriolis_minion_manager"
 
 MINION_POOL_MACHINE_RETENTION_STRATEGY_DELETE = "delete"

+ 1 - 1
coriolis/db/sqlalchemy/models.py

@@ -332,7 +332,7 @@ class Transfer(BaseTransferAction):
             'base_transfer_action.base_id'), primary_key=True)
     scenario = sqlalchemy.Column(
         sqlalchemy.String(255), nullable=False,
-        default=constants.REPLICA_SCENARIO_REPLICA)
+        default=constants.TRANSFER_SCENARIO_REPLICA)
 
     __mapper_args__ = {
         'polymorphic_identity': 'transfer',

+ 1 - 1
coriolis/deployments/api.py

@@ -12,7 +12,7 @@ class API(object):
                                  instance_osmorphing_minion_pool_mappings,
                                  clone_disks=False, force=False,
                                  skip_os_morphing=False, user_scripts=None):
-        return self._rpc_client.deploy_replica_instances(
+        return self._rpc_client.deploy_transfer_instances(
             ctxt, replica_id, instance_osmorphing_minion_pool_mappings=(
                 instance_osmorphing_minion_pool_mappings),
             clone_disks=clone_disks, force=force,

+ 2 - 2
coriolis/diagnostics/api.py

@@ -2,7 +2,7 @@
 # All Rights Reserved.
 
 from coriolis.conductor.rpc import client as conductor_rpc
-from coriolis.replica_cron.rpc import client as cron_rpc
+from coriolis.transfer_cron.rpc import client as cron_rpc
 from coriolis import utils
 from coriolis.worker.rpc import client as worker_rpc
 
@@ -10,7 +10,7 @@ from coriolis.worker.rpc import client as worker_rpc
 class API(object):
     def __init__(self):
         self._conductor_cli = conductor_rpc.ConductorClient()
-        self._cron_cli = cron_rpc.ReplicaCronClient()
+        self._cron_cli = cron_rpc.TransferCronClient()
         self._worker_cli = worker_rpc.WorkerClient()
 
     def get(self, ctxt):

+ 4 - 4
coriolis/exception.py

@@ -235,12 +235,12 @@ class InvalidActionTasksExecutionState(Invalid):
     message = _("Invalid tasks execution state: %(reason)s")
 
 
-class InvalidMigrationState(Invalid):
-    message = _("Invalid migration state: %(reason)s")
+class InvalidDeploymentState(Invalid):
+    message = _("Invalid deployment state: %(reason)s")
 
 
-class InvalidReplicaState(Invalid):
-    message = _("Invalid replica state: %(reason)s")
+class InvalidTransferState(Invalid):
+    message = _("Invalid transfer state: %(reason)s")
 
 
 class InvalidInstanceState(Invalid):

+ 2 - 2
coriolis/minion_manager/rpc/client.py

@@ -67,12 +67,12 @@ class MinionManagerClient(rpc.BaseRPCClient):
             ctxt, 'validate_minion_pool_selections_for_action',
             action=action)
 
-    def allocate_minion_machines_for_replica(
+    def allocate_minion_machines_for_transfer(
             self, ctxt, replica):
         return self._cast(
             ctxt, 'allocate_minion_machines_for_replica', replica=replica)
 
-    def allocate_minion_machines_for_migration(
+    def allocate_minion_machines_for_deployment(
             self, ctxt, migration, include_transfer_minions=True,
             include_osmorphing_minions=True):
         return self._cast(

+ 8 - 7
coriolis/minion_manager/rpc/server.py

@@ -515,7 +515,7 @@ class MinionManagerServerEndpoint(object):
         try:
             self._run_machine_allocation_subflow_for_action(
                 ctxt, replica,
-                constants.TRANSFER_ACTION_TYPE_REPLICA,
+                constants.TRANSFER_ACTION_TYPE_TRANSFER,
                 include_transfer_minions=True,
                 include_osmorphing_minions=False)
         except Exception as ex:
@@ -529,8 +529,9 @@ class MinionManagerServerEndpoint(object):
                 [constants.MINION_MACHINE_STATUS_UNINITIALIZED])
             self.deallocate_minion_machines_for_action(
                 ctxt, replica['id'])
-            self._rpc_conductor_client.report_replica_minions_allocation_error(
-                ctxt, replica['id'], str(ex))
+            (self._rpc_conductor_client
+                .report_transfer_minions_allocation_error(
+                    ctxt, replica['id'], str(ex)))
             raise
 
     def allocate_minion_machines_for_migration(
@@ -539,7 +540,7 @@ class MinionManagerServerEndpoint(object):
         try:
             self._run_machine_allocation_subflow_for_action(
                 ctxt, migration,
-                constants.TRANSFER_ACTION_TYPE_MIGRATION,
+                constants.TRANSFER_ACTION_TYPE_DEPLOYMENT,
                 include_transfer_minions=include_transfer_minions,
                 include_osmorphing_minions=include_osmorphing_minions)
         except Exception as ex:
@@ -554,7 +555,7 @@ class MinionManagerServerEndpoint(object):
             self.deallocate_minion_machines_for_action(
                 ctxt, migration['id'])
             (self._rpc_conductor_client
-                .report_migration_minions_allocation_error(
+                .report_deployment_minions_allocation_error(
                     ctxt, migration['id'], str(ex)))
             raise
 
@@ -779,7 +780,7 @@ class MinionManagerServerEndpoint(object):
         machine_action_allocation_subflow_name_format = None
         allocation_failure_reporting_task_class = None
         allocation_confirmation_reporting_task_class = None
-        if action_type == constants.TRANSFER_ACTION_TYPE_MIGRATION:
+        if action_type == constants.TRANSFER_ACTION_TYPE_DEPLOYMENT:
             allocation_flow_name_format = (
                 (minion_mgr_tasks.
                     MINION_POOL_MIGRATION_ALLOCATION_FLOW_NAME_FORMAT))
@@ -793,7 +794,7 @@ class MinionManagerServerEndpoint(object):
             machine_action_allocation_subflow_name_format = (
                 (minion_mgr_tasks.
                     MINION_POOL_ALLOCATE_MACHINES_FOR_MIGRATION_SUBFLOW_NAME_FORMAT))  # noqa: E501
-        elif action_type == constants.TRANSFER_ACTION_TYPE_REPLICA:
+        elif action_type == constants.TRANSFER_ACTION_TYPE_TRANSFER:
             allocation_flow_name_format = (
                 (minion_mgr_tasks.
                     MINION_POOL_REPLICA_ALLOCATION_FLOW_NAME_FORMAT))

+ 6 - 6
coriolis/minion_manager/rpc/tasks.py

@@ -191,7 +191,7 @@ class ReportMinionAllocationFailureForMigrationTask(
 
     def _report_machine_allocation_failure(
             self, context, action_id, failure_str):
-        self._conductor_client.report_migration_minions_allocation_error(
+        self._conductor_client.report_deployment_minions_allocation_error(
             context, action_id, failure_str)
 
 
@@ -205,7 +205,7 @@ class ReportMinionAllocationFailureForReplicaTask(
 
     def _report_machine_allocation_failure(
             self, context, action_id, failure_str):
-        self._conductor_client.report_replica_minions_allocation_error(
+        self._conductor_client.report_transfer_minions_allocation_error(
             context, action_id, failure_str)
 
 
@@ -379,8 +379,8 @@ class _BaseConfirmMinionAllocationForActionTask(
             raise exception.MinionMachineAllocationFailure(
                 msg) from ex
         except (
-                exception.InvalidMigrationState,
-                exception.InvalidReplicaState) as ex:
+                exception.InvalidDeploymentState,
+                exception.InvalidTransferState) as ex:
             msg = (
                 "The Conductor has refused minion machine allocations for "
                 "%s with ID '%s' as it is purportedly in an invalid state "
@@ -410,7 +410,7 @@ class ConfirmMinionAllocationForMigrationTask(
 
     def _confirm_machine_allocation_for_action(
             self, context, action_id, machine_allocations):
-        self._conductor_client.confirm_migration_minions_allocation(
+        self._conductor_client.confirm_deployment_minions_allocation(
             context, action_id, machine_allocations)
 
 
@@ -427,7 +427,7 @@ class ConfirmMinionAllocationForReplicaTask(
 
     def _confirm_machine_allocation_for_action(
             self, context, action_id, machine_allocations):
-        self._conductor_client.confirm_replica_minions_allocation(
+        self._conductor_client.confirm_transfer_minions_allocation(
             context, action_id, machine_allocations)
 
 

+ 7 - 7
coriolis/providers/factory.py

@@ -22,8 +22,8 @@ PROVIDER_TYPE_MAP = {
     # classical disk-export-based migrations to Replica-based ones:
     # constants.PROVIDER_TYPE_EXPORT: base.BaseExportProvider,
     # constants.PROVIDER_TYPE_IMPORT: base.BaseImportProvider,
-    constants.PROVIDER_TYPE_REPLICA_EXPORT: base.BaseReplicaExportProvider,
-    constants.PROVIDER_TYPE_REPLICA_IMPORT: base.BaseReplicaImportProvider,
+    constants.PROVIDER_TYPE_TRANSFER_EXPORT: base.BaseReplicaExportProvider,
+    constants.PROVIDER_TYPE_TRANSFER_IMPORT: base.BaseReplicaImportProvider,
     constants.PROVIDER_TYPE_ENDPOINT: base.BaseEndpointProvider,
     constants.PROVIDER_TYPE_DESTINATION_ENDPOINT_OPTIONS:
         base.BaseEndpointDestinationOptionsProvider,
@@ -38,15 +38,15 @@ PROVIDER_TYPE_MAP = {
     constants.PROVIDER_TYPE_SETUP_LIBS: base.BaseProviderSetupExtraLibsMixin,
     constants.PROVIDER_TYPE_VALIDATE_MIGRATION_EXPORT: (
         base.BaseMigrationExportValidationProvider),
-    constants.PROVIDER_TYPE_VALIDATE_REPLICA_EXPORT: (
+    constants.PROVIDER_TYPE_VALIDATE_TRANSFER_EXPORT: (
         base.BaseReplicaExportValidationProvider),
     constants.PROVIDER_TYPE_VALIDATE_MIGRATION_IMPORT: (
         base.BaseMigrationImportValidationProvider),
-    constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT: (
+    constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT: (
         base.BaseReplicaImportValidationProvider),
-    constants.PROVIDER_TYPE_SOURCE_REPLICA_UPDATE: (
+    constants.PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE: (
         base.BaseUpdateSourceReplicaProvider),
-    constants.PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE: (
+    constants.PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE: (
         base.BaseUpdateDestinationReplicaProvider),
     constants.PROVIDER_TYPE_SOURCE_ENDPOINT_OPTIONS: (
         base.BaseEndpointSourceOptionsProvider),
@@ -81,7 +81,7 @@ def get_provider(
         parent = PROVIDER_TYPE_MAP.get(provider_type)
         if not parent:
             continue
-        if (cls.platform == platform_name and issubclass(cls, parent)):
+        if cls.platform == platform_name and issubclass(cls, parent):
             return cls(event_handler)
 
     if raise_if_not_found:

+ 5 - 5
coriolis/replica_tasks_executions/api.py

@@ -9,21 +9,21 @@ class API(object):
         self._rpc_client = rpc_client.ConductorClient()
 
     def create(self, ctxt, replica_id, shutdown_instances):
-        return self._rpc_client.execute_replica_tasks(
+        return self._rpc_client.execute_transfer_tasks(
             ctxt, replica_id, shutdown_instances)
 
     def delete(self, ctxt, replica_id, execution_id):
-        self._rpc_client.delete_replica_tasks_execution(
+        self._rpc_client.delete_transfer_tasks_execution(
             ctxt, replica_id, execution_id)
 
     def cancel(self, ctxt, replica_id, execution_id, force):
-        self._rpc_client.cancel_replica_tasks_execution(
+        self._rpc_client.cancel_transfer_tasks_execution(
             ctxt, replica_id, execution_id, force)
 
     def get_executions(self, ctxt, replica_id, include_tasks=False):
-        return self._rpc_client.get_replica_tasks_executions(
+        return self._rpc_client.get_transfer_tasks_executions(
             ctxt, replica_id, include_tasks)
 
     def get_execution(self, ctxt, replica_id, execution_id):
-        return self._rpc_client.get_replica_tasks_execution(
+        return self._rpc_client.get_transfer_tasks_execution(
             ctxt, replica_id, execution_id)

+ 6 - 6
coriolis/replicas/api.py

@@ -14,7 +14,7 @@ class API(object):
                instance_osmorphing_minion_pool_mappings,
                source_environment, destination_environment, instances,
                network_map, storage_mappings, notes=None, user_scripts=None):
-        return self._rpc_client.create_instances_replica(
+        return self._rpc_client.create_instances_transfer(
             ctxt, replica_scenario,
             origin_endpoint_id, destination_endpoint_id,
             origin_minion_pool_id, destination_minion_pool_id,
@@ -23,21 +23,21 @@ class API(object):
             network_map, storage_mappings, notes, user_scripts)
 
     def update(self, ctxt, replica_id, updated_properties):
-        return self._rpc_client.update_replica(
+        return self._rpc_client.update_transfer(
             ctxt, replica_id, updated_properties)
 
     def delete(self, ctxt, replica_id):
-        self._rpc_client.delete_replica(ctxt, replica_id)
+        self._rpc_client.delete_transfer(ctxt, replica_id)
 
     def get_replicas(self, ctxt, include_tasks_executions=False,
                      include_task_info=False):
-        return self._rpc_client.get_replicas(
+        return self._rpc_client.get_transfers(
             ctxt, include_tasks_executions,
             include_task_info=include_task_info)
 
     def get_replica(self, ctxt, replica_id, include_task_info=False):
-        return self._rpc_client.get_replica(
+        return self._rpc_client.get_transfer(
             ctxt, replica_id, include_task_info=include_task_info)
 
     def delete_disks(self, ctxt, replica_id):
-        return self._rpc_client.delete_replica_disks(ctxt, replica_id)
+        return self._rpc_client.delete_transfer_disks(ctxt, replica_id)

+ 3 - 3
coriolis/scheduler/scheduler_utils.py

@@ -8,8 +8,8 @@ from oslo_log import log as logging
 from coriolis import constants
 from coriolis.db import api as db_api
 from coriolis import exception
-from coriolis.replica_cron.rpc import client as rpc_cron_client
 from coriolis.scheduler.rpc import client as rpc_scheduler_client
+from coriolis.transfer_cron.rpc import client as rpc_cron_client
 from coriolis.worker.rpc import client as rpc_worker_client
 
 
@@ -21,8 +21,8 @@ RPC_TOPIC_TO_CLIENT_CLASS_MAP = {
     constants.WORKER_MAIN_MESSAGING_TOPIC: rpc_worker_client.WorkerClient,
     constants.SCHEDULER_MAIN_MESSAGING_TOPIC: (
         rpc_scheduler_client.SchedulerClient),
-    constants.REPLICA_CRON_MAIN_MESSAGING_TOPIC: (
-        rpc_cron_client.ReplicaCronClient)
+    constants.TRANSFER_CRON_MAIN_MESSAGING_TOPIC: (
+        rpc_cron_client.TransferCronClient)
 }
 
 

+ 16 - 40
coriolis/tasks/factory.py

@@ -9,32 +9,12 @@ from coriolis.tasks import osmorphing_tasks
 from coriolis.tasks import replica_tasks
 
 _TASKS_MAP = {
-    constants.TASK_TYPE_DEPLOY_MIGRATION_SOURCE_RESOURCES:
-        migration_tasks.DeployMigrationSourceResourcesTask,
-    constants.TASK_TYPE_DEPLOY_MIGRATION_TARGET_RESOURCES:
-        migration_tasks.DeployMigrationTargetResourcesTask,
-    constants.TASK_TYPE_DELETE_MIGRATION_SOURCE_RESOURCES:
-        migration_tasks.DeleteMigrationSourceResourcesTask,
-    constants.TASK_TYPE_DELETE_MIGRATION_TARGET_RESOURCES:
-        migration_tasks.DeleteMigrationTargetResourcesTask,
-    constants.TASK_TYPE_DEPLOY_INSTANCE_RESOURCES:
-        migration_tasks.DeployInstanceResourcesTask,
     constants.TASK_TYPE_FINALIZE_INSTANCE_DEPLOYMENT:
         migration_tasks.FinalizeInstanceDeploymentTask,
-    constants.TASK_TYPE_CREATE_INSTANCE_DISKS:
-        migration_tasks.CreateInstanceDisksTask,
     constants.TASK_TYPE_CLEANUP_FAILED_INSTANCE_DEPLOYMENT:
         migration_tasks.CleanupFailedInstanceDeploymentTask,
-    constants.TASK_TYPE_CLEANUP_INSTANCE_TARGET_STORAGE:
-        migration_tasks.CleanupInstanceTargetStorageTask,
-    constants.TASK_TYPE_CLEANUP_INSTANCE_SOURCE_STORAGE:
-        migration_tasks.CleanupInstanceSourceStorageTask,
     constants.TASK_TYPE_GET_OPTIMAL_FLAVOR:
         migration_tasks.GetOptimalFlavorTask,
-    constants.TASK_TYPE_VALIDATE_MIGRATION_SOURCE_INPUTS:
-        migration_tasks.ValidateMigrationSourceInputsTask,
-    constants.TASK_TYPE_VALIDATE_MIGRATION_DESTINATION_INPUTS:
-        migration_tasks.ValidateMigrationDestinationInputsTask,
     constants.TASK_TYPE_DEPLOY_OS_MORPHING_RESOURCES:
         osmorphing_tasks.DeployOSMorphingResourcesTask,
     constants.TASK_TYPE_OS_MORPHING:
@@ -47,41 +27,37 @@ _TASKS_MAP = {
         replica_tasks.ReplicateDisksTask,
     constants.TASK_TYPE_SHUTDOWN_INSTANCE:
         replica_tasks.ShutdownInstanceTask,
-    constants.TASK_TYPE_DEPLOY_REPLICA_DISKS:
+    constants.TASK_TYPE_DEPLOY_TRANSFER_DISKS:
         replica_tasks.DeployReplicaDisksTask,
-    constants.TASK_TYPE_DELETE_REPLICA_SOURCE_DISK_SNAPSHOTS:
+    constants.TASK_TYPE_DELETE_TRANSFER_SOURCE_DISK_SNAPSHOTS:
         replica_tasks.DeleteReplicaSourceDiskSnapshotsTask,
-    constants.TASK_TYPE_DELETE_REPLICA_DISKS:
+    constants.TASK_TYPE_DELETE_TRANSFER_DISKS:
         replica_tasks.DeleteReplicaDisksTask,
-    constants.TASK_TYPE_DEPLOY_REPLICA_TARGET_RESOURCES:
+    constants.TASK_TYPE_DEPLOY_TRANSFER_TARGET_RESOURCES:
         replica_tasks.DeployReplicaTargetResourcesTask,
-    constants.TASK_TYPE_DELETE_REPLICA_TARGET_RESOURCES:
+    constants.TASK_TYPE_DELETE_TRANSFER_TARGET_RESOURCES:
         replica_tasks.DeleteReplicaTargetResourcesTask,
-    constants.TASK_TYPE_DEPLOY_REPLICA_SOURCE_RESOURCES:
+    constants.TASK_TYPE_DEPLOY_TRANSFER_SOURCE_RESOURCES:
         replica_tasks.DeployReplicaSourceResourcesTask,
-    constants.TASK_TYPE_DELETE_REPLICA_SOURCE_RESOURCES:
+    constants.TASK_TYPE_DELETE_TRANSFER_SOURCE_RESOURCES:
         replica_tasks.DeleteReplicaSourceResourcesTask,
-    constants.TASK_TYPE_DEPLOY_REPLICA_INSTANCE_RESOURCES:
+    constants.TASK_TYPE_DEPLOY_INSTANCE_RESOURCES:
         replica_tasks.DeployReplicaInstanceResourcesTask,
-    constants.TASK_TYPE_FINALIZE_REPLICA_INSTANCE_DEPLOYMENT:
-        replica_tasks.FinalizeReplicaInstanceDeploymentTask,
-    constants.TASK_TYPE_CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT:
-        replica_tasks.CleanupFailedReplicaInstanceDeploymentTask,
-    constants.TASK_TYPE_CREATE_REPLICA_DISK_SNAPSHOTS:
+    constants.TASK_TYPE_CREATE_TRANSFER_DISK_SNAPSHOTS:
         replica_tasks.CreateReplicaDiskSnapshotsTask,
-    constants.TASK_TYPE_DELETE_REPLICA_TARGET_DISK_SNAPSHOTS:
+    constants.TASK_TYPE_DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS:
         replica_tasks.DeleteReplicaTargetDiskSnapshotsTask,
-    constants.TASK_TYPE_RESTORE_REPLICA_DISK_SNAPSHOTS:
+    constants.TASK_TYPE_RESTORE_TRANSFER_DISK_SNAPSHOTS:
         replica_tasks.RestoreReplicaDiskSnapshotsTask,
-    constants.TASK_TYPE_VALIDATE_REPLICA_SOURCE_INPUTS:
+    constants.TASK_TYPE_VALIDATE_TRANSFER_SOURCE_INPUTS:
         replica_tasks.ValidateReplicaExecutionSourceInputsTask,
-    constants.TASK_TYPE_VALIDATE_REPLICA_DESTINATION_INPUTS:
+    constants.TASK_TYPE_VALIDATE_TRANSFER_DESTINATION_INPUTS:
         replica_tasks.ValidateReplicaExecutionDestinationInputsTask,
-    constants.TASK_TYPE_VALIDATE_REPLICA_DEPLOYMENT_INPUTS:
+    constants.TASK_TYPE_VALIDATE_DEPLOYMENT_INPUTS:
         replica_tasks.ValidateReplicaDeploymentParametersTask,
-    constants.TASK_TYPE_UPDATE_SOURCE_REPLICA:
+    constants.TASK_TYPE_UPDATE_SOURCE_TRANSFER:
         replica_tasks.UpdateSourceReplicaTask,
-    constants.TASK_TYPE_UPDATE_DESTINATION_REPLICA:
+    constants.TASK_TYPE_UPDATE_DESTINATION_TRANSFER:
         replica_tasks.UpdateDestinationReplicaTask,
     constants.TASK_TYPE_VALIDATE_SOURCE_MINION_POOL_OPTIONS:
         minion_pool_tasks.ValidateSourceMinionPoolOptionsTask,

+ 4 - 4
coriolis/tasks/osmorphing_tasks.py

@@ -34,20 +34,20 @@ class OSMorphingTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT],
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT],
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT],
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT],
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
 
         origin_provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin["type"], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
 
         destination_provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
 
         osmorphing_connection_info = base.unmarshal_migr_conn_info(

+ 42 - 42
coriolis/tasks/replica_tasks.py

@@ -93,13 +93,13 @@ class GetInstanceInfoTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin["type"], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, origin)
 
@@ -134,13 +134,13 @@ class ShutdownInstanceTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin["type"], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, origin)
 
@@ -175,13 +175,13 @@ class ReplicateDisksTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin["type"], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, origin)
         export_info = task_info["export_info"]
@@ -245,7 +245,7 @@ class DeployReplicaDisksTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -254,7 +254,7 @@ class DeployReplicaDisksTask(base.TaskRunner):
         export_info = task_info["export_info"]
 
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
 
@@ -291,7 +291,7 @@ class DeleteReplicaSourceDiskSnapshotsTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -305,7 +305,7 @@ class DeleteReplicaSourceDiskSnapshotsTask(base.TaskRunner):
             return {'volumes_info': []}
 
         provider = providers_factory.get_provider(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, origin)
         source_environment = task_info['source_environment']
@@ -337,7 +337,7 @@ class DeleteReplicaDisksTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -351,7 +351,7 @@ class DeleteReplicaDisksTask(base.TaskRunner):
             return {'volumes_info': []}
 
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
 
@@ -389,13 +389,13 @@ class DeployReplicaSourceResourcesTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin["type"], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, origin)
 
@@ -460,13 +460,13 @@ class DeleteReplicaSourceResourcesTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin["type"], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, origin)
 
@@ -504,7 +504,7 @@ class DeployReplicaTargetResourcesTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _validate_connection_info(self, migr_connection_info):
@@ -535,7 +535,7 @@ class DeployReplicaTargetResourcesTask(base.TaskRunner):
         export_info = task_info['export_info']
 
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
 
@@ -603,13 +603,13 @@ class DeleteReplicaTargetResourcesTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
 
@@ -644,7 +644,7 @@ class DeployReplicaInstanceResourcesTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -653,7 +653,7 @@ class DeployReplicaInstanceResourcesTask(base.TaskRunner):
         export_info = task_info["export_info"]
 
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
 
@@ -688,13 +688,13 @@ class FinalizeReplicaInstanceDeploymentTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
         target_environment = task_info["target_environment"]
@@ -730,13 +730,13 @@ class CleanupFailedReplicaInstanceDeploymentTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
         target_environment = task_info["target_environment"]
@@ -768,13 +768,13 @@ class CreateReplicaDiskSnapshotsTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
         export_info = task_info['export_info']
@@ -812,14 +812,14 @@ class DeleteReplicaTargetDiskSnapshotsTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         export_info = task_info['export_info']
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
 
@@ -856,13 +856,13 @@ class RestoreReplicaDiskSnapshotsTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
              event_handler):
         provider = providers_factory.get_provider(
-            destination["type"], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination["type"], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             event_handler)
         connection_info = base.get_connection_info(ctxt, destination)
         export_info = task_info['export_info']
@@ -900,7 +900,7 @@ class ValidateReplicaExecutionSourceInputsTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_VALIDATE_REPLICA_EXPORT]
+                constants.PROVIDER_TYPE_VALIDATE_TRANSFER_EXPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -908,7 +908,7 @@ class ValidateReplicaExecutionSourceInputsTask(base.TaskRunner):
         event_manager = events.EventManager(event_handler)
         origin_type = origin["type"]
         source_provider = providers_factory.get_provider(
-            origin_type, constants.PROVIDER_TYPE_VALIDATE_REPLICA_EXPORT,
+            origin_type, constants.PROVIDER_TYPE_VALIDATE_TRANSFER_EXPORT,
             event_handler, raise_if_not_found=False)
         origin_connection_info = base.get_connection_info(ctxt, origin)
         if not source_provider:
@@ -941,7 +941,7 @@ class ValidateReplicaExecutionDestinationInputsTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT]
         }
 
     def _validate_provider_replica_import_input(
@@ -960,7 +960,7 @@ class ValidateReplicaExecutionDestinationInputsTask(base.TaskRunner):
             ctxt, destination)
         destination_provider = providers_factory.get_provider(
             destination_type,
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT, event_handler,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT, event_handler,
             raise_if_not_found=False)
         if not destination_provider:
             event_manager.progress_update(
@@ -1001,7 +1001,7 @@ class ValidateReplicaDeploymentParametersTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT]
+                constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -1018,7 +1018,7 @@ class ValidateReplicaDeploymentParametersTask(base.TaskRunner):
         # validate destination params:
         destination_provider = providers_factory.get_provider(
             destination_type,
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT, event_handler,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT, event_handler,
             raise_if_not_found=False)
         if not destination_provider:
             event_manager.progress_update(
@@ -1054,7 +1054,7 @@ class UpdateSourceReplicaTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_SOURCE: [
-                constants.PROVIDER_TYPE_SOURCE_REPLICA_UPDATE]
+                constants.PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -1075,7 +1075,7 @@ class UpdateSourceReplicaTask(base.TaskRunner):
                 'source_environment': old_source_env}
 
         source_provider = providers_factory.get_provider(
-            origin["type"], constants.PROVIDER_TYPE_SOURCE_REPLICA_UPDATE,
+            origin["type"], constants.PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE,
             event_handler, raise_if_not_found=False)
         if not source_provider:
             raise exception.InvalidActionTasksExecutionState(
@@ -1122,7 +1122,7 @@ class UpdateDestinationReplicaTask(base.TaskRunner):
     def get_required_provider_types(cls):
         return {
             constants.PROVIDER_PLATFORM_DESTINATION: [
-                constants.PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE]
+                constants.PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE]
         }
 
     def _run(self, ctxt, instance, origin, destination, task_info,
@@ -1144,7 +1144,7 @@ class UpdateDestinationReplicaTask(base.TaskRunner):
 
         destination_provider = providers_factory.get_provider(
             destination["type"],
-            constants.PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE,
+            constants.PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE,
             event_handler, raise_if_not_found=False)
         if not destination_provider:
             raise exception.InvalidActionTasksExecutionState(

+ 1 - 1
coriolis/tests/api/v1/test_replica_schedules.py

@@ -10,9 +10,9 @@ from webob import exc
 from coriolis.api.v1 import replica_schedules
 from coriolis.api.v1.views import replica_schedule_view
 from coriolis import exception
-from coriolis.replica_cron import api
 from coriolis import schemas
 from coriolis.tests import test_base
+from coriolis.transfer_cron import api
 
 
 class ReplicaScheduleControllerTestCase(test_base.CoriolisBaseTestCase):

+ 3 - 3
coriolis/tests/cmd/test_replica_cron.py

@@ -6,14 +6,14 @@ from unittest import mock
 
 from coriolis.cmd import replica_cron
 from coriolis import constants
-from coriolis.replica_cron.rpc import server as rpc_server
 from coriolis import service
 from coriolis.tests import test_base
+from coriolis.transfer_cron.rpc import server as rpc_server
 from coriolis import utils
 
 
 class ReplicaCronTestCase(test_base.CoriolisBaseTestCase):
-    """Test suite for the Coriolis replica_cron CMD"""
+    """Test suite for the Coriolis transfer_cron CMD"""
 
     @mock.patch.object(service, 'service')
     @mock.patch.object(service, 'MessagingService')
@@ -37,7 +37,7 @@ class ReplicaCronTestCase(test_base.CoriolisBaseTestCase):
         mock_setup_logging.assert_called_once()
         mock_ReplicaCronServerEndpoint.assert_called_once()
         mock_MessagingService.assert_called_once_with(
-            constants.REPLICA_CRON_MAIN_MESSAGING_TOPIC,
+            constants.TRANSFER_CRON_MAIN_MESSAGING_TOPIC,
             [mock_ReplicaCronServerEndpoint.return_value],
             rpc_server.VERSION,
             worker_count=1)

+ 0 - 182
coriolis/tests/conductor/rpc/data/deploy_replica_instance_config.yml

@@ -1,182 +0,0 @@
-- config:
-    skip_os_morphing: False
-    has_os_morphing_minion: True
-  expected_tasks:
-    - type: 'VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY'
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: 'CREATE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY']
-    - type: 'DEPLOY_REPLICA_INSTANCE_RESOURCES'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: 'ATTACH_VOLUMES_TO_OSMORPHING_MINION'
-      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: 'COLLECT_OS_MORPHING_INFO'
-      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION']
-    - type: 'OS_MORPHING'
-      depends_on: ['COLLECT_OS_MORPHING_INFO']
-    - type: 'DETACH_VOLUMES_FROM_OSMORPHING_MINION'
-      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION', 'OS_MORPHING']
-      on_error: True
-    - type: 'RELEASE_OSMORPHING_MINION'
-      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_OSMORPHING_MINION']
-      on_error: True
-    - type: 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['OS_MORPHING', 'RELEASE_OSMORPHING_MINION']
-    - type: 'DELETE_REPLICA_TARGET_DISK_SNAPSHOTS'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: False
-    - type: 'CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-    - type: 'RESTORE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True
-
-- config:
-    skip_os_morphing: False
-    has_os_morphing_minion: False
-  expected_tasks:
-    - type: 'CREATE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: 'DEPLOY_REPLICA_INSTANCE_RESOURCES'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: 'DEPLOY_OS_MORPHING_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: 'OS_MORPHING'
-      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES']
-    - type: 'DELETE_OS_MORPHING_RESOURCES'
-      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES', 'OS_MORPHING']
-      on_error: True
-    - type: 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['OS_MORPHING', 'DELETE_OS_MORPHING_RESOURCES']
-    - type: 'DELETE_REPLICA_TARGET_DISK_SNAPSHOTS'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: False
-    - type: 'CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-    - type: 'RESTORE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True
-
-- config:
-    skip_os_morphing: True
-  expected_tasks:
-    - type: 'CREATE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: 'DEPLOY_REPLICA_INSTANCE_RESOURCES'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: 'DELETE_REPLICA_TARGET_DISK_SNAPSHOTS'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: False
-    - type: 'CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-    - type: 'RESTORE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True
-
-- config:
-    skip_os_morphing: True
-    get_optimal_flavor: True
-  expected_tasks:
-    - type: 'CREATE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: 'DEPLOY_REPLICA_INSTANCE_RESOURCES'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: 'GET_OPTIMAL_FLAVOR'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['GET_OPTIMAL_FLAVOR']
-    - type: 'DELETE_REPLICA_TARGET_DISK_SNAPSHOTS'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: False
-    - type: 'CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-    - type: 'RESTORE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True
-
-- config:
-    skip_os_morphing: True
-    clone_disks: True
-  expected_tasks:
-    - type: 'CREATE_REPLICA_DISK_SNAPSHOTS'
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: 'DEPLOY_REPLICA_INSTANCE_RESOURCES'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: 'DELETE_REPLICA_TARGET_DISK_SNAPSHOTS'
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True
-    - type: 'CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT'
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-
-- config:
-    get_optimal_flavor: True
-    skip_os_morphing: False
-  expected_tasks:
-    - type: CREATE_REPLICA_DISK_SNAPSHOTS
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: DEPLOY_REPLICA_INSTANCE_RESOURCES
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: DEPLOY_OS_MORPHING_RESOURCES
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: OS_MORPHING
-      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES']
-    - type: DELETE_OS_MORPHING_RESOURCES
-      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES', 'OS_MORPHING']
-      on_error: True
-    - type: GET_OPTIMAL_FLAVOR
-      depends_on: ['OS_MORPHING', 'DELETE_OS_MORPHING_RESOURCES']
-    - type: FINALIZE_REPLICA_INSTANCE_DEPLOYMENT
-      depends_on: ['GET_OPTIMAL_FLAVOR']
-    - type: DELETE_REPLICA_TARGET_DISK_SNAPSHOTS
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: False
-    - type: CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-    - type: RESTORE_REPLICA_DISK_SNAPSHOTS
-      depends_on: ['CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True
-
-- config:
-    get_optimal_flavor: True
-    skip_os_morphing: False
-    has_os_morphing_minion: True
-  expected_tasks:
-    - type: VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY
-      depends_on: ['VALIDATE_REPLICA_DEPLOYMENT_INPUTS']
-    - type: DEPLOY_REPLICA_INSTANCE_RESOURCES
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS']
-    - type: ATTACH_VOLUMES_TO_OSMORPHING_MINION
-      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DEPLOY_REPLICA_INSTANCE_RESOURCES']
-    - type: COLLECT_OS_MORPHING_INFO
-      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION']
-    - type: OS_MORPHING
-      depends_on: ['COLLECT_OS_MORPHING_INFO']
-    - type: DETACH_VOLUMES_FROM_OSMORPHING_MINION
-      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION', 'OS_MORPHING']
-      on_error: True
-    - type: RELEASE_OSMORPHING_MINION
-      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_OSMORPHING_MINION']
-      on_error: True
-    - type: GET_OPTIMAL_FLAVOR
-      depends_on: ['OS_MORPHING', 'RELEASE_OSMORPHING_MINION']
-    - type: FINALIZE_REPLICA_INSTANCE_DEPLOYMENT
-      depends_on: ['GET_OPTIMAL_FLAVOR']
-    - type: DELETE_REPLICA_TARGET_DISK_SNAPSHOTS
-      depends_on: ['CREATE_REPLICA_DISK_SNAPSHOTS', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: False
-    - type: CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT
-      depends_on: ['DEPLOY_REPLICA_INSTANCE_RESOURCES', 'FINALIZE_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error_only: True
-    - type: RESTORE_REPLICA_DISK_SNAPSHOTS
-      depends_on: ['CLEANUP_FAILED_REPLICA_INSTANCE_DEPLOYMENT']
-      on_error: True

+ 182 - 0
coriolis/tests/conductor/rpc/data/deploy_transfer_instance_config.yml

@@ -0,0 +1,182 @@
+- config:
+    skip_os_morphing: False
+    has_os_morphing_minion: True
+  expected_tasks:
+    - type: 'VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY'
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: 'CREATE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY']
+    - type: 'DEPLOY_INSTANCE_RESOURCES'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: 'ATTACH_VOLUMES_TO_OSMORPHING_MINION'
+      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DEPLOY_INSTANCE_RESOURCES']
+    - type: 'COLLECT_OS_MORPHING_INFO'
+      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION']
+    - type: 'OS_MORPHING'
+      depends_on: ['COLLECT_OS_MORPHING_INFO']
+    - type: 'DETACH_VOLUMES_FROM_OSMORPHING_MINION'
+      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION', 'OS_MORPHING']
+      on_error: True
+    - type: 'RELEASE_OSMORPHING_MINION'
+      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_OSMORPHING_MINION']
+      on_error: True
+    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
+      depends_on: ['OS_MORPHING', 'RELEASE_OSMORPHING_MINION']
+    - type: 'DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: False
+    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+    - type: 'RESTORE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
+      on_error: True
+
+- config:
+    skip_os_morphing: False
+    has_os_morphing_minion: False
+  expected_tasks:
+    - type: 'CREATE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: 'DEPLOY_INSTANCE_RESOURCES'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: 'DEPLOY_OS_MORPHING_RESOURCES'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
+    - type: 'OS_MORPHING'
+      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES']
+    - type: 'DELETE_OS_MORPHING_RESOURCES'
+      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES', 'OS_MORPHING']
+      on_error: True
+    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
+      depends_on: ['OS_MORPHING', 'DELETE_OS_MORPHING_RESOURCES']
+    - type: 'DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: False
+    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+    - type: 'RESTORE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
+      on_error: True
+
+- config:
+    skip_os_morphing: True
+  expected_tasks:
+    - type: 'CREATE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: 'DEPLOY_INSTANCE_RESOURCES'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
+    - type: 'DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: False
+    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+    - type: 'RESTORE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
+      on_error: True
+
+- config:
+    skip_os_morphing: True
+    get_optimal_flavor: True
+  expected_tasks:
+    - type: 'CREATE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: 'DEPLOY_INSTANCE_RESOURCES'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: 'GET_OPTIMAL_FLAVOR'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
+    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
+      depends_on: ['GET_OPTIMAL_FLAVOR']
+    - type: 'DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: False
+    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+    - type: 'RESTORE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
+      on_error: True
+
+- config:
+    skip_os_morphing: True
+    clone_disks: True
+  expected_tasks:
+    - type: 'CREATE_TRANSFER_DISK_SNAPSHOTS'
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: 'DEPLOY_INSTANCE_RESOURCES'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
+    - type: 'DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS'
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: True
+    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+
+- config:
+    get_optimal_flavor: True
+    skip_os_morphing: False
+  expected_tasks:
+    - type: CREATE_TRANSFER_DISK_SNAPSHOTS
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: DEPLOY_INSTANCE_RESOURCES
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: DEPLOY_OS_MORPHING_RESOURCES
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
+    - type: OS_MORPHING
+      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES']
+    - type: DELETE_OS_MORPHING_RESOURCES
+      depends_on: ['DEPLOY_OS_MORPHING_RESOURCES', 'OS_MORPHING']
+      on_error: True
+    - type: GET_OPTIMAL_FLAVOR
+      depends_on: ['OS_MORPHING', 'DELETE_OS_MORPHING_RESOURCES']
+    - type: FINALIZE_INSTANCE_DEPLOYMENT
+      depends_on: ['GET_OPTIMAL_FLAVOR']
+    - type: DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: False
+    - type: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+    - type: RESTORE_TRANSFER_DISK_SNAPSHOTS
+      depends_on: ['CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
+      on_error: True
+
+- config:
+    get_optimal_flavor: True
+    skip_os_morphing: False
+    has_os_morphing_minion: True
+  expected_tasks:
+    - type: VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY
+      depends_on: ['VALIDATE_DEPLOYMENT_INPUTS']
+    - type: DEPLOY_INSTANCE_RESOURCES
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS']
+    - type: ATTACH_VOLUMES_TO_OSMORPHING_MINION
+      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DEPLOY_INSTANCE_RESOURCES']
+    - type: COLLECT_OS_MORPHING_INFO
+      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION']
+    - type: OS_MORPHING
+      depends_on: ['COLLECT_OS_MORPHING_INFO']
+    - type: DETACH_VOLUMES_FROM_OSMORPHING_MINION
+      depends_on: ['ATTACH_VOLUMES_TO_OSMORPHING_MINION', 'OS_MORPHING']
+      on_error: True
+    - type: RELEASE_OSMORPHING_MINION
+      depends_on: ['VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_OSMORPHING_MINION']
+      on_error: True
+    - type: GET_OPTIMAL_FLAVOR
+      depends_on: ['OS_MORPHING', 'RELEASE_OSMORPHING_MINION']
+    - type: FINALIZE_INSTANCE_DEPLOYMENT
+      depends_on: ['GET_OPTIMAL_FLAVOR']
+    - type: DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS
+      depends_on: ['CREATE_TRANSFER_DISK_SNAPSHOTS', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error: False
+    - type: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
+      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
+      on_error_only: True
+    - type: RESTORE_TRANSFER_DISK_SNAPSHOTS
+      depends_on: ['CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
+      on_error: True

+ 65 - 65
coriolis/tests/conductor/rpc/data/execute_replica_tasks_config.yml → coriolis/tests/conductor/rpc/data/execute_transfer_tasks_config.yml

@@ -5,24 +5,24 @@
     shutdown_instances: False
   expected_tasks:
     -
-      type: 'DEPLOY_REPLICA_DISKS'
-      depends_on: ['VALIDATE_REPLICA_SOURCE_INPUTS', 'VALIDATE_REPLICA_DESTINATION_INPUTS']
+      type: 'DEPLOY_TRANSFER_DISKS'
+      depends_on: ['VALIDATE_TRANSFER_SOURCE_INPUTS', 'VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
-      type: 'DEPLOY_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'REPLICATE_DISKS'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'DEPLOY_REPLICA_TARGET_RESOURCES']
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'DEPLOY_TRANSFER_TARGET_RESOURCES']
     -
-      type: 'DELETE_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
     -
-      type: 'DELETE_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_TARGET_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_TARGET_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
 -
   config:
@@ -32,23 +32,23 @@
   expected_tasks:
     -
       type: 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY'
-      depends_on: ['VALIDATE_REPLICA_DESTINATION_INPUTS']
+      depends_on: ['VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_DISKS'
-      depends_on: ['VALIDATE_REPLICA_SOURCE_INPUTS', 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY']
+      type: 'DEPLOY_TRANSFER_DISKS'
+      depends_on: ['VALIDATE_TRANSFER_SOURCE_INPUTS', 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY']
     -
-      type: 'DELETE_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
     -
       type: 'ATTACH_VOLUMES_TO_DESTINATION_MINION'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'REPLICATE_DISKS'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
     -
-      type: 'DEPLOY_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'DETACH_VOLUMES_FROM_DESTINATION_MINION'
       depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION', 'REPLICATE_DISKS']
@@ -57,7 +57,7 @@
       type: 'RELEASE_DESTINATION_MINION'
       depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_DESTINATION_MINION']
       on_error: True
-    
+
 -
   config:
     origin_minion_pool: True
@@ -66,23 +66,23 @@
   expected_tasks:
     -
       type: 'VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY'
-      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_REPLICA_SOURCE_INPUTS']
+      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_TRANSFER_SOURCE_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_DISKS'
-      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'VALIDATE_REPLICA_DESTINATION_INPUTS']
+      type: 'DEPLOY_TRANSFER_DISKS'
+      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'REPLICATE_DISKS'
-      depends_on: ['DEPLOY_REPLICA_TARGET_RESOURCES']
+      depends_on: ['DEPLOY_TRANSFER_TARGET_RESOURCES']
     -
       type: 'RELEASE_SOURCE_MINION'
       depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'REPLICATE_DISKS']
       on_error: True
     -
-      type: 'DELETE_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_TARGET_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_TARGET_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
 -
   config:
@@ -92,16 +92,16 @@
   expected_tasks:
     -
       type: 'VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY'
-      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_REPLICA_SOURCE_INPUTS']
+      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_TRANSFER_SOURCE_INPUTS']
     -
       type: 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY'
-      depends_on: ['VALIDATE_REPLICA_DESTINATION_INPUTS']
+      depends_on: ['VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_DISKS'
+      type: 'DEPLOY_TRANSFER_DISKS'
       depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY']
     -
       type: 'ATTACH_VOLUMES_TO_DESTINATION_MINION'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'REPLICATE_DISKS'
       depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION']
@@ -124,27 +124,27 @@
     shutdown_instances: True
   expected_tasks:
     -
-      type: 'DEPLOY_REPLICA_DISKS'
-      depends_on: ['VALIDATE_REPLICA_SOURCE_INPUTS', 'VALIDATE_REPLICA_DESTINATION_INPUTS']
+      type: 'DEPLOY_TRANSFER_DISKS'
+      depends_on: ['VALIDATE_TRANSFER_SOURCE_INPUTS', 'VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
-      type: 'DEPLOY_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'SHUTDOWN_INSTANCE'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'DEPLOY_REPLICA_TARGET_RESOURCES']
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'DEPLOY_TRANSFER_TARGET_RESOURCES']
     -
       type: 'REPLICATE_DISKS'
       depends_on: ['SHUTDOWN_INSTANCE']
     -
-      type: 'DELETE_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
     -
-      type: 'DELETE_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_TARGET_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_TARGET_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
 -
   config:
@@ -154,25 +154,25 @@
   expected_tasks:
     -
       type: 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY'
-      depends_on: ['VALIDATE_REPLICA_DESTINATION_INPUTS']
+      depends_on: ['VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_DISKS'
-      depends_on: ['VALIDATE_REPLICA_SOURCE_INPUTS', 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY']
+      type: 'DEPLOY_TRANSFER_DISKS'
+      depends_on: ['VALIDATE_TRANSFER_SOURCE_INPUTS', 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY']
     -
-      type: 'DEPLOY_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'ATTACH_VOLUMES_TO_DESTINATION_MINION'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'SHUTDOWN_INSTANCE'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
     -
       type: 'REPLICATE_DISKS'
       depends_on: ['SHUTDOWN_INSTANCE']
     -
-      type: 'DELETE_REPLICA_SOURCE_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_SOURCE_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_SOURCE_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_SOURCE_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
     -
       type: 'DETACH_VOLUMES_FROM_DESTINATION_MINION'
@@ -190,16 +190,16 @@
   expected_tasks:
     -
       type: 'VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY'
-      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_REPLICA_SOURCE_INPUTS']
+      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_TRANSFER_SOURCE_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_DISKS'
-      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'VALIDATE_REPLICA_DESTINATION_INPUTS']
+      type: 'DEPLOY_TRANSFER_DISKS'
+      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      type: 'DEPLOY_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'SHUTDOWN_INSTANCE'
-      depends_on: ['DEPLOY_REPLICA_TARGET_RESOURCES']
+      depends_on: ['DEPLOY_TRANSFER_TARGET_RESOURCES']
     -
       type: 'REPLICATE_DISKS'
       depends_on: ['SHUTDOWN_INSTANCE']
@@ -208,8 +208,8 @@
       depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'REPLICATE_DISKS']
       on_error: True
     -
-      type: 'DELETE_REPLICA_TARGET_RESOURCES'
-      depends_on: ['DEPLOY_REPLICA_TARGET_RESOURCES', 'REPLICATE_DISKS']
+      type: 'DELETE_TRANSFER_TARGET_RESOURCES'
+      depends_on: ['DEPLOY_TRANSFER_TARGET_RESOURCES', 'REPLICATE_DISKS']
       on_error: True
 -
   config:
@@ -219,16 +219,16 @@
   expected_tasks:
     -
       type: 'VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY'
-      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_REPLICA_SOURCE_INPUTS']
+      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_TRANSFER_SOURCE_INPUTS']
     -
       type: 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY'
-      depends_on: ['VALIDATE_REPLICA_DESTINATION_INPUTS']
+      depends_on: ['VALIDATE_TRANSFER_DESTINATION_INPUTS']
     -
-      type: 'DEPLOY_REPLICA_DISKS'
+      type: 'DEPLOY_TRANSFER_DISKS'
       depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY']
     -
       type: 'ATTACH_VOLUMES_TO_DESTINATION_MINION'
-      depends_on: ['DEPLOY_REPLICA_DISKS']
+      depends_on: ['DEPLOY_TRANSFER_DISKS']
     -
       type: 'SHUTDOWN_INSTANCE'
       depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION']

+ 6 - 6
coriolis/tests/conductor/rpc/data/update_replica_config.yml → coriolis/tests/conductor/rpc/data/update_transfer_config.yml

@@ -1,5 +1,5 @@
 - config:
-    replica:
+    transfer:
       instances: ['mock_instance_1', 'mock_instance_2']
       info:
         mock_instance_1: {}
@@ -15,10 +15,10 @@
       destination_environment:
         network_map: "mock_network_map"
   has_updated_values: True
-  has_replica_instance: True
+  has_transfer_instance: True
 
 - config:
-    replica: {}
+    transfer: {}
     updated_properties:
       origin_minion_pool_id: "mock_origin_minion_pool_id"
       destination_minion_pool_id: "mock_destination_minion_pool_id"
@@ -29,10 +29,10 @@
       destination_environment:
         network_map: "mock_network_map"
   has_updated_values: True
-  has_replica_instance: False
+  has_transfer_instance: False
 
 - config:
-    replica: {}
+    transfer: {}
     updated_properties: {}
   has_updated_values: False
-  has_replica_instance: False
+  has_transfer_instance: False

+ 63 - 62
coriolis/tests/conductor/rpc/test_client.py

@@ -8,7 +8,7 @@ from coriolis import constants
 from coriolis.tests import test_base
 
 INSTANCE_ARGS = {
-    "replica_scenario": "mock_replica_scenario",
+    "transfer_scenario": "mock_transfer_scenario",
     "origin_endpoint_id": "mock_origin_endpoint_id",
     "destination_endpoint_id": "mock_destination_endpoint_id",
     "origin_minion_pool_id": "mock_origin_minion_pool_id",
@@ -149,44 +149,44 @@ class ConductorClientTestCase(test_base.CoriolisRPCClientTestCase):
         }
         self._test(self.client.get_provider_schemas, args)
 
-    def test_execute_replica_tasks(self):
+    def test_execute_transfer_tasks(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "shutdown_instances": False
         }
-        self._test(self.client.execute_replica_tasks, args)
+        self._test(self.client.execute_transfer_tasks, args)
 
-    def test_get_replica_tasks_executions(self):
+    def test_get_transfer_tasks_executions(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "include_tasks": False
         }
-        self._test(self.client.get_replica_tasks_executions, args)
+        self._test(self.client.get_transfer_tasks_executions, args)
 
-    def test_get_replica_tasks_execution(self):
+    def test_get_transfer_tasks_execution(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "execution_id": "mock_execution_id",
             "include_task_info": False
         }
-        self._test(self.client.get_replica_tasks_execution, args)
+        self._test(self.client.get_transfer_tasks_execution, args)
 
-    def test_delete_replica_tasks_execution(self):
+    def test_delete_transfer_tasks_execution(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "execution_id": "mock_execution_id"
         }
-        self._test(self.client.delete_replica_tasks_execution, args)
+        self._test(self.client.delete_transfer_tasks_execution, args)
 
-    def test_cancel_replica_tasks_execution(self):
+    def test_cancel_transfer_tasks_execution(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "execution_id": "mock_execution_id",
             "force": "mock_force"
         }
-        self._test(self.client.cancel_replica_tasks_execution, args)
+        self._test(self.client.cancel_transfer_tasks_execution, args)
 
-    def test_create_instances_replica(self):
+    def test_create_instances_transfer(self):
         args = {
             **INSTANCE_ARGS,
         }
@@ -195,44 +195,44 @@ class ConductorClientTestCase(test_base.CoriolisRPCClientTestCase):
             "user_scripts": None
         }
         args.update(new_args)
-        self._test(self.client.create_instances_replica, args)
+        self._test(self.client.create_instances_transfer, args)
 
-    def test_get_replicas(self):
+    def test_get_transfers(self):
         args = {
             "include_tasks_executions": False,
             "include_task_info": False,
         }
-        self._test(self.client.get_replicas, args)
+        self._test(self.client.get_transfers, args)
 
-    def test_get_replica(self):
+    def test_get_transfer(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "include_task_info": False,
         }
-        self._test(self.client.get_replica, args)
+        self._test(self.client.get_transfer, args)
 
-    def test_delete_replica(self):
+    def test_delete_transfer(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
         }
-        self._test(self.client.delete_replica, args)
+        self._test(self.client.delete_transfer, args)
 
-    def test_delete_replica_disks(self):
+    def test_delete_transfer_disks(self):
         args = {
-            "replica_id": "mock_replica_id"
+            "transfer_id": "mock_transfer_id"
         }
-        self._test(self.client.delete_replica_disks, args)
+        self._test(self.client.delete_transfer_disks, args)
 
-    def test_deploy_replica_instances(self):
+    def test_deploy_transfer_instances(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "instance_osmorphing_minion_pool_mappings": None,
             "clone_disks": False,
             "force": False,
             "skip_os_morphing": False,
             "user_scripts": None
         }
-        self._test(self.client.deploy_replica_instances, args)
+        self._test(self.client.deploy_transfer_instances, args)
 
     def test_set_task_host(self):
         args = {
@@ -288,52 +288,52 @@ class ConductorClientTestCase(test_base.CoriolisRPCClientTestCase):
         self._test(self.client.update_task_progress_update, args,
                    rpc_op='_cast')
 
-    def test_create_replica_schedule(self):
+    def test_create_transfer_schedule(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "schedule": "mock_schedule",
             "enabled": "mock_enabled",
             "exp_date": "mock_exp_date",
             "shutdown_instance": "mock_shutdown_instance"
         }
-        self._test(self.client.create_replica_schedule, args)
+        self._test(self.client.create_transfer_schedule, args)
 
-    def test_update_replica_schedule(self):
+    def test_update_transfer_schedule(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "schedule_id": "mock_schedule_id",
             "updated_values": "mock_updated_values"
         }
-        self._test(self.client.update_replica_schedule, args)
+        self._test(self.client.update_transfer_schedule, args)
 
-    def test_delete_replica_schedule(self):
+    def test_delete_transfer_schedule(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "schedule_id": "mock_schedule_id"
         }
-        self._test(self.client.delete_replica_schedule, args)
+        self._test(self.client.delete_transfer_schedule, args)
 
-    def test_get_replica_schedules(self):
+    def test_get_transfer_schedules(self):
         args = {
-            "replica_id": None,
+            "transfer_id": None,
             "expired": True
         }
-        self._test(self.client.get_replica_schedules, args)
+        self._test(self.client.get_transfer_schedules, args)
 
-    def test_get_replica_schedule(self):
+    def test_get_transfer_schedule(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "schedule_id": "mock_schedule_id",
             "expired": True
         }
-        self._test(self.client.get_replica_schedule, args)
+        self._test(self.client.get_transfer_schedule, args)
 
-    def test_update_replica(self):
+    def test_update_transfer(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "updated_properties": "mock_updated_properties"
         }
-        self._test(self.client.update_replica, args)
+        self._test(self.client.update_transfer, args)
 
     def test_get_diagnostics(self):
         self._test(self.client.get_diagnostics, args={})
@@ -419,35 +419,36 @@ class ConductorClientTestCase(test_base.CoriolisRPCClientTestCase):
         }
         self._test(self.client.delete_service, args)
 
-    def test_confirm_replica_minions_allocation(self):
+    def test_confirm_transfer_minions_allocation(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "minion_machine_allocations": "mock_minion_machine_allocations"
         }
-        self._test(self.client.confirm_replica_minions_allocation, args)
+        self._test(self.client.confirm_transfer_minions_allocation, args)
 
-    def test_report_replica_minions_allocation_error(self):
+    def test_report_transfer_minions_allocation_error(self):
         args = {
-            "replica_id": "mock_replica_id",
+            "transfer_id": "mock_transfer_id",
             "minion_allocation_error_details":
                 "mock_minion_allocation_error_details"
         }
-        self._test(self.client.report_replica_minions_allocation_error, args)
+        self._test(self.client.report_transfer_minions_allocation_error, args)
 
-    def test_confirm_migration_minions_allocation(self):
+    def test_confirm_deployment_minions_allocation(self):
         args = {
-            "migration_id": "mock_migration_id",
+            "deployment_id": "mock_deployment_id",
             "minion_machine_allocations": "mock_minion_machine_allocations"
         }
-        self._test(self.client.confirm_migration_minions_allocation, args)
+        self._test(self.client.confirm_deployment_minions_allocation, args)
 
-    def test_report_migration_minions_allocation_error(self):
+    def test_report_deployment_minions_allocation_error(self):
         args = {
-            "migration_id": "mock_migration_id",
+            "deployment_id": "mock_deployment_id",
             "minion_allocation_error_details":
                 "mock_minion_allocation_error_details"
         }
-        self._test(self.client.report_migration_minions_allocation_error, args)
+        self._test(
+            self.client.report_deployment_minions_allocation_error, args)
 
     def test_add_task_progress_update(self):
         args = {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 218 - 218
coriolis/tests/conductor/rpc/test_server.py


+ 10 - 10
coriolis/tests/db/test_api.py

@@ -6,7 +6,7 @@ import uuid
 
 import ddt
 from oslo_utils import timeutils
-import sqlalchemy.orm
+import sqlalchemy
 
 from coriolis import constants
 from coriolis.db import api
@@ -50,7 +50,7 @@ def create_valid_tasks_execution():
     valid_tasks_execution = models.TasksExecution()
     valid_tasks_execution.id = str(uuid.uuid4())
     valid_tasks_execution.status = DEFAULT_EXECUTION_STATUS
-    valid_tasks_execution.type = constants.EXECUTION_TYPE_REPLICA_EXECUTION
+    valid_tasks_execution.type = constants.EXECUTION_TYPE_TRANSFER_EXECUTION
     valid_tasks_execution.number = 1
 
     valid_task = models.Task()
@@ -59,7 +59,7 @@ def create_valid_tasks_execution():
     valid_task.instance = DEFAULT_INSTANCE
     valid_task.status = constants.TASK_STATUS_RUNNING
     valid_task.task_type = (
-        constants.TASK_TYPE_VALIDATE_REPLICA_SOURCE_INPUTS)
+        constants.TASK_TYPE_VALIDATE_TRANSFER_SOURCE_INPUTS)
     valid_task.index = 1
     valid_task.on_error = False
 
@@ -109,7 +109,7 @@ class BaseDBAPITestCase(test_base.CoriolisBaseTestCase):
         valid_transfer.user_id = project_id
         valid_transfer.project_id = project_id
         valid_transfer.base_id = valid_transfer.id
-        valid_transfer.scenario = constants.REPLICA_SCENARIO_REPLICA
+        valid_transfer.scenario = constants.TRANSFER_SCENARIO_REPLICA
         valid_transfer.last_execution_status = DEFAULT_EXECUTION_STATUS
         valid_transfer.executions = []
         valid_transfer.instances = [DEFAULT_INSTANCE]
@@ -514,7 +514,7 @@ class TransferTasksExecutionDBAPITestCase(BaseDBAPITestCase):
         new_tasks_execution.id = str(uuid.uuid4())
         new_tasks_execution.action = action
         new_tasks_execution.status = constants.EXECUTION_STATUS_UNEXECUTED
-        new_tasks_execution.type = constants.EXECUTION_TYPE_REPLICA_EXECUTION
+        new_tasks_execution.type = constants.EXECUTION_TYPE_TRANSFER_EXECUTION
         new_tasks_execution.number = 0
 
         return new_tasks_execution
@@ -859,7 +859,7 @@ class TransfersDBAPITestCase(BaseDBAPITestCase):
             'transfer')
 
     @staticmethod
-    def _create_dummy_transfer(scenario=constants.REPLICA_SCENARIO_REPLICA,
+    def _create_dummy_transfer(scenario=constants.TRANSFER_SCENARIO_REPLICA,
                                origin_endpoint_id=str(uuid.uuid4()),
                                destination_endpoint_id=str(uuid.uuid4()),
                                project_id=DEFAULT_PROJECT_ID):
@@ -903,7 +903,7 @@ class TransfersDBAPITestCase(BaseDBAPITestCase):
         self.assertTrue(hasattr(result[0], 'info'))
 
     def test_get_transfers_transfer_scenario(self):
-        scenario = constants.REPLICA_SCENARIO_REPLICA
+        scenario = constants.TRANSFER_SCENARIO_REPLICA
         result = api.get_transfers(self.context, transfer_scenario=scenario)
         self.assertTrue(all([res.scenario == scenario for res in result]))
 
@@ -925,7 +925,7 @@ class TransfersDBAPITestCase(BaseDBAPITestCase):
     def test_get_transfer_by_scenario(self):
         result = api.get_transfer(
             self.context, self.valid_transfer.id,
-            transfer_scenario=constants.REPLICA_SCENARIO_REPLICA)
+            transfer_scenario=constants.TRANSFER_SCENARIO_REPLICA)
         self.assertEqual(result, self.valid_transfer)
 
     def test_get_transfer_out_of_user_scope(self):
@@ -947,7 +947,7 @@ class TransfersDBAPITestCase(BaseDBAPITestCase):
             origin_endpoint_id=origin_endpoint_id,
             destination_endpoint_id=dest_endpoint_id)
         dummy_transfer_migration = self._create_dummy_transfer(
-            scenario=constants.REPLICA_SCENARIO_LIVE_MIGRATION,
+            scenario=constants.TRANSFER_SCENARIO_LIVE_MIGRATION,
             origin_endpoint_id=origin_endpoint_id,
             destination_endpoint_id=dest_endpoint_id)
         self.session.add(dummy_transfer_replica)
@@ -959,7 +959,7 @@ class TransfersDBAPITestCase(BaseDBAPITestCase):
 
         result = api.get_endpoint_transfers_count(
             self.context, origin_endpoint_id,
-            transfer_scenario=constants.REPLICA_SCENARIO_REPLICA)
+            transfer_scenario=constants.TRANSFER_SCENARIO_REPLICA)
         self.assertEqual(result, 1)
 
     def test_add_transfer(self):

+ 4 - 2
coriolis/tests/minion_manager/rpc/test_client.py

@@ -125,8 +125,9 @@ class MinionManagerClientTestCase(test_base.CoriolisRPCClientTestCase):
     def test_allocate_minion_machines_for_replica(self):
         args = {"replica": "test_replica"}
         self._test(
-            self.client.allocate_minion_machines_for_replica, args,
+            self.client.allocate_minion_machines_for_transfer, args,
             rpc_op='_cast',
+            server_fun_name='allocate_minion_machines_for_replica'
         )
 
     def test_allocate_minion_machines_for_migration(self):
@@ -136,8 +137,9 @@ class MinionManagerClientTestCase(test_base.CoriolisRPCClientTestCase):
             "include_osmorphing_minions": True
         }
         self._test(
-            self.client.allocate_minion_machines_for_migration, args,
+            self.client.allocate_minion_machines_for_deployment, args,
             rpc_op='_cast',
+            server_fun_name='allocate_minion_machines_for_migration'
         )
 
     def test_deallocate_minion_machine(self):

+ 13 - 13
coriolis/tests/minion_manager/rpc/test_tasks.py

@@ -233,15 +233,15 @@ class ReportMinionAllocationFailureForMigrationTaskTestCase(
         )
 
     @mock.patch.object(
-        ConductorClient, 'report_migration_minions_allocation_error'
+        ConductorClient, 'report_deployment_minions_allocation_error'
     )
     def test__report_machine_allocation_failure(
-            self, mock_report_migration_minions_allocation_error):
+            self, mock_report_depl_minions_alloation_error):
         result = self.task._report_machine_allocation_failure(
             mock.sentinel.context, self.action_id, mock.sentinel.failure_str)
         self.assertIsNone(result)
 
-        mock_report_migration_minions_allocation_error.assert_called_once_with(
+        mock_report_depl_minions_alloation_error.assert_called_once_with(
             mock.sentinel.context, self.action_id, mock.sentinel.failure_str
         )
 
@@ -263,15 +263,15 @@ class ReportMinionAllocationFailureForReplicaTaskTestCase(
         )
 
     @mock.patch.object(
-        ConductorClient, 'report_replica_minions_allocation_error'
+        ConductorClient, 'report_transfer_minions_allocation_error'
     )
     def test__report_machine_allocation_failure(
-            self, mock_report_replica_minions_allocation_error):
+            self, mock_report_transfer_minions_allocation_error):
         result = self.task._report_machine_allocation_failure(
             mock.sentinel.context, self.action_id, mock.sentinel.failure_str)
 
         self.assertIsNone(result)
-        mock_report_replica_minions_allocation_error.assert_called_once_with(
+        mock_report_transfer_minions_allocation_error.assert_called_once_with(
             mock.sentinel.context, self.action_id, mock.sentinel.failure_str
         )
 
@@ -465,7 +465,7 @@ class BaseConfirmMinionAllocationForActionTaskTestCase(
             mock_get_action_label):
         mock_get_minion_machine.return_value = self.minion_machine
         mock_confirm_allocation.side_effect = [
-            exception.InvalidReplicaState(reason='Invalid state')]
+            exception.InvalidTransferState(reason='Invalid state')]
 
         self.assertRaises(
             exception.MinionMachineAllocationFailure,
@@ -500,16 +500,16 @@ class ConfirmMinionAllocationForMigrationTaskTestCase(
         )
 
     @mock.patch.object(
-        ConductorClient, 'confirm_migration_minions_allocation'
+        ConductorClient, 'confirm_deployment_minions_allocation'
     )
     def test__confirm_machine_allocation_for_action(
-            self, mock_confirm_migration_minions_allocation):
+            self, mock_confirm_deployment_minions_allocation):
         result = self.task._confirm_machine_allocation_for_action(
             mock.sentinel.context, self.action_id,
             mock.sentinel.machine_allocations)
 
         self.assertIsNone(result)
-        mock_confirm_migration_minions_allocation.assert_called_once_with(
+        mock_confirm_deployment_minions_allocation.assert_called_once_with(
             mock.sentinel.context, self.action_id,
             mock.sentinel.machine_allocations)
 
@@ -538,16 +538,16 @@ class ConfirmMinionAllocationForReplicaTaskTestCase(
         )
 
     @mock.patch.object(
-        ConductorClient, 'confirm_replica_minions_allocation'
+        ConductorClient, 'confirm_transfer_minions_allocation'
     )
     def test__confirm_machine_allocation_for_action(
-            self, mock_confirm_replica_minions_allocation):
+            self, mock_confirm_transfer_minions_allocation):
         result = self.task._confirm_machine_allocation_for_action(
             mock.sentinel.context, mock.sentinel.action_id,
             mock.sentinel.machine_allocations)
 
         self.assertIsNone(result)
-        mock_confirm_replica_minions_allocation.assert_called_once_with(
+        mock_confirm_transfer_minions_allocation.assert_called_once_with(
             mock.sentinel.context, mock.sentinel.action_id,
             mock.sentinel.machine_allocations)
 

+ 0 - 69
coriolis/tests/replica_cron/test_api.py

@@ -1,69 +0,0 @@
-# Copyright 2024 Cloudbase Solutions Srl
-# All Rights Reserved.
-
-from unittest import mock
-
-from coriolis.replica_cron import api as replicas_cron_module
-from coriolis.tests import test_base
-
-
-class APITestCase(test_base.CoriolisBaseTestCase):
-    """Test suite for the Coriolis API class."""
-
-    def setUp(self):
-        super(APITestCase, self).setUp()
-        self.api = replicas_cron_module.API()
-        self.rpc_client = mock.MagicMock()
-        self.api._rpc_client = self.rpc_client
-        self.ctxt = mock.sentinel.ctxt
-        self.replica_id = mock.sentinel.transfer_id
-        self.schedule_id = mock.sentinel.schedule_id
-
-    def test_create(self):
-        schedule = mock.sentinel.schedule
-        enabled = mock.sentinel.enabled
-        exp_date = mock.sentinel.exp_date
-        shutdown_instance = mock.sentinel.shutdown_instance
-
-        result = self.api.create(
-            self.ctxt, self.replica_id, schedule, enabled, exp_date,
-            shutdown_instance)
-
-        self.rpc_client.create_replica_schedule.assert_called_once_with(
-            self.ctxt, self.replica_id, schedule, enabled, exp_date,
-            shutdown_instance)
-        self.assertEqual(result,
-                         self.rpc_client.create_replica_schedule.return_value)
-
-    def test_get_schedules(self):
-        result = self.api.get_schedules(self.ctxt, self.replica_id)
-
-        self.rpc_client.get_replica_schedules.assert_called_once_with(
-            self.ctxt, self.replica_id, expired=True)
-        self.assertEqual(result,
-                         self.rpc_client.get_replica_schedules.return_value)
-
-    def test_get_schedule(self):
-        result = self.api.get_schedule(self.ctxt, self.replica_id,
-                                       self.schedule_id)
-
-        self.rpc_client.get_replica_schedule.assert_called_once_with(
-            self.ctxt, self.replica_id, self.schedule_id, expired=True)
-        self.assertEqual(result,
-                         self.rpc_client.get_replica_schedule.return_value)
-
-    def test_update(self):
-        update_values = mock.sentinel.update_values
-
-        result = self.api.update(self.ctxt, self.replica_id, self.schedule_id,
-                                 update_values)
-
-        self.rpc_client.update_replica_schedule.assert_called_once_with(
-            self.ctxt, self.replica_id, self.schedule_id, update_values)
-        self.assertEqual(result,
-                         self.rpc_client.update_replica_schedule.return_value)
-
-    def test_delete(self):
-        self.api.delete(self.ctxt, self.replica_id, self.schedule_id)
-        self.rpc_client.delete_replica_schedule.assert_called_once_with(
-            self.ctxt, self.replica_id, self.schedule_id)

+ 21 - 19
coriolis/tests/replica_tasks_executions/test_api.py

@@ -16,50 +16,52 @@ class APITestCase(test_base.CoriolisBaseTestCase):
         self.rpc_client = mock.MagicMock()
         self.api._rpc_client = self.rpc_client
         self.ctxt = mock.sentinel.ctxt
-        self.replica_id = mock.sentinel.transfer_id
+        self.transfer_id = mock.sentinel.transfer_id
         self.execution_id = mock.sentinel.execution_id
 
     def test_create(self):
         shutdown_instances = mock.sentinel.shutdown_instances
 
-        result = self.api.create(self.ctxt, self.replica_id,
+        result = self.api.create(self.ctxt, self.transfer_id,
                                  shutdown_instances)
 
-        self.rpc_client.execute_replica_tasks.assert_called_once_with(
-            self.ctxt, self.replica_id, shutdown_instances)
+        self.rpc_client.execute_transfer_tasks.assert_called_once_with(
+            self.ctxt, self.transfer_id, shutdown_instances)
         self.assertEqual(result,
-                         self.rpc_client.execute_replica_tasks.return_value)
+                         self.rpc_client.execute_transfer_tasks.return_value)
 
     def test_delete(self):
-        self.api.delete(self.ctxt, self.replica_id, self.execution_id)
+        self.api.delete(self.ctxt, self.transfer_id, self.execution_id)
 
-        self.rpc_client.delete_replica_tasks_execution.assert_called_once_with(
-            self.ctxt, self.replica_id, self.execution_id)
+        (self.rpc_client.delete_transfer_tasks_execution
+            .assert_called_once_with(
+                self.ctxt, self.transfer_id, self.execution_id))
 
     def test_cancel(self):
         force = mock.sentinel.force
 
-        self.api.cancel(self.ctxt, self.replica_id, self.execution_id, force)
+        self.api.cancel(self.ctxt, self.transfer_id, self.execution_id, force)
 
-        self.rpc_client.cancel_replica_tasks_execution.assert_called_once_with(
-            self.ctxt, self.replica_id, self.execution_id, force)
+        (self.rpc_client.cancel_transfer_tasks_execution
+            .assert_called_once_with(
+                self.ctxt, self.transfer_id, self.execution_id, force))
 
     def test_get_executions(self):
         include_tasks = mock.sentinel.include_tasks
 
-        result = self.api.get_executions(self.ctxt, self.replica_id,
+        result = self.api.get_executions(self.ctxt, self.transfer_id,
                                          include_tasks)
 
-        self.rpc_client.get_replica_tasks_executions.assert_called_once_with(
-            self.ctxt, self.replica_id, include_tasks)
+        self.rpc_client.get_transfer_tasks_executions.assert_called_once_with(
+            self.ctxt, self.transfer_id, include_tasks)
         self.assertEqual(
-            result, self.rpc_client.get_replica_tasks_executions.return_value)
+            result, self.rpc_client.get_transfer_tasks_executions.return_value)
 
     def test_get_execution(self):
-        result = self.api.get_execution(self.ctxt, self.replica_id,
+        result = self.api.get_execution(self.ctxt, self.transfer_id,
                                         self.execution_id)
 
-        self.rpc_client.get_replica_tasks_execution.assert_called_once_with(
-            self.ctxt, self.replica_id, self.execution_id)
+        self.rpc_client.get_transfer_tasks_execution.assert_called_once_with(
+            self.ctxt, self.transfer_id, self.execution_id)
         self.assertEqual(
-            result, self.rpc_client.get_replica_tasks_execution.return_value)
+            result, self.rpc_client.get_transfer_tasks_execution.return_value)

+ 23 - 23
coriolis/tests/replicas/test_api.py

@@ -16,7 +16,7 @@ class APITestCase(test_base.CoriolisBaseTestCase):
         self.rpc_client = mock.MagicMock()
         self.api._rpc_client = self.rpc_client
         self.ctxt = mock.sentinel.ctxt
-        self.replica_id = mock.sentinel.transfer_id
+        self.transfer_id = mock.sentinel.transfer_id
 
     def test_create(self):
         origin_endpoint_id = mock.sentinel.origin_endpoint_id
@@ -32,57 +32,57 @@ class APITestCase(test_base.CoriolisBaseTestCase):
         storage_mappings = mock.sentinel.storage_mappings
 
         result = self.api.create(
-            self.ctxt, mock.sentinel.replica_scenario,
+            self.ctxt, mock.sentinel.transfer_scenario,
             origin_endpoint_id, destination_endpoint_id,
             origin_minion_pool_id, destination_minion_pool_id,
             instance_osmorphing_minion_pool_mappings, source_environment,
             destination_environment, instances, network_map, storage_mappings)
 
-        self.rpc_client.create_instances_replica.assert_called_once_with(
-            self.ctxt, mock.sentinel.replica_scenario,
+        self.rpc_client.create_instances_transfer.assert_called_once_with(
+            self.ctxt, mock.sentinel.transfer_scenario,
             origin_endpoint_id, destination_endpoint_id,
             origin_minion_pool_id, destination_minion_pool_id,
             instance_osmorphing_minion_pool_mappings, source_environment,
             destination_environment, instances, network_map, storage_mappings,
             None, None)
-        self.assertEqual(result,
-                         self.rpc_client.create_instances_replica.return_value)
+        self.assertEqual(
+            result, self.rpc_client.create_instances_transfer.return_value)
 
     def test_update(self):
         updated_properties = mock.sentinel.updated_properties
 
-        result = self.api.update(self.ctxt, self.replica_id,
+        result = self.api.update(self.ctxt, self.transfer_id,
                                  updated_properties)
 
-        self.rpc_client.update_replica.assert_called_once_with(
-            self.ctxt, self.replica_id, updated_properties)
+        self.rpc_client.update_transfer.assert_called_once_with(
+            self.ctxt, self.transfer_id, updated_properties)
         self.assertEqual(result,
-                         self.rpc_client.update_replica.return_value)
+                         self.rpc_client.update_transfer.return_value)
 
     def test_delete(self):
-        self.api.delete(self.ctxt, self.replica_id)
-        self.rpc_client.delete_replica.assert_called_once_with(
-            self.ctxt, self.replica_id)
+        self.api.delete(self.ctxt, self.transfer_id)
+        self.rpc_client.delete_transfer.assert_called_once_with(
+            self.ctxt, self.transfer_id)
 
     def test_get_replicas(self):
         result = self.api.get_replicas(
             self.ctxt, include_tasks_executions=False, include_task_info=False)
 
-        self.rpc_client.get_replicas.assert_called_once_with(
+        self.rpc_client.get_transfers.assert_called_once_with(
             self.ctxt, False, include_task_info=False)
-        self.assertEqual(result, self.rpc_client.get_replicas.return_value)
+        self.assertEqual(result, self.rpc_client.get_transfers.return_value)
 
     def test_get_replica(self):
-        result = self.api.get_replica(self.ctxt, self.replica_id)
+        result = self.api.get_replica(self.ctxt, self.transfer_id)
 
-        self.rpc_client.get_replica.assert_called_once_with(
-            self.ctxt, self.replica_id, include_task_info=False)
-        self.assertEqual(result, self.rpc_client.get_replica.return_value)
+        self.rpc_client.get_transfer.assert_called_once_with(
+            self.ctxt, self.transfer_id, include_task_info=False)
+        self.assertEqual(result, self.rpc_client.get_transfer.return_value)
 
     def test_delete_disks(self):
-        result = self.api.delete_disks(self.ctxt, self.replica_id)
+        result = self.api.delete_disks(self.ctxt, self.transfer_id)
 
-        self.rpc_client.delete_replica_disks.assert_called_once_with(
-            self.ctxt, self.replica_id)
+        self.rpc_client.delete_transfer_disks.assert_called_once_with(
+            self.ctxt, self.transfer_id)
         self.assertEqual(result,
-                         self.rpc_client.delete_replica_disks.return_value)
+                         self.rpc_client.delete_transfer_disks.return_value)

+ 2 - 2
coriolis/tests/tasks/test_osmorphing_tasks.py

@@ -35,10 +35,10 @@ class OSMorphingTaskTestCase(test_base.CoriolisBaseTestCase):
         destination = mock.MagicMock()
         expected_calls = [
             mock.call.mock_get_provider(
-                origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+                origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
                 mock.sentinel.event_handler),
             mock.call.mock_get_provider(
-                destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+                destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
                 mock.sentinel.event_handler),
         ]
 

+ 31 - 31
coriolis/tests/tasks/test_replica_tasks.py

@@ -75,7 +75,7 @@ class GetInstanceInfoTaskTestCase(test_base.CoriolisBaseTestCase):
             mock.sentinel.destiantion, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         prov_fun.assert_called_once_with(
@@ -103,7 +103,7 @@ class ShutdownInstanceTaskTestCase(test_base.CoriolisBaseTestCase):
             mock.sentinel.destiantion, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, {})
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         prov_fun.assert_called_once_with(
@@ -157,7 +157,7 @@ class ReplicateDisksTaskTestCase(test_base.CoriolisBaseTestCase):
             mock.sentinel.destiantion, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         mock_get_vol_info.assert_called_once_with(task_info)
@@ -196,7 +196,7 @@ class DeployReplicaDisksTaskTestCase(test_base.CoriolisBaseTestCase):
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -235,7 +235,7 @@ class DeleteReplicaSourceDiskSnapshotsTaskTestCase(
             mock.sentinel.destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, origin)
@@ -278,7 +278,7 @@ class DeleteReplicaDisksTaskTestCase(test_base.CoriolisBaseTestCase):
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -346,7 +346,7 @@ class DeployReplicaSourceResourcesTaskTestCase(test_base.CoriolisBaseTestCase):
 
         self.assertEqual(_get_result(), expected_result)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, origin)
@@ -377,7 +377,7 @@ class DeleteReplicaSourceResourcesTaskTestCase(test_base.CoriolisBaseTestCase):
             mock.sentinel.destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, origin)
@@ -400,7 +400,7 @@ class DeleteReplicaSourceResourcesTaskTestCase(test_base.CoriolisBaseTestCase):
             mock.sentinel.destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, origin)
@@ -469,7 +469,7 @@ class DeployReplicaTargetResourcesTaskTestCase(test_base.CoriolisBaseTestCase):
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -511,7 +511,7 @@ class DeleteReplicaTargetResourcesTaskTestCase(test_base.CoriolisBaseTestCase):
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -548,7 +548,7 @@ class DeployReplicaInstanceResourcesTaskTestCase(
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -581,7 +581,7 @@ class FinalizeReplicaInstanceDeploymentTaskTestCase(
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -608,7 +608,7 @@ class FinalizeReplicaInstanceDeploymentTaskTestCase(
                 mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -640,7 +640,7 @@ class CleanupFailedReplicaInstanceDeploymentTaskTestCase(
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -676,7 +676,7 @@ class CreateReplicaDiskSnapshotsTaskTestCase(test_base.CoriolisBaseTestCase):
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -719,7 +719,7 @@ class DeleteReplicaTargetDiskSnapshotsTaskTestCase(
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -761,7 +761,7 @@ class RestoreReplicaDiskSnapshotsTaskTestCase(test_base.CoriolisBaseTestCase):
             destination, task_info, mock.sentinel.event_handler)
         self.assertEqual(result, expected_result)
         mock_get_provider.assert_called_once_with(
-            destination['type'], constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            destination['type'], constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             mock.sentinel.event_handler)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -799,7 +799,7 @@ class ValidateReplicaExecutionSourceInputsTaskTestCase(
         self.assertEqual(result, {})
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_VALIDATE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_VALIDATE_TRANSFER_EXPORT,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         prov_fun.assert_called_once_with(
@@ -824,7 +824,7 @@ class ValidateReplicaExecutionSourceInputsTaskTestCase(
         self.assertEqual(result, {})
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_VALIDATE_REPLICA_EXPORT,
+            origin['type'], constants.PROVIDER_TYPE_VALIDATE_TRANSFER_EXPORT,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         prov_fun.assert_not_called()
@@ -869,7 +869,7 @@ class ValidateReplicaExecutionDestinationInputsTaskTestCase(
         self.assertEqual(result, {})
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT, None,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT, None,
             raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -896,7 +896,7 @@ class ValidateReplicaExecutionDestinationInputsTaskTestCase(
         self.assertEqual(result, {})
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT, None,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT, None,
             raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -920,7 +920,7 @@ class ValidateReplicaExecutionDestinationInputsTaskTestCase(
             destination, task_info, None)
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT, None,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT, None,
             raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -960,7 +960,7 @@ class ValidateReplicaDeploymentParametersTaskTestCase(
             task_info['export_info'], schemas.CORIOLIS_VM_EXPORT_INFO_SCHEMA)
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT,
             mock.sentinel.event_handler, raise_if_not_found=False)
         prov_fun.assert_called_once_with(
             mock.sentinel.ctxt, mock_get_conn_info.return_value,
@@ -991,7 +991,7 @@ class ValidateReplicaDeploymentParametersTaskTestCase(
             task_info['export_info'], schemas.CORIOLIS_VM_EXPORT_INFO_SCHEMA)
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_VALIDATE_REPLICA_IMPORT,
+            constants.PROVIDER_TYPE_VALIDATE_TRANSFER_IMPORT,
             mock.sentinel.event_handler, raise_if_not_found=False)
         prov_fun.assert_not_called()
 
@@ -1058,7 +1058,7 @@ class UpdateSourceReplicaTaskTestCase(test_base.CoriolisBaseTestCase):
 
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_SOURCE_REPLICA_UPDATE,
+            origin['type'], constants.PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_not_called()
         mock_validate_value.assert_not_called()
@@ -1092,7 +1092,7 @@ class UpdateSourceReplicaTaskTestCase(test_base.CoriolisBaseTestCase):
 
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_SOURCE_REPLICA_UPDATE,
+            origin['type'], constants.PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         mock_validate_value.assert_not_called()
@@ -1127,7 +1127,7 @@ class UpdateSourceReplicaTaskTestCase(test_base.CoriolisBaseTestCase):
 
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
-            origin['type'], constants.PROVIDER_TYPE_SOURCE_REPLICA_UPDATE,
+            origin['type'], constants.PROVIDER_TYPE_SOURCE_TRANSFER_UPDATE,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(mock.sentinel.ctxt, origin)
         mock_validate_value.assert_called_once_with(
@@ -1201,7 +1201,7 @@ class UpdateDestinationReplicaTaskTestCase(test_base.CoriolisBaseTestCase):
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE,
+            constants.PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_not_called()
         mock_validate_value.assert_not_called()
@@ -1237,7 +1237,7 @@ class UpdateDestinationReplicaTaskTestCase(test_base.CoriolisBaseTestCase):
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE,
+            constants.PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)
@@ -1276,7 +1276,7 @@ class UpdateDestinationReplicaTaskTestCase(test_base.CoriolisBaseTestCase):
         mock_event_manager.assert_called_once_with(mock.sentinel.event_handler)
         mock_get_provider.assert_called_once_with(
             destination['type'],
-            constants.PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE,
+            constants.PROVIDER_TYPE_DESTINATION_TRANSFER_UPDATE,
             mock.sentinel.event_handler, raise_if_not_found=False)
         mock_get_conn_info.assert_called_once_with(
             mock.sentinel.ctxt, destination)

+ 0 - 0
coriolis/replica_cron/__init__.py → coriolis/tests/transfer_cron/__init__.py


+ 0 - 0
coriolis/replica_cron/rpc/__init__.py → coriolis/tests/transfer_cron/rpc/__init__.py


+ 2 - 2
coriolis/tests/replica_cron/rpc/test_client.py → coriolis/tests/transfer_cron/rpc/test_client.py

@@ -3,8 +3,8 @@
 
 from unittest import mock
 
-from coriolis.replica_cron.rpc import client as rpc_client
 from coriolis.tests import test_base
+from coriolis.transfer_cron.rpc import client as rpc_client
 
 
 class ReplicaCronClientTestCase(test_base.CoriolisBaseTestCase):
@@ -12,7 +12,7 @@ class ReplicaCronClientTestCase(test_base.CoriolisBaseTestCase):
 
     def setUp(self):
         super(ReplicaCronClientTestCase, self).setUp()
-        self.client = rpc_client.ReplicaCronClient()
+        self.client = rpc_client.TransferCronClient()
         self.ctxt = mock.MagicMock()
 
     def test_register(self):

+ 13 - 13
coriolis/tests/replica_cron/rpc/test_server.py → coriolis/tests/transfer_cron/rpc/test_server.py

@@ -9,8 +9,8 @@ import ddt
 
 from coriolis.conductor.rpc import client as rpc_client
 from coriolis import exception
-from coriolis.replica_cron.rpc import server
 from coriolis.tests import test_base
+from coriolis.transfer_cron.rpc import server
 
 
 class TriggerReplicaTestCase(test_base.CoriolisBaseTestCase):
@@ -19,7 +19,7 @@ class TriggerReplicaTestCase(test_base.CoriolisBaseTestCase):
     def test__trigger_replica(self):
         mock_conductor_client = mock.MagicMock()
 
-        mock_conductor_client.execute_replica_tasks.return_value = {
+        mock_conductor_client.execute_transfer_tasks.return_value = {
             'id': mock.sentinel.id,
             'action_id': mock.sentinel.action_id
         }
@@ -29,20 +29,20 @@ class TriggerReplicaTestCase(test_base.CoriolisBaseTestCase):
             mock_conductor_client,
             mock.sentinel.transfer_id, False)
 
-        mock_conductor_client.execute_replica_tasks.assert_called_once_with(
+        mock_conductor_client.execute_transfer_tasks.assert_called_once_with(
             mock.sentinel.ctxt, mock.sentinel.transfer_id, False)
 
         self.assertEqual(
             result, 'Execution %s for Replica %s' % (
                 mock.sentinel.id, mock.sentinel.action_id))
 
-    def test__trigger_replica_invalid_replica_state(self):
+    def test__trigger_transfer_invalid_replica_state(self):
         mock_conductor_client = mock.MagicMock()
 
-        mock_conductor_client.execute_replica_tasks.side_effect = (
-            exception.InvalidReplicaState(reason='test_reason'))
+        mock_conductor_client.execute_transfer_tasks.side_effect = (
+            exception.InvalidTransferState(reason='test_reason'))
 
-        with self.assertLogs('coriolis.replica_cron.rpc.server',
+        with self.assertLogs('coriolis.transfer_cron.rpc.server',
                              level=logging.INFO):
             server._trigger_replica(
                 mock.sentinel.ctxt,
@@ -131,7 +131,7 @@ class ReplicaCronServerEndpointTestCase(test_base.CoriolisBaseTestCase):
             'shutdown_instance': 'test_schedule_shutdown_instance'
         }
 
-        with self.assertLogs('coriolis.replica_cron.rpc.server',
+        with self.assertLogs('coriolis.transfer_cron.rpc.server',
                              level=logging.INFO):
             self.server._register_schedule(test_schedule)
 
@@ -170,7 +170,7 @@ class ReplicaCronServerEndpointTestCase(test_base.CoriolisBaseTestCase):
         ]
         mock_register_schedule.side_effect = Exception('test_exception')
 
-        with self.assertLogs('coriolis.replica_cron.rpc.server',
+        with self.assertLogs('coriolis.transfer_cron.rpc.server',
                              level=logging.ERROR):
                 self.server._init_cron()
 
@@ -180,14 +180,14 @@ class ReplicaCronServerEndpointTestCase(test_base.CoriolisBaseTestCase):
             mock.call({'id': 'schedule2'}, date=mock.ANY),
         ])
 
-    @mock.patch.object(rpc_client.ConductorClient, 'get_replica_schedules')
-    def test__get_all_schedules(self, mock_get_replica_schedules):
+    @mock.patch.object(rpc_client.ConductorClient, 'get_transfer_schedules')
+    def test__get_all_schedules(self, mock_get_transfer_schedules):
         result = self.server._get_all_schedules()
 
-        mock_get_replica_schedules.assert_called_once_with(
+        mock_get_transfer_schedules.assert_called_once_with(
             self.server._admin_ctx, expired=False)
 
-        self.assertEqual(result, mock_get_replica_schedules.return_value)
+        self.assertEqual(result, mock_get_transfer_schedules.return_value)
 
     @mock.patch.object(server.ReplicaCronServerEndpoint, '_register_schedule')
     @mock.patch.object(server.timeutils, 'utcnow')

+ 69 - 0
coriolis/tests/transfer_cron/test_api.py

@@ -0,0 +1,69 @@
+# Copyright 2024 Cloudbase Solutions Srl
+# All Rights Reserved.
+
+from unittest import mock
+
+from coriolis.tests import test_base
+from coriolis.transfer_cron import api as transfers_cron_module
+
+
+class APITestCase(test_base.CoriolisBaseTestCase):
+    """Test suite for the Coriolis API class."""
+
+    def setUp(self):
+        super(APITestCase, self).setUp()
+        self.api = transfers_cron_module.API()
+        self.rpc_client = mock.MagicMock()
+        self.api._rpc_client = self.rpc_client
+        self.ctxt = mock.sentinel.ctxt
+        self.transfer_id = mock.sentinel.transfer_id
+        self.schedule_id = mock.sentinel.schedule_id
+
+    def test_create(self):
+        schedule = mock.sentinel.schedule
+        enabled = mock.sentinel.enabled
+        exp_date = mock.sentinel.exp_date
+        shutdown_instance = mock.sentinel.shutdown_instance
+
+        result = self.api.create(
+            self.ctxt, self.transfer_id, schedule, enabled, exp_date,
+            shutdown_instance)
+
+        self.rpc_client.create_transfer_schedule.assert_called_once_with(
+            self.ctxt, self.transfer_id, schedule, enabled, exp_date,
+            shutdown_instance)
+        self.assertEqual(result,
+                         self.rpc_client.create_transfer_schedule.return_value)
+
+    def test_get_schedules(self):
+        result = self.api.get_schedules(self.ctxt, self.transfer_id)
+
+        self.rpc_client.get_transfer_schedules.assert_called_once_with(
+            self.ctxt, self.transfer_id, expired=True)
+        self.assertEqual(result,
+                         self.rpc_client.get_transfer_schedules.return_value)
+
+    def test_get_schedule(self):
+        result = self.api.get_schedule(self.ctxt, self.transfer_id,
+                                       self.schedule_id)
+
+        self.rpc_client.get_transfer_schedule.assert_called_once_with(
+            self.ctxt, self.transfer_id, self.schedule_id, expired=True)
+        self.assertEqual(result,
+                         self.rpc_client.get_transfer_schedule.return_value)
+
+    def test_update(self):
+        update_values = mock.sentinel.update_values
+
+        result = self.api.update(self.ctxt, self.transfer_id, self.schedule_id,
+                                 update_values)
+
+        self.rpc_client.update_transfer_schedule.assert_called_once_with(
+            self.ctxt, self.transfer_id, self.schedule_id, update_values)
+        self.assertEqual(result,
+                         self.rpc_client.update_transfer_schedule.return_value)
+
+    def test_delete(self):
+        self.api.delete(self.ctxt, self.transfer_id, self.schedule_id)
+        self.rpc_client.delete_transfer_schedule.assert_called_once_with(
+            self.ctxt, self.transfer_id, self.schedule_id)

+ 3 - 3
coriolis/tests/worker/rpc/test_server.py

@@ -957,7 +957,7 @@ class WorkerServerEndpointTestCase(test_base.CoriolisBaseTestCase):
 
         mock_get_provider.assert_called_once_with(
             mock.sentinel.source_platform_name,
-            constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             None,
         )
         mock_validate.assert_called_once_with(
@@ -1140,11 +1140,11 @@ class WorkerServerEndpointTestCase(test_base.CoriolisBaseTestCase):
             "connection_info_schema"
         ),
         (
-            constants.PROVIDER_TYPE_REPLICA_IMPORT,
+            constants.PROVIDER_TYPE_TRANSFER_IMPORT,
             "destination_environment_schema",
         ),
         (
-            constants.PROVIDER_TYPE_REPLICA_EXPORT,
+            constants.PROVIDER_TYPE_TRANSFER_EXPORT,
             "source_environment_schema"
         ),
         (

+ 0 - 0
coriolis/tests/replica_cron/__init__.py → coriolis/transfer_cron/__init__.py


+ 5 - 5
coriolis/replica_cron/api.py → coriolis/transfer_cron/api.py

@@ -10,22 +10,22 @@ class API(object):
 
     def create(self, ctxt, replica_id, schedule, enabled,
                exp_date, shutdown_instance):
-        return self._rpc_client.create_replica_schedule(
+        return self._rpc_client.create_transfer_schedule(
             ctxt, replica_id, schedule, enabled, exp_date,
             shutdown_instance)
 
     def get_schedules(self, ctxt, replica_id, expired=True):
-        return self._rpc_client.get_replica_schedules(
+        return self._rpc_client.get_transfer_schedules(
             ctxt, replica_id, expired=expired)
 
     def get_schedule(self, ctxt, replica_id, schedule_id, expired=True):
-        return self._rpc_client.get_replica_schedule(
+        return self._rpc_client.get_transfer_schedule(
             ctxt, replica_id, schedule_id, expired=expired)
 
     def update(self, ctxt, replica_id, schedule_id, update_values):
-        return self._rpc_client.update_replica_schedule(
+        return self._rpc_client.update_transfer_schedule(
             ctxt, replica_id, schedule_id, update_values)
 
     def delete(self, ctxt, replica_id, schedule_id):
-        self._rpc_client.delete_replica_schedule(
+        self._rpc_client.delete_transfer_schedule(
             ctxt, replica_id, schedule_id)

+ 0 - 0
coriolis/tests/replica_cron/rpc/__init__.py → coriolis/transfer_cron/rpc/__init__.py


+ 3 - 3
coriolis/replica_cron/rpc/client.py → coriolis/transfer_cron/rpc/client.py

@@ -9,11 +9,11 @@ from coriolis import rpc
 VERSION = "1.0"
 
 
-class ReplicaCronClient(rpc.BaseRPCClient):
-    def __init__(self, topic=constants.REPLICA_CRON_MAIN_MESSAGING_TOPIC):
+class TransferCronClient(rpc.BaseRPCClient):
+    def __init__(self, topic=constants.TRANSFER_CRON_MAIN_MESSAGING_TOPIC):
         target = messaging.Target(
             topic=topic, version=VERSION)
-        super(ReplicaCronClient, self).__init__(target)
+        super(TransferCronClient, self).__init__(target)
 
     def register(self, ctxt, schedule):
         self._call(ctxt, 'register', schedule=schedule)

+ 3 - 3
coriolis/replica_cron/rpc/server.py → coriolis/transfer_cron/rpc/server.py

@@ -19,12 +19,12 @@ VERSION = "1.0"
 
 def _trigger_replica(ctxt, conductor_client, replica_id, shutdown_instance):
     try:
-        execution = conductor_client.execute_replica_tasks(
+        execution = conductor_client.execute_transfer_tasks(
             ctxt, replica_id, shutdown_instance)
         result_msg = 'Execution %s for Replica %s' % (
             execution.get('id'), execution.get('action_id'))
         return result_msg
-    except (exception.InvalidReplicaState,
+    except (exception.InvalidTransferState,
             exception.InvalidActionTasksExecutionState):
         LOG.info("A replica or migration already running")
 
@@ -81,7 +81,7 @@ class ReplicaCronServerEndpoint(object):
         self._cron.start()
 
     def _get_all_schedules(self):
-        schedules = self._rpc_client.get_replica_schedules(
+        schedules = self._rpc_client.get_transfer_schedules(
             self._admin_ctx, expired=False)
         return schedules
 

+ 3 - 3
coriolis/worker/rpc/server.py

@@ -513,7 +513,7 @@ class WorkerServerEndpoint(object):
     def validate_endpoint_source_environment(
             self, ctxt, platform_name, source_env):
         provider = providers_factory.get_provider(
-            platform_name, constants.PROVIDER_TYPE_REPLICA_EXPORT, None)
+            platform_name, constants.PROVIDER_TYPE_TRANSFER_EXPORT, None)
         source_env_schema = provider.get_source_environment_schema()
 
         is_valid = True
@@ -608,11 +608,11 @@ class WorkerServerEndpoint(object):
             schema = provider.get_connection_info_schema()
             schemas["connection_info_schema"] = schema
 
-        if provider_type == constants.PROVIDER_TYPE_REPLICA_IMPORT:
+        if provider_type == constants.PROVIDER_TYPE_TRANSFER_IMPORT:
             schema = provider.get_target_environment_schema()
             schemas["destination_environment_schema"] = schema
 
-        if provider_type == constants.PROVIDER_TYPE_REPLICA_EXPORT:
+        if provider_type == constants.PROVIDER_TYPE_TRANSFER_EXPORT:
             schema = provider.get_source_environment_schema()
             schemas["source_environment_schema"] = schema
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä