- config:
    has_origin_minion_pool: True
    has_destination_minion_pool: True
  expected_tasks:
    - type: 'VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY'
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: 'CREATE_INSTANCE_DISKS'
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY'
      depends_on: ['VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: 'ATTACH_VOLUMES_TO_DESTINATION_MINION'
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'CREATE_INSTANCE_DISKS']
    - type: 'REPLICATE_DISKS'
      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
    - type: 'REPLICATE_DISKS'
      depends_on: ['REPLICATE_DISKS']
    - type: 'RELEASE_SOURCE_MINION'
      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'REPLICATE_DISKS']
      on_error: True
    - type: 'CLEANUP_INSTANCE_SOURCE_STORAGE'
      depends_on: ['REPLICATE_DISKS', 'RELEASE_SOURCE_MINION']
      on_error: True
    - type: 'DETACH_VOLUMES_FROM_DESTINATION_MINION'
      depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION', 'REPLICATE_DISKS']
      on_error: True
    - type: 'RELEASE_DESTINATION_MINION'
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_DESTINATION_MINION']
      on_error: True
    - type: 'DEPLOY_INSTANCE_RESOURCES'
      depends_on: ['REPLICATE_DISKS', 'RELEASE_DESTINATION_MINION']
    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: 'CLEANUP_INSTANCE_TARGET_STORAGE'
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'RELEASE_DESTINATION_MINION', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
      on_error_only: True

- config:
    has_origin_minion_pool: False
    has_destination_minion_pool: True
  expected_tasks:
    - type: 'DEPLOY_MIGRATION_SOURCE_RESOURCES'
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: 'CREATE_INSTANCE_DISKS'
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: 'VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY'
      depends_on: ['VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: 'ATTACH_VOLUMES_TO_DESTINATION_MINION'
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'CREATE_INSTANCE_DISKS']
    - type: 'REPLICATE_DISKS'
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
    - type: 'REPLICATE_DISKS'
      depends_on: ['REPLICATE_DISKS']
    - type: 'DELETE_MIGRATION_SOURCE_RESOURCES'
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: 'CLEANUP_INSTANCE_SOURCE_STORAGE'
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: 'DETACH_VOLUMES_FROM_DESTINATION_MINION'
      depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION', 'REPLICATE_DISKS']
      on_error: True
    - type: 'RELEASE_DESTINATION_MINION'
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_DESTINATION_MINION']
      on_error: True
    - type: 'DEPLOY_INSTANCE_RESOURCES'
      depends_on: ['REPLICATE_DISKS', 'RELEASE_DESTINATION_MINION']
    - type: 'FINALIZE_INSTANCE_DEPLOYMENT'
      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
    - type: 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT'
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: 'CLEANUP_INSTANCE_TARGET_STORAGE'
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'RELEASE_DESTINATION_MINION', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
      on_error_only: True

- config:
    has_origin_minion_pool: False
    has_destination_minion_pool: False
  expected_tasks:
    - type: DEPLOY_MIGRATION_SOURCE_RESOURCES
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: DEPLOY_MIGRATION_TARGET_RESOURCES
      depends_on: ['CREATE_INSTANCE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'DEPLOY_MIGRATION_TARGET_RESOURCES']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: DELETE_MIGRATION_SOURCE_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: DELETE_MIGRATION_TARGET_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_TARGET_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_TARGET_RESOURCES']
    - type: FINALIZE_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
    - type: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'DELETE_MIGRATION_TARGET_RESOURCES', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
      on_error_only: True

- config:
    skip_os_morphing: False
    has_origin_minion_pool: True
    has_destination_minion_pool: True
  expected_tasks:
    - type: VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY
      depends_on: ['VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: ATTACH_VOLUMES_TO_DESTINATION_MINION
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'CREATE_INSTANCE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'ATTACH_VOLUMES_TO_DESTINATION_MINION']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: RELEASE_SOURCE_MINION
      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'RELEASE_SOURCE_MINION']
      on_error: True
    - type: DETACH_VOLUMES_FROM_DESTINATION_MINION
      depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION', 'REPLICATE_DISKS']
      on_error: True
    - type: RELEASE_DESTINATION_MINION
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_DESTINATION_MINION']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'RELEASE_DESTINATION_MINION']
    - 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: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'RELEASE_DESTINATION_MINION', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT', 'DELETE_OS_MORPHING_RESOURCES']
      on_error_only: True

- config:
    skip_os_morphing: False
    has_os_morphing_pool: True
    has_origin_minion_pool: True
    has_destination_minion_pool: True
  expected_tasks:
    - type: VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY
      depends_on: ['VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: ATTACH_VOLUMES_TO_DESTINATION_MINION
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'CREATE_INSTANCE_DISKS']
    - type: VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY
      depends_on: ['VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: REPLICATE_DISKS
      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'ATTACH_VOLUMES_TO_DESTINATION_MINION', 'VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: RELEASE_SOURCE_MINION
      depends_on: ['VALIDATE_SOURCE_MINION_POOL_COMPATIBILITY', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'RELEASE_SOURCE_MINION']
      on_error: True
    - type: DETACH_VOLUMES_FROM_DESTINATION_MINION
      depends_on: ['ATTACH_VOLUMES_TO_DESTINATION_MINION', 'REPLICATE_DISKS']
      on_error: True
    - type: RELEASE_DESTINATION_MINION
      depends_on: ['VALIDATE_DESTINATION_MINION_POOL_COMPATIBILITY', 'DETACH_VOLUMES_FROM_DESTINATION_MINION']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'RELEASE_DESTINATION_MINION']
    - 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: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'RELEASE_DESTINATION_MINION', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT', 'RELEASE_OSMORPHING_MINION']
      on_error_only: True

- config:
    skip_os_morphing: False
    has_os_morphing_pool: True
  expected_tasks:
    - type: DEPLOY_MIGRATION_SOURCE_RESOURCES
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: DEPLOY_MIGRATION_TARGET_RESOURCES
      depends_on: ['CREATE_INSTANCE_DISKS']
    - type: VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY
      depends_on: ['VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: REPLICATE_DISKS
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'DEPLOY_MIGRATION_TARGET_RESOURCES', 'VALIDATE_OSMORPHING_MINION_POOL_COMPATIBILITY']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: DELETE_MIGRATION_SOURCE_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: DELETE_MIGRATION_TARGET_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_TARGET_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_TARGET_RESOURCES']
    - 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: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'DELETE_MIGRATION_TARGET_RESOURCES', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT', 'RELEASE_OSMORPHING_MINION']
      on_error_only: True

- config:
    has_os_morphing_pool: True
  expected_tasks:
    - type: DEPLOY_MIGRATION_SOURCE_RESOURCES
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: DEPLOY_MIGRATION_TARGET_RESOURCES
      depends_on: ['CREATE_INSTANCE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'DEPLOY_MIGRATION_TARGET_RESOURCES']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: DELETE_MIGRATION_SOURCE_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: DELETE_MIGRATION_TARGET_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_TARGET_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_TARGET_RESOURCES']
    - type: FINALIZE_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
    - type: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'DELETE_MIGRATION_TARGET_RESOURCES', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
      on_error_only: True

- config:
    shutdown_instances: True
  expected_tasks:
    - type: DEPLOY_MIGRATION_SOURCE_RESOURCES
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: DEPLOY_MIGRATION_TARGET_RESOURCES
      depends_on: ['CREATE_INSTANCE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'DEPLOY_MIGRATION_TARGET_RESOURCES']
    - type: SHUTDOWN_INSTANCE
      depends_on: ['REPLICATE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['SHUTDOWN_INSTANCE']
    - type: DELETE_MIGRATION_SOURCE_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: DELETE_MIGRATION_TARGET_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_TARGET_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_TARGET_RESOURCES']
    - type: FINALIZE_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
    - type: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'DELETE_MIGRATION_TARGET_RESOURCES', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
      on_error_only: True

- config:
    skip_os_morphing: False
  expected_tasks:
    - type: DEPLOY_MIGRATION_SOURCE_RESOURCES
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: DEPLOY_MIGRATION_TARGET_RESOURCES
      depends_on: ['CREATE_INSTANCE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'DEPLOY_MIGRATION_TARGET_RESOURCES']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: DELETE_MIGRATION_SOURCE_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: DELETE_MIGRATION_TARGET_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_TARGET_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_TARGET_RESOURCES']
    - 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: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'DELETE_MIGRATION_TARGET_RESOURCES', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT', 'DELETE_OS_MORPHING_RESOURCES']
      on_error_only: True

- config:
    get_optimal_flavor: True
  expected_tasks:
    - type: DEPLOY_MIGRATION_SOURCE_RESOURCES
      depends_on: ['GET_INSTANCE_INFO', 'VALIDATE_MIGRATION_SOURCE_INPUTS']
    - type: CREATE_INSTANCE_DISKS
      depends_on: ['VALIDATE_MIGRATION_SOURCE_INPUTS', 'VALIDATE_MIGRATION_DESTINATION_INPUTS']
    - type: DEPLOY_MIGRATION_TARGET_RESOURCES
      depends_on: ['CREATE_INSTANCE_DISKS']
    - type: REPLICATE_DISKS
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'DEPLOY_MIGRATION_TARGET_RESOURCES']
    - type: REPLICATE_DISKS
      depends_on: ['REPLICATE_DISKS']
    - type: DELETE_MIGRATION_SOURCE_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_SOURCE_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: CLEANUP_INSTANCE_SOURCE_STORAGE
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_SOURCE_RESOURCES']
      on_error: True
    - type: DELETE_MIGRATION_TARGET_RESOURCES
      depends_on: ['DEPLOY_MIGRATION_TARGET_RESOURCES', 'REPLICATE_DISKS']
      on_error: True
    - type: DEPLOY_INSTANCE_RESOURCES
      depends_on: ['REPLICATE_DISKS', 'DELETE_MIGRATION_TARGET_RESOURCES']
    - type: GET_OPTIMAL_FLAVOR
      depends_on: ['DEPLOY_INSTANCE_RESOURCES']
    - type: FINALIZE_INSTANCE_DEPLOYMENT
      depends_on: ['GET_OPTIMAL_FLAVOR']
    - type: CLEANUP_FAILED_INSTANCE_DEPLOYMENT
      depends_on: ['DEPLOY_INSTANCE_RESOURCES', 'FINALIZE_INSTANCE_DEPLOYMENT']
      on_error_only: True
    - type: CLEANUP_INSTANCE_TARGET_STORAGE
      depends_on: ['CREATE_INSTANCE_DISKS', 'CLEANUP_INSTANCE_SOURCE_STORAGE', 'DELETE_MIGRATION_TARGET_RESOURCES', 'CLEANUP_FAILED_INSTANCE_DEPLOYMENT']
      on_error_only: True