From f94ab7fc3595129095b76787a7026b36104cd0d1 Mon Sep 17 00:00:00 2001 From: Mihaela Balutoiu Date: Wed, 15 Jan 2025 14:20:20 +0200 Subject: [PATCH] Update api docs Signed-off-by: Mihaela Balutoiu --- .../deployment-cancel-req.json} | 0 .../deployment-from-transfer-req.json | 11 + ...nstack-deployment-from-transfer-resp.json} | 28 +- .../openstack-deployment-get-resp.json} | 103 ++- ...penstack-deployment-list-detail-resp.json} | 28 +- .../endpoint/endpoint-get-resp-secret.json | 4 +- .../endpoint/endpoint-list-resp.json | 4 +- .../openstack-endpoint-create-req.json | 4 +- ...ndpoint-destination-options-list-resp.json | 9 +- .../endpoint/openstack-endpoint-get-resp.json | 4 +- .../openstack-endpoint-update-req.json | 4 +- .../openstack-endpoint-update-resp.json | 4 +- .../migration/migration-from-replica-req.json | 9 - .../openstack-migration-create-req.json | 41 - .../openstack-migration-create-resp.json | 279 ------- .../service/service-create-req.json | 4 +- .../service/service-update-req.json | 4 +- .../openstack-transfer-create-req.json} | 22 +- .../openstack-transfer-create-resp.json} | 25 +- ...openstack-transfer-disks-delete-resp.json} | 8 +- ...penstack-transfer-execution-get-resp.json} | 22 +- .../openstack-transfer-execution-resp.json} | 23 +- ...enstack-transfer-execution-show-resp.json} | 28 +- .../openstack-transfer-get-resp.json} | 16 +- .../transfer-disks-delete-req.json} | 0 .../transfer-execution-cancel-req.json} | 0 .../transfer-execution-list-resp.json} | 6 +- .../transfer-execution-req.json} | 0 .../transfer-list-resp.json} | 13 +- .../transfer-schedule-create-req.json} | 0 .../transfer-schedule-create-resp.json} | 2 +- .../transfer-schedule-list-resp.json} | 6 +- .../transfer-schedule-show-resp.json} | 2 +- .../transfer-schedule-update-req.json} | 0 .../transfer-schedule-update-resp.json} | 2 +- .../transfer-update-req.json} | 2 +- .../transfer-update-resp.json} | 19 +- coriolis/api-refs/source/deployment.inc | 254 ++++++ coriolis/api-refs/source/index.rst | 4 +- coriolis/api-refs/source/migration.inc | 321 -------- coriolis/api-refs/source/parameters.yaml | 776 +++++++++--------- coriolis/api-refs/source/replica.inc | 767 ----------------- coriolis/api-refs/source/transfer.inc | 774 +++++++++++++++++ 43 files changed, 1688 insertions(+), 1944 deletions(-) rename coriolis/api-refs/api_samples/{migration/migration-cancel-req.json => deployment/deployment-cancel-req.json} (100%) create mode 100644 coriolis/api-refs/api_samples/deployment/deployment-from-transfer-req.json rename coriolis/api-refs/api_samples/{migration/openstack-migration-from-replica-resp.json => deployment/openstack-deployment-from-transfer-resp.json} (92%) rename coriolis/api-refs/api_samples/{migration/openstack-migration-get-resp.json => deployment/openstack-deployment-get-resp.json} (88%) rename coriolis/api-refs/api_samples/{migration/openstack-migration-list-detail-resp.json => deployment/openstack-deployment-list-detail-resp.json} (90%) delete mode 100644 coriolis/api-refs/api_samples/migration/migration-from-replica-req.json delete mode 100644 coriolis/api-refs/api_samples/migration/openstack-migration-create-req.json delete mode 100644 coriolis/api-refs/api_samples/migration/openstack-migration-create-resp.json rename coriolis/api-refs/api_samples/{replica/openstack-replica-create-req.json => transfer/openstack-transfer-create-req.json} (59%) rename coriolis/api-refs/api_samples/{replica/openstack-replica-create-resp.json => transfer/openstack-transfer-create-resp.json} (71%) rename coriolis/api-refs/api_samples/{replica/openstack-replica-disks-delete-resp.json => transfer/openstack-transfer-disks-delete-resp.json} (92%) rename coriolis/api-refs/api_samples/{replica/openstack-replica-execution-get-resp.json => transfer/openstack-transfer-execution-get-resp.json} (95%) rename coriolis/api-refs/api_samples/{replica/openstack-replica-execution-resp.json => transfer/openstack-transfer-execution-resp.json} (91%) rename coriolis/api-refs/api_samples/{replica/openstack-replica-execution-show-resp.json => transfer/openstack-transfer-execution-show-resp.json} (94%) rename coriolis/api-refs/api_samples/{replica/openstack-replica-get-resp.json => transfer/openstack-transfer-get-resp.json} (88%) rename coriolis/api-refs/api_samples/{replica/replica-disks-delete-req.json => transfer/transfer-disks-delete-req.json} (100%) rename coriolis/api-refs/api_samples/{replica/replica-execution-cancel-req.json => transfer/transfer-execution-cancel-req.json} (100%) rename coriolis/api-refs/api_samples/{replica/replica-execution-list-resp.json => transfer/transfer-execution-list-resp.json} (90%) rename coriolis/api-refs/api_samples/{replica/replica-execution-req.json => transfer/transfer-execution-req.json} (100%) rename coriolis/api-refs/api_samples/{replica/replica-list-resp.json => transfer/transfer-list-resp.json} (92%) rename coriolis/api-refs/api_samples/{replica/replica-schedule-create-req.json => transfer/transfer-schedule-create-req.json} (100%) rename coriolis/api-refs/api_samples/{replica/replica-schedule-create-resp.json => transfer/transfer-schedule-create-resp.json} (87%) rename coriolis/api-refs/api_samples/{replica/replica-schedule-list-resp.json => transfer/transfer-schedule-list-resp.json} (87%) rename coriolis/api-refs/api_samples/{replica/replica-schedule-show-resp.json => transfer/transfer-schedule-show-resp.json} (87%) rename coriolis/api-refs/api_samples/{replica/replica-schedule-update-req.json => transfer/transfer-schedule-update-req.json} (100%) rename coriolis/api-refs/api_samples/{replica/replica-schedule-update-resp.json => transfer/transfer-schedule-update-resp.json} (87%) rename coriolis/api-refs/api_samples/{replica/replica-update-req.json => transfer/transfer-update-req.json} (85%) rename coriolis/api-refs/api_samples/{replica/replica-update-resp.json => transfer/transfer-update-resp.json} (89%) create mode 100644 coriolis/api-refs/source/deployment.inc delete mode 100644 coriolis/api-refs/source/migration.inc delete mode 100644 coriolis/api-refs/source/replica.inc create mode 100644 coriolis/api-refs/source/transfer.inc diff --git a/coriolis/api-refs/api_samples/migration/migration-cancel-req.json b/coriolis/api-refs/api_samples/deployment/deployment-cancel-req.json similarity index 100% rename from coriolis/api-refs/api_samples/migration/migration-cancel-req.json rename to coriolis/api-refs/api_samples/deployment/deployment-cancel-req.json diff --git a/coriolis/api-refs/api_samples/deployment/deployment-from-transfer-req.json b/coriolis/api-refs/api_samples/deployment/deployment-from-transfer-req.json new file mode 100644 index 000000000..9e9559378 --- /dev/null +++ b/coriolis/api-refs/api_samples/deployment/deployment-from-transfer-req.json @@ -0,0 +1,11 @@ +{ + "deployment": { + "clone_disks": true, + "force": false, + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "skip_os_morphing": false, + "instance_osmorphing_minion_pool_mappings": { + "instance1": "morphing_pool" + } + } +} diff --git a/coriolis/api-refs/api_samples/migration/openstack-migration-from-replica-resp.json b/coriolis/api-refs/api_samples/deployment/openstack-deployment-from-transfer-resp.json similarity index 92% rename from coriolis/api-refs/api_samples/migration/openstack-migration-from-replica-resp.json rename to coriolis/api-refs/api_samples/deployment/openstack-deployment-from-transfer-resp.json index 7d8cde6da..968ee2926 100644 --- a/coriolis/api-refs/api_samples/migration/openstack-migration-from-replica-resp.json +++ b/coriolis/api-refs/api_samples/deployment/openstack-deployment-from-transfer-resp.json @@ -1,5 +1,5 @@ { - "migration": { + "deployment": { "created_at": "2019-07-11T13:01:03.000000", "updated_at": null, "deleted_at": null, @@ -22,8 +22,10 @@ "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "migration", - "instances": ["ubuntu-xenial"], + "type": "deployment", + "instances": [ + "ubuntu-xenial" + ], "reservation_id": null, "notes": null, "origin_endpoint_id": "5a276274-f964-4c07-aec4-01a7971d9eea", @@ -33,14 +35,16 @@ "storage_mappings": {}, "source_environment": {}, "id": "480a4ba6-db63-43cb-a91b-4ef65665cd26", - "replica_id": "78f89897-fca0-465c-bf0c-b23b36dfd619", - "status": "RUNNING", + "transfer_id": "78f89897-fca0-465c-bf0c-b23b36dfd619", "last_execution_status": "UNEXECUTED", "origin_minion_pool_id": null, "destination_minion_pool_id": "a5e00fd3-42ac-4570-898b-5bbee0ff4acb", - "instance_osmorphing_minion_pool_mappings": {"instance1": "morphing_pool"}, + "instance_osmorphing_minion_pool_mappings": { + "instance1": "morphing_pool" + }, + "user_scripts": {}, + "transfer_scenario_type": "replica", "shutdown_instances": false, - "replication_count": 2, "tasks": [ { "created_at": "2019-07-11T13:01:03.000000", @@ -53,7 +57,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "VALIDATE_REPLICA_DEPLOYMENT_INPUTS", + "task_type": "VALIDATE_DEPLOYMENT_INPUTS", "exception_details": null, "depends_on": null, "on_error": false, @@ -91,7 +95,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "CREATE_REPLICA_DISK_SNAPSHOTS", + "task_type": "CREATE_TRANSFER_DISK_SNAPSHOTS", "exception_details": null, "depends_on": [ "9a1cfa58-553f-41ba-ac98-e79d2072051a", @@ -112,7 +116,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DEPLOY_REPLICA_INSTANCE", + "task_type": "DEPLOY_INSTANCE_RESOURCES", "exception_details": null, "depends_on": [ "2466c7c1-a228-48a0-a805-38903accec46" @@ -192,7 +196,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "FINALIZE_REPLICA_INSTANCE_DEPLOYMENT", + "task_type": "FINALIZE_INSTANCE_DEPLOYMENT", "exception_details": null, "depends_on": [ "8892d1cf-0120-4e3f-9563-c0ee8cb278e8" @@ -212,7 +216,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DELETE_REPLICA_DISK_SNAPSHOTS", + "task_type": "DELETE_TRANSFER_TARGET_DISK_SNAPSHOTS", "exception_details": null, "depends_on": [ "86048ea8-9520-4797-877b-66934e1723ac" diff --git a/coriolis/api-refs/api_samples/migration/openstack-migration-get-resp.json b/coriolis/api-refs/api_samples/deployment/openstack-deployment-get-resp.json similarity index 88% rename from coriolis/api-refs/api_samples/migration/openstack-migration-get-resp.json rename to coriolis/api-refs/api_samples/deployment/openstack-deployment-get-resp.json index aa2c38460..24e03b75d 100644 --- a/coriolis/api-refs/api_samples/migration/openstack-migration-get-resp.json +++ b/coriolis/api-refs/api_samples/deployment/openstack-deployment-get-resp.json @@ -1,5 +1,5 @@ { - "migration": { + "deployment": { "created_at": "2019-07-10T07:24:09.000000", "updated_at": "2019-07-10T08:39:05.000000", "deleted_at": null, @@ -8,44 +8,99 @@ "user_id": "7cf9b4745d514517b3eae440438136bc", "project_id": "ffc16db2011e41f28152897c279b6bcc", "destination_environment": { - "migr_flavor_name": "m1.small", - "storage_mappings": { - "lvmdriver-1": "lvm-1" - }, - "keypair_name": "new-key", - "delete_disks_on_vm_termination": false, - "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" - }, - "migr_network": "provider-net", - "port_reuse_policy": "keep_mac", - "set_dhcp": true, - "network_map": { - "private": "provider-net" + "migr_flavor_name": "m1.small", + "storage_mappings": { + "lvmdriver-1": "lvm-1" + }, + "keypair_name": "new-key", + "delete_disks_on_vm_termination": false, + "migr_image_map": { + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + }, + "migr_network": "provider-net", + "port_reuse_policy": "keep_mac", + "set_dhcp": true, + "network_map": { + "private": "provider-net" } }, - "type": "migration", - "instances": ["windows"], + "type": "deployment", + "instances": [ + "windows" + ], "reservation_id": null, "notes": "", "origin_endpoint_id": "b59051a2-bbf3-4fb7-a1eb-539db55339dc", "destination_endpoint_id": "6258fa20-5d1f-44fa-ae12-c94122263fa3", - "transfer_result": null, + "transfer_result": { + "windows": { + "num_cpu": 1, + "num_cores_per_socket": 1, + "memory_mb": 1024, + "nested_virtualization": false, + "name": "windows-instance", + "id": "00ea28b8-4760-4890-bd79-227b7327a209", + "flavor_name": "ds1G", + "os_type": "linux", + "firmware_type": "BIOS", + "secure_boot": false, + "devices": { + "nics": [ + { + "name": "8ea26385-04e5-418b-9ca7-e36c36d6c69b", + "id": "8ea26385-04e5-418b-9ca7-e36c36d6c69b", + "mac_address": "00:50:56:9c:23:b6", + "ip_addresses": [ + "10.0.0.34" + ], + "network_id": "0e83bf34-9cc7-4580-9189-a9d9c3c7abb8", + "network_name": "private" + } + ], + "disks": [ + { + "format": "raw", + "guest_device": "/dev/vda", + "size_bytes": 1073741824, + "path": "", + "id": "6eb6f752-4ae5-450d-995f-436ecc48f400", + "storage_backend_identifier": "lvmdriver-1" + } + ], + "cdroms": [], + "serial_ports": [], + "floppies": [], + "controllers": [] + } + } + }, "network_map": { "private": "provider-net" }, - "storage_mappings": {}, + "storage_mappings": { + "backend_mappings": [ + { + "source": "afsan1", + "destination": "lvmdriver-1" + } + ], + "disk_mappings": [ + { + "disk_id": "3000", + "destination": "lvmdriver-1" + } + ] + }, "source_environment": {}, "id": "1e31443d-5eb1-403f-9f15-c67a2c372bc3", - "replica_id": null, - "status": "COMPLETED", + "transfer_id": "20281dd8-b00e-4801-99e4-39d7fae7ed76", "last_execution_status": "COMPLETED", "origin_minion_pool_id": null, "destination_minion_pool_id": "a5e00fd3-42ac-4570-898b-5bbee0ff4acb", "instance_osmorphing_minion_pool_mappings": {}, + "transfer_scenario_type": "replica", "shutdown_instances": false, - "replication_count": 2, "tasks": [ { "created_at": "2019-07-10T07:24:09.000000", @@ -58,7 +113,7 @@ "host": "coriolis-worker", "process_id": 11, "status": "COMPLETED", - "task_type": "VALIDATE_MIGRATION_INPUTS", + "task_type": "VALIDATE_DEPLOYMENT_INPUTS", "exception_details": null, "depends_on": null, "on_error": false, diff --git a/coriolis/api-refs/api_samples/migration/openstack-migration-list-detail-resp.json b/coriolis/api-refs/api_samples/deployment/openstack-deployment-list-detail-resp.json similarity index 90% rename from coriolis/api-refs/api_samples/migration/openstack-migration-list-detail-resp.json rename to coriolis/api-refs/api_samples/deployment/openstack-deployment-list-detail-resp.json index fb5a26345..9b83bbdd1 100644 --- a/coriolis/api-refs/api_samples/migration/openstack-migration-list-detail-resp.json +++ b/coriolis/api-refs/api_samples/deployment/openstack-deployment-list-detail-resp.json @@ -1,5 +1,5 @@ { - "migrations": [ + "deployments": [ { "created_at": "2019-08-20T12:32:31.000000", "updated_at": "2019-08-20T12:32:42.000000", @@ -37,7 +37,8 @@ "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "migration", + "type": "deployment", + "executions": [], "instances": [ "CI/openwrt" ], @@ -65,14 +66,17 @@ }, "source_environment": {}, "id": "65bd70e4-c4ab-4f60-9d78-779c0b58c2ab", - "replica_id": null, - "status": "ERROR", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "last_execution_status": "COMPLETED", "origin_minion_pool_id": null, "destination_minion_pool_id": "a5e00fd3-42ac-4570-898b-5bbee0ff4acb", "instance_osmorphing_minion_pool_mappings": {}, - "shutdown_instances": false, - "replication_count": 2 + "user_scripts": { + "global": {}, + "instances": {} + }, + "transfer_scenario_type": "replica", + "shutdown_instances": false }, { "created_at": "2019-08-22T08:29:33.000000", @@ -107,7 +111,7 @@ }, "migr_network": "private" }, - "type": "migration", + "type": "deployment", "instances": [ "CI/openwrt" ], @@ -124,6 +128,7 @@ "name": "openwrt", "id": "00ea28b8-4760-4890-bd79-227b7327a209", "flavor_name": "ds1G", + "secure_boot": false, "devices": { "nics": [ { @@ -175,10 +180,13 @@ "source_environment": { "vixdisklib_compatibility_version": "6.0" }, + "user_scripts": { + "global": {}, + "instances": {} + }, "id": "9566af98-2c89-4969-ad73-a416e8a8a5ce", - "replica_id": "96d71f92-1cbd-48cb-98aa-06ce8cbf89cf", - "status": "COMPLETED", - "replication_count": 2 + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_scenario_type": "replica" } ] } diff --git a/coriolis/api-refs/api_samples/endpoint/endpoint-get-resp-secret.json b/coriolis/api-refs/api_samples/endpoint/endpoint-get-resp-secret.json index 16ea4ed38..1b48954a2 100644 --- a/coriolis/api-refs/api_samples/endpoint/endpoint-get-resp-secret.json +++ b/coriolis/api-refs/api_samples/endpoint/endpoint-get-resp-secret.json @@ -13,6 +13,8 @@ "type": "openstack", "name": "devstack", "description": null, - "mapped_regions": ["public"] + "mapped_regions": [ + "public" + ] } } diff --git a/coriolis/api-refs/api_samples/endpoint/endpoint-list-resp.json b/coriolis/api-refs/api_samples/endpoint/endpoint-list-resp.json index 9eb430d89..0855d1113 100644 --- a/coriolis/api-refs/api_samples/endpoint/endpoint-list-resp.json +++ b/coriolis/api-refs/api_samples/endpoint/endpoint-list-resp.json @@ -23,7 +23,9 @@ "type": "openstack", "name": "Endpoint Name Example", "description": "Example Endpoint Description", - "mapped_regions": ["public"] + "mapped_regions": [ + "public" + ] }, { "created_at": "2019-07-09T07:04:13.000000", diff --git a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-create-req.json b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-create-req.json index cce7a954c..e2ce94d50 100644 --- a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-create-req.json +++ b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-create-req.json @@ -47,6 +47,8 @@ "type": "openstack", "name": "Endpoint Name Example", "description": "Example Endpoint Description", - "mapped_regions": ["public"] + "mapped_regions": [ + "public" + ] } } diff --git a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-destination-options-list-resp.json b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-destination-options-list-resp.json index 7fb97a209..8a8b3a4e5 100644 --- a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-destination-options-list-resp.json +++ b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-destination-options-list-resp.json @@ -10,12 +10,17 @@ }, { "name": "migr_fip_pool_name", - "values": ["public"], + "values": [ + "public" + ], "config_default": "public" }, { "name": "security_groups", - "values": ["default""def-grp"], + "values": [ + "default", + "def-grp" + ], "config_default": [] }, { diff --git a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-get-resp.json b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-get-resp.json index 01921fea8..1c9bb3c61 100644 --- a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-get-resp.json +++ b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-get-resp.json @@ -42,6 +42,8 @@ "type": "openstack", "name": "Endpoint Name Example", "description": "Example Endpoint Description", - "mapped_regions": ["public"] + "mapped_regions": [ + "public" + ] } } diff --git a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-req.json b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-req.json index 10674e942..c735f6241 100644 --- a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-req.json +++ b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-req.json @@ -46,6 +46,8 @@ }, "name": "Updated Name", "description": "Updated description", - "mapped_regions": ["public"] + "mapped_regions": [ + "public" + ] } } diff --git a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-resp.json b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-resp.json index f855cb1bd..14121fb27 100644 --- a/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-resp.json +++ b/coriolis/api-refs/api_samples/endpoint/openstack-endpoint-update-resp.json @@ -54,6 +54,8 @@ "type": "openstack", "name": "Updated Name", "description": "Updated description", - "mapped_regions": ["public"] + "mapped_regions": [ + "public" + ] } } diff --git a/coriolis/api-refs/api_samples/migration/migration-from-replica-req.json b/coriolis/api-refs/api_samples/migration/migration-from-replica-req.json deleted file mode 100644 index 39e9681a1..000000000 --- a/coriolis/api-refs/api_samples/migration/migration-from-replica-req.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "migration": { - "clone_disks": true, - "force": false, - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", - "skip_os_morphing": false, - "instance_osmorphing_minion_pool_mappings": {"instance1": "morphing_pool"} - } -} diff --git a/coriolis/api-refs/api_samples/migration/openstack-migration-create-req.json b/coriolis/api-refs/api_samples/migration/openstack-migration-create-req.json deleted file mode 100644 index ee2f18308..000000000 --- a/coriolis/api-refs/api_samples/migration/openstack-migration-create-req.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "migration": { - "network_map": { - "private": "provider-net" - }, - "origin_endpoint_id": "5a276274-f964-4c07-aec4-01a7971d9eea", - "instances": ["ubuntu-xenial", "windows2012r2"], - "storage_mappings": {}, - "destination_environment": { - "migr_flavor_name": "m1.small", - "storage_mappings": { - "lvmdriver-1": "lvm-1" - }, - "keypair_name": "new-key", - "delete_disks_on_vm_termination": false, - "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" - }, - "migr_network": "provider-net", - "port_reuse_policy": "keep_mac", - "set_dhcp": true - }, - "skip_os_morphing": false, - "destination_endpoint_id": "6258fa20-5d1f-44fa-ae12-c94122263fa3", - "origin_minion_pool_id": null, - "destination_minion_pool_id": "a5e00fd3-42ac-4570-898b-5bbee0ff4acb", - "instance_osmorphing_minion_pool_mappings": {}, - "shutdown_instances": false, - "replication_count": 2, - "user_scripts": { - "global": { - "linux": "echo 'bash script to be run for every migrated Linux instance'", - "windows": "echo 'powershell script to be run for every migrated Windows instance'" - }, - "instances": { - "ubuntu-xenial": "echo 'script to be run only on this instance'" - } - } - } -} diff --git a/coriolis/api-refs/api_samples/migration/openstack-migration-create-resp.json b/coriolis/api-refs/api_samples/migration/openstack-migration-create-resp.json deleted file mode 100644 index 0c52b4e5e..000000000 --- a/coriolis/api-refs/api_samples/migration/openstack-migration-create-resp.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "migration": { - "created_at": "2019-07-10T07:24:09.000000", - "updated_at": "2019-07-10T08:39:05.000000", - "deleted_at": null, - "deleted": "0", - "base_id": "1e31443d-5eb1-403f-9f15-c67a2c372bc3", - "user_id": "7cf9b4745d514517b3eae440438136bc", - "project_id": "ffc16db2011e41f28152897c279b6bcc", - "destination_environment": { - "migr_flavor_name": "m1.small", - "storage_mappings": { - "lvmdriver-1": "lvm-1" - }, - "keypair_name": "new-key", - "delete_disks_on_vm_termination": false, - "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" - }, - "migr_network": "provider-net", - "port_reuse_policy": "keep_mac", - "set_dhcp": true, - "network_map": { - "private": "provider-net" - } - }, - "type": "migration", - "instances": ["ubuntu-xenial", "windows2012r2"], - "reservation_id": null, - "notes": "", - "origin_endpoint_id": "b59051a2-bbf3-4fb7-a1eb-539db55339dc", - "destination_endpoint_id": "6258fa20-5d1f-44fa-ae12-c94122263fa3", - "transfer_result": null, - "network_map": { - "private": "provider-net" - }, - "storage_mappings": {}, - "source_environment": {}, - "id": "1e31443d-5eb1-403f-9f15-c67a2c372bc3", - "replica_id": null, - "status": "RUNNING", - "last_execution_status": "UNEXECUTED", - "origin_minion_pool_id": null, - "destination_minion_pool_id": "a5e00fd3-42ac-4570-898b-5bbee0ff4acb", - "instance_osmorphing_minion_pool_mappings": {}, - "shutdown_instances": false, - "replication_count": 2, - "user_scripts": { - "global": { - "linux": "echo 'bash script to be run for every migrated Linux instance'", - "windows": "echo 'powershell script to be run for every migrated Windows instance'" - }, - "instances": { - "ubuntu-xenial": "echo 'script to be run only on this instance'" - } - }, - "tasks": [ - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "4378b0f9-59af-4421-be99-3f1dd45d800c", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "VALIDATE_MIGRATION_INPUTS", - "exception_details": null, - "depends_on": null, - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "4081541f-395a-498a-a452-387171f069bf", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "EXPORT_INSTANCE", - "exception_details": null, - "depends_on": [ - "4378b0f9-59af-4421-be99-3f1dd45d800c" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "12e5b7ff-b207-48fc-bae8-1b75385ccace", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "GET_OPTIMAL_FLAVOR", - "exception_details": null, - "depends_on": [ - "4081541f-395a-498a-a452-387171f069bf" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "fd496b06-f06b-4625-826d-41d4f799024e", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "IMPORT_INSTANCE", - "exception_details": null, - "depends_on": [ - "12e5b7ff-b207-48fc-bae8-1b75385ccace" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "dda2909d-e5b6-4342-955b-e7928181125c", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "DEPLOY_DISK_COPY_RESOURCES", - "exception_details": null, - "depends_on": [ - "fd496b06-f06b-4625-826d-41d4f799024e" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "911a4f9e-b68b-4350-9fd3-ffcd90f3ca73", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "COPY_DISK_DATA", - "exception_details": null, - "depends_on": [ - "dda2909d-e5b6-4342-955b-e7928181125c" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "2c450f5f-5d39-490f-b54c-20b72761040d", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "DELETE_DISK_COPY_RESOURCES", - "exception_details": null, - "depends_on": [ - "911a4f9e-b68b-4350-9fd3-ffcd90f3ca73" - ], - "on_error": true, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "3f387c03-2c2e-4276-8e4f-2569c01cc71e", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "DEPLOY_OS_MORPHING_RESOURCES", - "exception_details": null, - "depends_on": [ - "2c450f5f-5d39-490f-b54c-20b72761040d" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "2f2dd3af-631d-457c-ab86-28eba5877113", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "OS_MORPHING", - "exception_details": null, - "depends_on": [ - "3f387c03-2c2e-4276-8e4f-2569c01cc71e" - ], - "on_error": false, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "76f1f6c7-88e6-4dce-802e-5700ae66cd2c", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "DELETE_OS_MORPHING_RESOURCES", - "exception_details": null, - "depends_on": [ - "2f2dd3af-631d-457c-ab86-28eba5877113" - ], - "on_error": true, - "progress_updates": [], - "events": [] - }, - { - "created_at": "2019-07-11T08:40:02.000000", - "updated_at": null, - "deleted_at": null, - "deleted": "0", - "id": "92fec20f-ce24-4dd4-88b0-3455a1d5840d", - "execution_id": "0a902cf6-f24a-4af9-92a6-843bbd6f35b1", - "instance": "ubuntu-xenial", - "host": null, - "process_id": null, - "status": "PENDING", - "task_type": "FINALIZE_IMPORT_INSTANCE", - "exception_details": null, - "depends_on": [ - "76f1f6c7-88e6-4dce-802e-5700ae66cd2c" - ], - "on_error": false, - "progress_updates": [], - "events": [] - } - ] - } -} diff --git a/coriolis/api-refs/api_samples/service/service-create-req.json b/coriolis/api-refs/api_samples/service/service-create-req.json index e80273252..c6d6b8e4a 100644 --- a/coriolis/api-refs/api_samples/service/service-create-req.json +++ b/coriolis/api-refs/api_samples/service/service-create-req.json @@ -3,7 +3,9 @@ "host": "coriolis-worker-ONbgH1NV", "binary": "coriolis-worker-test", "topic": "coriolis_worker-test", - "mapped_regions": ["5e31066c-3512-4e8d-9e68-0a5de3d35c5f"], + "mapped_regions": [ + "5e31066c-3512-4e8d-9e68-0a5de3d35c5f" + ], "enabled": false } } diff --git a/coriolis/api-refs/api_samples/service/service-update-req.json b/coriolis/api-refs/api_samples/service/service-update-req.json index 387749b34..8c62422a9 100644 --- a/coriolis/api-refs/api_samples/service/service-update-req.json +++ b/coriolis/api-refs/api_samples/service/service-update-req.json @@ -1,6 +1,8 @@ { "service": { "enabled": true, - "mapped_regions": ["5e31066c-3512-4e8d-9e68-0a5de3d35c5f"] + "mapped_regions": [ + "5e31066c-3512-4e8d-9e68-0a5de3d35c5f" + ] } } diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-create-req.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-create-req.json similarity index 59% rename from coriolis/api-refs/api_samples/replica/openstack-replica-create-req.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-create-req.json index c94f31aa1..8d76dd74b 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-create-req.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-create-req.json @@ -1,8 +1,10 @@ { - "replica": { + "transfer": { "network_map": {}, "origin_endpoint_id": "5a276274-f964-4c07-aec4-01a7971d9eea", - "instances": ["ubuntu-xenial"], + "instances": [ + "ubuntu-xenial" + ], "storage_mappings": {}, "destination_environment": { "network_map": { @@ -14,8 +16,8 @@ "keypair_name": "new-key", "delete_disks_on_vm_termination": false, "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" }, "migr_network": "provider-net", "port_reuse_policy": "keep_mac", @@ -24,7 +26,15 @@ "destination_endpoint_id": "6258fa20-5d1f-44fa-ae12-c94122263fa3", "origin_minion_pool_id": null, "destination_minion_pool_id": "a9b5a0b5-18f6-422e-a014-1659f8a257a4", - "instance_osmorphing_minion_pool_mappings": {"ubuntu-xenial": "a9b5a0b5-18f6-422e-a014-1659f8a257a4"}, - "user_scripts": {"instances": {"ubuntu-xenial": "echo 'anything you need'"}} + "instance_osmorphing_minion_pool_mappings": { + "ubuntu-xenial": "a9b5a0b5-18f6-422e-a014-1659f8a257a4" + }, + "user_scripts": { + "instances": { + "ubuntu-xenial": "echo 'anything you need'" + } + }, + "id": "aedffcd0-804c-4c5a-913c-8b99ec1ae80a", + "scenario": "replica" } } diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-create-resp.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-create-resp.json similarity index 71% rename from coriolis/api-refs/api_samples/replica/openstack-replica-create-resp.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-create-resp.json index b8a53c7ac..5baf549a5 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-create-resp.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-create-resp.json @@ -1,5 +1,5 @@ { - "replica": { + "transfer": { "created_at": "2019-07-11T09:49:45.000000", "updated_at": null, "deleted_at": null, @@ -18,15 +18,17 @@ "keypair_name": "new-key", "delete_disks_on_vm_termination": false, "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" }, "migr_network": "provider-net", "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "replica", - "instances": ["ubuntu-xenial"], + "type": "transfer", + "instances": [ + "ubuntu-xenial" + ], "reservation_id": null, "notes": null, "origin_endpoint_id": "5a276274-f964-4c07-aec4-01a7971d9eea", @@ -38,8 +40,15 @@ "id": "78f89897-fca0-465c-bf0c-b23b36dfd619", "origin_minion_pool_id": null, "destination_minion_pool_id": "a9b5a0b5-18f6-422e-a014-1659f8a257a4", - "instance_osmorphing_minion_pool_mappings": {"ubuntu-xenial": "a9b5a0b5-18f6-422e-a014-1659f8a257a4"}, - "user_scripts": {"instances": {"ubuntu-xenial": "echo 'anything you need'"}}, - "executions": [] + "instance_osmorphing_minion_pool_mappings": { + "ubuntu-xenial": "a9b5a0b5-18f6-422e-a014-1659f8a257a4" + }, + "user_scripts": { + "instances": { + "ubuntu-xenial": "echo 'anything you need'" + } + }, + "executions": [], + "scenario": "replica" } } diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-disks-delete-resp.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-disks-delete-resp.json similarity index 92% rename from coriolis/api-refs/api_samples/replica/openstack-replica-disks-delete-resp.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-disks-delete-resp.json index 2be35a88d..3c7fd3e29 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-disks-delete-resp.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-disks-delete-resp.json @@ -20,7 +20,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DELETE_REPLICA_DISKS", + "task_type": "DELETE_TRANSFER_DISKS", "exception_details": null, "depends_on": null, "on_error": false, @@ -46,14 +46,14 @@ "keypair_name": "new-key", "delete_disks_on_vm_termination": false, "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" }, "migr_network": "provider-net", "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "replica", + "type": "transfer", "instances": [ "ubuntu-xenial" ], diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-execution-get-resp.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-get-resp.json similarity index 95% rename from coriolis/api-refs/api_samples/replica/openstack-replica-execution-get-resp.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-get-resp.json index df20c7bf3..d2dc542bc 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-execution-get-resp.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-get-resp.json @@ -20,7 +20,7 @@ "host": "coriolis-worker", "process_id": 55, "status": "COMPLETED", - "task_type": "VALIDATE_REPLICA_INPUTS", + "task_type": "VALIDATE_TRANSFER_INPUTS", "exception_details": null, "depends_on": null, "on_error": false, @@ -46,7 +46,7 @@ "current_step": 3, "total_steps": null, "message": "Checking shape name" - }, + } ], "events": [] }, @@ -104,7 +104,7 @@ "host": "coriolis-worker", "process_id": 65, "status": "COMPLETED", - "task_type": "DEPLOY_REPLICA_DISKS", + "task_type": "DEPLOY_TRANSFER_DISKS", "exception_details": null, "depends_on": [ "ac0b4373-8b03-453b-b231-51c526039ae8" @@ -124,7 +124,7 @@ "host": "coriolis-worker", "process_id": 71, "status": "COMPLETED", - "task_type": "DEPLOY_REPLICA_SOURCE_RESOURCES", + "task_type": "DEPLOY_TRANSFER_SOURCE_RESOURCES", "exception_details": null, "depends_on": [ "32a87325-7aea-47f1-847f-a33da53f4dff" @@ -144,7 +144,7 @@ "host": "coriolis-worker", "process_id": 70, "status": "ERROR", - "task_type": "DEPLOY_REPLICA_TARGET_RESOURCES", + "task_type": "DEPLOY_TRANSFER_TARGET_RESOURCES", "exception_details": "You have reached your service limit of 1 in this Availability Domain for VM.Standard2.1. Please try launching the instance in a different Availability Domain or Region, or try using a different shape. If you have reached all Service limits, please contact Oracle support to request a limit increase.", "depends_on": [ "32a87325-7aea-47f1-847f-a33da53f4dff" @@ -208,7 +208,7 @@ "host": "coriolis-worker", "process_id": 80, "status": "COMPLETED", - "task_type": "DELETE_REPLICA_SOURCE_RESOURCES", + "task_type": "DELETE_TRANSFER_SOURCE_RESOURCES", "exception_details": null, "depends_on": [ "1d307621-52b1-4c45-a8c7-fbd6d69f469d" @@ -228,7 +228,7 @@ "host": "coriolis-worker", "process_id": 81, "status": "COMPLETED", - "task_type": "DELETE_REPLICA_TARGET_RESOURCES", + "task_type": "DELETE_TRANSFER_TARGET_RESOURCES", "exception_details": null, "depends_on": [ "1d307621-52b1-4c45-a8c7-fbd6d69f469d" @@ -256,15 +256,17 @@ "keypair_name": "new-key", "delete_disks_on_vm_termination": false, "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" }, "migr_network": "provider-net", "port_reuse_policy": "keep_mac", "set_dhcp": true }, "type": "replica", - "instances": ["ubuntu-xenial"], + "instances": [ + "ubuntu-xenial" + ], "reservation_id": null, "notes": null, "origin_endpoint_id": "5a276274-f964-4c07-aec4-01a7971d9eea", diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-execution-resp.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-resp.json similarity index 91% rename from coriolis/api-refs/api_samples/replica/openstack-replica-execution-resp.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-resp.json index fd0b80225..3a64a8f29 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-execution-resp.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-resp.json @@ -8,7 +8,7 @@ "action_id": "78f89897-fca0-465c-bf0c-b23b36dfd619", "status": "RUNNING", "number": 2, - "type": "replica_execution", + "type": "transfer_execution", "tasks": [ { "created_at": "2019-07-11T10:01:43.000000", @@ -21,7 +21,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "VALIDATE_REPLICA_INPUTS", + "task_type": "VALIDATE_TRANSFER_INPUTS", "exception_details": null, "depends_on": null, "on_error": false, @@ -59,7 +59,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DEPLOY_REPLICA_DISKS", + "task_type": "DEPLOY_TRANSFER__DISKS", "exception_details": null, "depends_on": [ "0a7f3d43-7486-49e7-a606-6411694a8178" @@ -79,7 +79,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DEPLOY_REPLICA_SOURCE_RESOURCES", + "task_type": "DEPLOY_TRANSFER_SOURCE_RESOURCES", "exception_details": null, "depends_on": [ "e82de183-da6d-4115-83a1-9bd445a32d57" @@ -99,7 +99,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DEPLOY_REPLICA_TARGET_RESOURCES", + "task_type": "DEPLOY_TRANSFER_TARGET_RESOURCES", "exception_details": null, "depends_on": [ "e82de183-da6d-4115-83a1-9bd445a32d57" @@ -140,7 +140,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DELETE_REPLICA_SOURCE_RESOURCES", + "task_type": "DELETE_TRANSFER_SOURCE_RESOURCES", "exception_details": null, "depends_on": [ "96de030b-3a12-45a5-a306-3a18e938040b" @@ -160,7 +160,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DELETE_REPLICA_TARGET_RESOURCES", + "task_type": "DELETE_TRANSFER_TARGET_RESOURCES", "exception_details": null, "depends_on": [ "96de030b-3a12-45a5-a306-3a18e938040b" @@ -188,14 +188,14 @@ "keypair_name": "new-key", "delete_disks_on_vm_termination": false, "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" }, "migr_network": "provider-net", "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "replica", + "type": "transfer", "instances": [ "ubuntu-xenial" ], @@ -207,7 +207,8 @@ "network_map": {}, "storage_mappings": {}, "source_environment": {}, - "id": "78f89897-fca0-465c-bf0c-b23b36dfd619" + "id": "78f89897-fca0-465c-bf0c-b23b36dfd619", + "scenario": "replica" } } } diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-execution-show-resp.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-show-resp.json similarity index 94% rename from coriolis/api-refs/api_samples/replica/openstack-replica-execution-show-resp.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-show-resp.json index c50683f21..ed8b5dcd9 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-execution-show-resp.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-execution-show-resp.json @@ -1,4 +1,3 @@ - { "execution": { "created_at": "2019-07-24T21:04:16.000000", @@ -9,7 +8,7 @@ "action_id": "7a7731ab-4802-449d-88d3-5960636affe9", "status": "RUNNING", "number": 1, - "type": "replica_execution", + "type": "transfer_execution", "tasks": [ { "created_at": "2019-07-24T21:04:16.000000", @@ -63,7 +62,7 @@ "host": "coriolis-worker", "process_id": 184, "status": "COMPLETED", - "task_type": "VALIDATE_REPLICA_DESTINATION_INPUTS", + "task_type": "VALIDATE_TRANSFER_DESTINATION_INPUTS", "exception_details": null, "depends_on": [ "0c83740e-3b4b-4f4e-81c4-d8ba7277328d" @@ -106,7 +105,7 @@ "host": "coriolis-worker", "process_id": 177, "status": "COMPLETED", - "task_type": "VALIDATE_REPLICA_SOURCE_INPUTS", + "task_type": "VALIDATE_TRANSFER_SOURCE_INPUTS", "exception_details": null, "depends_on": null, "on_error": false, @@ -136,7 +135,7 @@ "host": "coriolis-worker", "process_id": 189, "status": "COMPLETED", - "task_type": "DEPLOY_REPLICA_DISKS", + "task_type": "DEPLOY_TRANSFER_DISKS", "exception_details": null, "depends_on": [ "2fd931f7-4303-4186-bb98-9cdb433d8390", @@ -169,7 +168,7 @@ "host": "coriolis-worker", "process_id": 194, "status": "RUNNING", - "task_type": "DEPLOY_REPLICA_SOURCE_RESOURCES", + "task_type": "DEPLOY_TRANSFER_SOURCE_RESOURCES", "exception_details": null, "depends_on": [ "f6d48106-7fba-4687-812d-ec8bb6f94c08" @@ -189,7 +188,7 @@ "host": "coriolis-worker", "process_id": 195, "status": "RUNNING", - "task_type": "DEPLOY_REPLICA_TARGET_RESOURCES", + "task_type": "DEPLOY_TRANSFER_TARGET_RESOURCES", "exception_details": null, "depends_on": [ "f6d48106-7fba-4687-812d-ec8bb6f94c08" @@ -209,7 +208,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "REPLICATE_DISKS", + "task_type": "TRANSFER_DISKS", "exception_details": null, "depends_on": [ "b4fcb5a7-d8e1-4e03-9d42-bda15bad1831", @@ -230,7 +229,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DELETE_REPLICA_SOURCE_RESOURCES", + "task_type": "DELETE_TRANSFER_SOURCE_RESOURCES", "exception_details": null, "depends_on": [ "cc9ca1c6-51fd-4d2d-95cf-1dfc9b4bb4f7" @@ -250,7 +249,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "DELETE_REPLICA_TARGET_RESOURCES", + "task_type": "DELETE_TRANSFER_TARGET_RESOURCES", "exception_details": null, "depends_on": [ "cc9ca1c6-51fd-4d2d-95cf-1dfc9b4bb4f7" @@ -287,8 +286,10 @@ ] } }, - "type": "replica", - "instances": ["CI/openwrt"], + "type": "transfer", + "instances": [ + "CI/openwrt" + ], "reservation_id": null, "notes": "", "origin_endpoint_id": "15a0d68a-40c3-40cd-bcc4-aba390c4c4e1", @@ -312,7 +313,8 @@ ] }, "source_environment": {}, - "id": "7a7731ab-4802-449d-88d3-5960636affe9" + "id": "7a7731ab-4802-449d-88d3-5960636affe9", + "scenario": "replica" } } } diff --git a/coriolis/api-refs/api_samples/replica/openstack-replica-get-resp.json b/coriolis/api-refs/api_samples/transfer/openstack-transfer-get-resp.json similarity index 88% rename from coriolis/api-refs/api_samples/replica/openstack-replica-get-resp.json rename to coriolis/api-refs/api_samples/transfer/openstack-transfer-get-resp.json index 64780103a..55749ec6d 100644 --- a/coriolis/api-refs/api_samples/replica/openstack-replica-get-resp.json +++ b/coriolis/api-refs/api_samples/transfer/openstack-transfer-get-resp.json @@ -1,5 +1,5 @@ { - "replica": { + "transfer": { "created_at": "2019-07-11T09:49:45.000000", "updated_at": "2019-07-11T10:07:14.000000", "deleted_at": null, @@ -18,15 +18,17 @@ "keypair_name": "new-key", "delete_disks_on_vm_termination": false, "migr_image_map": { - "linux": "ubuntu-xenial-img", - "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" + "linux": "ubuntu-xenial-img", + "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458" }, "migr_network": "provider-net", "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "replica", - "instances": ["ubuntu-xenial"], + "type": "transfer", + "instances": [ + "ubuntu-xenial" + ], "reservation_id": null, "notes": null, "origin_endpoint_id": "5a276274-f964-4c07-aec4-01a7971d9eea", @@ -61,6 +63,8 @@ "status": "ERROR", "number": 1 } - ] + ], + "user_scripts": {}, + "scenario": "replica" } } diff --git a/coriolis/api-refs/api_samples/replica/replica-disks-delete-req.json b/coriolis/api-refs/api_samples/transfer/transfer-disks-delete-req.json similarity index 100% rename from coriolis/api-refs/api_samples/replica/replica-disks-delete-req.json rename to coriolis/api-refs/api_samples/transfer/transfer-disks-delete-req.json diff --git a/coriolis/api-refs/api_samples/replica/replica-execution-cancel-req.json b/coriolis/api-refs/api_samples/transfer/transfer-execution-cancel-req.json similarity index 100% rename from coriolis/api-refs/api_samples/replica/replica-execution-cancel-req.json rename to coriolis/api-refs/api_samples/transfer/transfer-execution-cancel-req.json diff --git a/coriolis/api-refs/api_samples/replica/replica-execution-list-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-execution-list-resp.json similarity index 90% rename from coriolis/api-refs/api_samples/replica/replica-execution-list-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-execution-list-resp.json index 8fbb077e6..cac8fea00 100644 --- a/coriolis/api-refs/api_samples/replica/replica-execution-list-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-execution-list-resp.json @@ -9,7 +9,7 @@ "action_id": "78f89897-fca0-465c-bf0c-b23b36dfd619", "status": "RUNNING", "number": 4, - "type": "replica_execution" + "type": "transfer_execution" }, { "created_at": "2019-07-11T10:06:47.000000", @@ -20,7 +20,7 @@ "action_id": "78f89897-fca0-465c-bf0c-b23b36dfd619", "status": "COMPLETED", "number": 3, - "type": "replica_update" + "type": "transfer_update" }, { "created_at": "2019-07-11T09:57:17.000000", @@ -31,7 +31,7 @@ "action_id": "78f89897-fca0-465c-bf0c-b23b36dfd619", "status": "ERROR", "number": 1, - "type": "replica_execution" + "type": "transfer_execution" } ] } diff --git a/coriolis/api-refs/api_samples/replica/replica-execution-req.json b/coriolis/api-refs/api_samples/transfer/transfer-execution-req.json similarity index 100% rename from coriolis/api-refs/api_samples/replica/replica-execution-req.json rename to coriolis/api-refs/api_samples/transfer/transfer-execution-req.json diff --git a/coriolis/api-refs/api_samples/replica/replica-list-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-list-resp.json similarity index 92% rename from coriolis/api-refs/api_samples/replica/replica-list-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-list-resp.json index f8b0d05be..14c909b39 100644 --- a/coriolis/api-refs/api_samples/replica/replica-list-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-list-resp.json @@ -1,5 +1,5 @@ { - "replicas": [ + "transfers": [ { "created_at": "2019-07-23T17:01:03.000000", "updated_at": "2019-07-23T17:18:53.000000", @@ -37,7 +37,8 @@ "port_reuse_policy": "keep_mac", "set_dhcp": true }, - "type": "replica", + "type": "transfer", + "executions": [], "instances": [ "CI/coriolis-test-vms/openwrt-no-cbt-clone" ], @@ -64,12 +65,16 @@ ] }, "source_environment": {}, - "id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "last_execution_status": "COMPLETED", "origin_minion_pool_id": null, "destination_minion_pool_id": null, "instance_osmorphing_minion_pool_mappings": {}, - "executions": [] + "user_scripts": { + "global": {}, + "instances": {} + }, + "id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "scenario": "replica" } ] } diff --git a/coriolis/api-refs/api_samples/replica/replica-schedule-create-req.json b/coriolis/api-refs/api_samples/transfer/transfer-schedule-create-req.json similarity index 100% rename from coriolis/api-refs/api_samples/replica/replica-schedule-create-req.json rename to coriolis/api-refs/api_samples/transfer/transfer-schedule-create-req.json diff --git a/coriolis/api-refs/api_samples/replica/replica-schedule-create-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-schedule-create-resp.json similarity index 87% rename from coriolis/api-refs/api_samples/replica/replica-schedule-create-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-schedule-create-resp.json index e1c4b4229..7942dae79 100644 --- a/coriolis/api-refs/api_samples/replica/replica-schedule-create-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-schedule-create-resp.json @@ -5,7 +5,7 @@ "deleted_at": null, "deleted": "0", "id": "e5bf8e7d-4653-4994-bb2a-467a1df475b1", - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "schedule": { "month": 7, "hour": 20, diff --git a/coriolis/api-refs/api_samples/replica/replica-schedule-list-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-schedule-list-resp.json similarity index 87% rename from coriolis/api-refs/api_samples/replica/replica-schedule-list-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-schedule-list-resp.json index 22be6bfcd..07703c185 100644 --- a/coriolis/api-refs/api_samples/replica/replica-schedule-list-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-schedule-list-resp.json @@ -6,7 +6,7 @@ "deleted_at": null, "deleted": "0", "id": "20f17188-8053-4e10-bf1b-f60c1d3b8022", - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "schedule": { "hour": 19, "minute": 30 @@ -22,7 +22,7 @@ "deleted_at": null, "deleted": "0", "id": "bbe24b53-8c42-4dc2-a65f-66270c2f68dd", - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "schedule": { "hour": 20, "minute": 30 @@ -38,7 +38,7 @@ "deleted_at": null, "deleted": "0", "id": "e5bf8e7d-4653-4994-bb2a-467a1df475b1", - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "schedule": { "month": 7, "hour": 20, diff --git a/coriolis/api-refs/api_samples/replica/replica-schedule-show-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-schedule-show-resp.json similarity index 87% rename from coriolis/api-refs/api_samples/replica/replica-schedule-show-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-schedule-show-resp.json index e1c4b4229..7942dae79 100644 --- a/coriolis/api-refs/api_samples/replica/replica-schedule-show-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-schedule-show-resp.json @@ -5,7 +5,7 @@ "deleted_at": null, "deleted": "0", "id": "e5bf8e7d-4653-4994-bb2a-467a1df475b1", - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "schedule": { "month": 7, "hour": 20, diff --git a/coriolis/api-refs/api_samples/replica/replica-schedule-update-req.json b/coriolis/api-refs/api_samples/transfer/transfer-schedule-update-req.json similarity index 100% rename from coriolis/api-refs/api_samples/replica/replica-schedule-update-req.json rename to coriolis/api-refs/api_samples/transfer/transfer-schedule-update-req.json diff --git a/coriolis/api-refs/api_samples/replica/replica-schedule-update-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-schedule-update-resp.json similarity index 87% rename from coriolis/api-refs/api_samples/replica/replica-schedule-update-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-schedule-update-resp.json index 3f00dcc02..3979e6d10 100644 --- a/coriolis/api-refs/api_samples/replica/replica-schedule-update-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-schedule-update-resp.json @@ -5,7 +5,7 @@ "deleted_at": null, "deleted": "0", "id": "20f17188-8053-4e10-bf1b-f60c1d3b8022", - "replica_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", + "transfer_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "schedule": { "dow": 0, "minute": 30, diff --git a/coriolis/api-refs/api_samples/replica/replica-update-req.json b/coriolis/api-refs/api_samples/transfer/transfer-update-req.json similarity index 85% rename from coriolis/api-refs/api_samples/replica/replica-update-req.json rename to coriolis/api-refs/api_samples/transfer/transfer-update-req.json index 2f4ce62a2..518873991 100644 --- a/coriolis/api-refs/api_samples/replica/replica-update-req.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-update-req.json @@ -1,5 +1,5 @@ { - "replica": { + "transfer": { "network_map": { "VM Network": "0a6b9c01-9ff8-4afa-afba-fa2058fe6cd2" } diff --git a/coriolis/api-refs/api_samples/replica/replica-update-resp.json b/coriolis/api-refs/api_samples/transfer/transfer-update-resp.json similarity index 89% rename from coriolis/api-refs/api_samples/replica/replica-update-resp.json rename to coriolis/api-refs/api_samples/transfer/transfer-update-resp.json index 4ddc1d6f7..8bcdbbf0b 100644 --- a/coriolis/api-refs/api_samples/replica/replica-update-resp.json +++ b/coriolis/api-refs/api_samples/transfer/transfer-update-resp.json @@ -8,7 +8,7 @@ "action_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "status": "RUNNING", "number": 2, - "type": "replica_update", + "type": "transfer_update", "tasks": [ { "created_at": "2019-07-23T17:18:38.000000", @@ -39,7 +39,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "UPDATE_SOURCE_REPLICA", + "task_type": "UPDATE_SOURCE_TRANSFER", "exception_details": null, "depends_on": null, "on_error": false, @@ -57,7 +57,7 @@ "host": null, "process_id": null, "status": "PENDING", - "task_type": "UPDATE_DESTINATION_REPLICA", + "task_type": "UPDATE_DESTINATION_TRANSFER", "exception_details": null, "depends_on": [ "6aeef794-f954-49fd-8259-58503f24a238", @@ -95,7 +95,7 @@ ] } }, - "type": "replica", + "type": "transfer", "instances": [ "CI/coriolis-test-vms/openwrt-no-cbt-clone" ], @@ -125,8 +125,15 @@ "id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22", "origin_minion_pool_id": null, "destination_minion_pool_id": "a9b5a0b5-18f6-422e-a014-1659f8a257a4", - "instance_osmorphing_minion_pool_mappings": {"ubuntu-xenial": "a9b5a0b5-18f6-422e-a014-1659f8a257a4"}, - "user_scripts": {"instances": {"ubuntu-xenial": "echo 'anything you need'"}}, + "instance_osmorphing_minion_pool_mappings": { + "ubuntu-xenial": "a9b5a0b5-18f6-422e-a014-1659f8a257a4" + }, + "user_scripts": { + "instances": { + "ubuntu-xenial": "echo 'anything you need'" + } + }, + "scenario": "replica" } } } diff --git a/coriolis/api-refs/source/deployment.inc b/coriolis/api-refs/source/deployment.inc new file mode 100644 index 000000000..696cc229e --- /dev/null +++ b/coriolis/api-refs/source/deployment.inc @@ -0,0 +1,254 @@ +.. -*- rst -*- + +=========== +Deployments +=========== + +Lists, creates, cancels, shows details for, and deletes Coriolis deployments. + + +List Deployments +================ + +.. rest_method:: GET /deployments + +Lists all deployments. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403) + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - deployments : deployments_array + - id : deployment_id + - deleted : deployment_deleted + - deleted_at : deployment_deleted_at + - instances : deployment_instances + - notes : deployment_notes + - user_id : user_id + - destination_environment : destination_environment + - source_environment : source_environment + - type : deployment_type + - origin_endpoint_id : deployment_origin_endpoint_id + - created_at : deployment_created_at + - updated_at : deployment_updated_at + - project_id : project_id + - transfer_id : transfer_id + - base_id : base_id + - destination_endpoint_id : deployment_destination_endpoint_id + - network_map : network_map + - storage_mappings : storage_map + - last_execution_status : deployment_last_execution_status + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + - transfer_id : transfer_id + - transfer_scenario_type : transfer_scenario_type + - shutdown_instances : deployment_shutdown_instances + +**Example of a Deployment List** + + .. literalinclude:: ../api_samples/deployment/openstack-deployment-list-detail-resp.json + :language: javascript + + +Show Deployment +=============== + +.. rest_method:: GET /deployments/{deployment_id} + +Shows details about a deployment. + +**Preconditions** + +The deployment must exist. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - deployment_id : deployment_id_path + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - deployment : deployment_object + - id : deployment_id + - deleted : deployment_deleted + - deleted_at : deployment_deleted_at + - instances : deployment_instances + - notes : deployment_notes + - tasks : deployment_tasks + - user_id : user_id + - destination_environment : destination_environment + - source_environment : source_environment + - type : deployment_type + - origin_endpoint_id : deployment_origin_endpoint_id + - created_at : deployment_created_at + - updated_at : deployment_updated_at + - project_id : project_id + - transfer_id : transfer_id + - base_id : base_id + - destination_endpoint_id : deployment_destination_endpoint_id + - network_map : network_map + - storage_mappings : storage_map + - last_execution_status : deployment_last_execution_status + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + - transfer_id : transfer_id + - transfer_scenario_type : transfer_scenario_type + - shutdown_instances : deployment_shutdown_instances + +**Example of a Deployment Show Response** + .. literalinclude:: ../api_samples/deployment/openstack-deployment-get-resp.json + :language: javascript + + +Create Deployment From Transfer +=============================== + +.. rest_method:: POST /deployments + +Creates deployment from a successful transfer execution. + +**Preconditions** + +A transfer execution must exist. + +Normal response codes: 200 + +Error response codes: +unauthorized(401), forbidden(403), itemNotFound(404) + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - deployment : deployment_object + - transfer_id : transfer_id + - force : deployment_force + - clone_disks : deployment_clone_disks + - skip_os_morphing : skip_os_morphing + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + +**Example of Deployment Create From Transfer Request** + .. literalinclude:: ../api_samples/deployment/deployment-from-transfer-req.json + :language: javascript + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - deployment : deployment_object + - id : deployment_id + - deleted : deployment_deleted + - deleted_at : deployment_deleted_at + - instances : deployment_instances + - notes : deployment_notes + - status : deployment_notes + - tasks : deployment_tasks + - user_id : user_id + - destination_environment : destination_environment + - source_environtment : source_environment + - type : deployment_type + - info : deployment_info + - origin_endpoint_id : deployment_origin_endpoint_id + - created_at : deployment_created_at + - updated_at : deployment_updated_at + - project_id : project_id + - transfer_id : transfer_id + - base_id : base_id + - destination_endpoint_id : deployment_destination_endpoint_id + - network_map : network_map + - storage_mappings : storage_map + - last_execution_status : deployment_last_execution_status + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - shutdown_instances : deployment_shutdown_instances + +**Example of Deployment Create From Transfer Response** + .. literalinclude:: ../api_samples/deployment/openstack-deployment-from-transfer-resp.json + :language: javascript + +Delete Deployment +================= +.. rest_method:: DELETE /deployments/{deployment_id} + +Deletes an non-running deployment. + +**Preconditions** + +The deployment must exist and not be running. + +Normal response codes: 204 + +Error response codes: +unauthorized(401), forbidden(403), itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - deployment_id : deployment_id_path + +Response +-------- + +There is no response body for a successful deletion of an deployment. + + +Cancel Deployment +================= + +.. rest_method:: POST /deployments/{deployment_id}/actions + +Cancels a running deployment. + +**Preconditions** + +The deployment must exist and must be running. + +Normal response codes: 200 + + +Error response codes: unauthorized(401), forbidden(403), +itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - deployment_id : deployment_id_path + - force : deployment_cancel_force + - cancel : deployment_cancel + +**Example of A Deployment Cancellation Request** + .. literalinclude:: ../api_samples/deployment/deployment-cancel-req.json + :language: javascript + +Response +-------- + +There is no response to a successful deployment cancellation. diff --git a/coriolis/api-refs/source/index.rst b/coriolis/api-refs/source/index.rst index 130c93c09..c65018986 100644 --- a/coriolis/api-refs/source/index.rst +++ b/coriolis/api-refs/source/index.rst @@ -8,9 +8,9 @@ This is a reference for the Coriolis API. .. include:: diagnostics.inc .. include:: endpoint.inc -.. include:: migration.inc +.. include:: deployment.inc .. include:: minion_pool.inc .. include:: provider.inc .. include:: region.inc -.. include:: replica.inc +.. include:: transfer.inc .. include:: service.inc diff --git a/coriolis/api-refs/source/migration.inc b/coriolis/api-refs/source/migration.inc deleted file mode 100644 index 794d40f26..000000000 --- a/coriolis/api-refs/source/migration.inc +++ /dev/null @@ -1,321 +0,0 @@ -.. -*- rst -*- - -========== -Migrations -========== - -Lists, creates, cancels, shows details for, and deletes Coriolis migrations. - - -List Migrations -=============== - -.. rest_method:: GET /migrations - -Lists all migrations. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403) - -Response --------- - -.. rest_parameters:: parameters.yaml - - - migrations : migrations_array - - id : migration_id - - deleted : migration_deleted - - deleted_at : migration_deleted_at - - instances : migration_instances - - notes : migration_notes - - status : migration_status - - user_id : user_id - - destination_environment : destination_environment - - source_environment : source_environment - - type : migration_type - - origin_endpoint_id : migration_origin_endpoint_id - - created_at : migration_created_at - - updated_at : migration_updated_at - - project_id : project_id - - replica_id : migration_replica_id - - base_id : base_id - - destination_endpoint_id : migration_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - last_execution_status : migration_last_execution_status - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - shutdown_instances : migration_shutdown_instances - - replication_count : replication_count - -**Example of a Migration List** - - .. literalinclude:: ../api_samples/migration/openstack-migration-list-detail-resp.json - :language: javascript - - -Show Migration -============== - -.. rest_method:: GET /migrations/{migration_id} - -Shows details about a migration. - -**Preconditions** - -The migration must exist. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - migration_id : migration_id_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - migration : migration_object - - id : migration_id - - deleted : migration_deleted - - deleted_at : migration_deleted_at - - instances : migration_instances - - notes : migration_notes - - status : migration_status - - tasks : migration_tasks - - user_id : user_id - - destination_environment : destination_environment - - source_environment : source_environment - - type : migration_type - - origin_endpoint_id : migration_origin_endpoint_id - - created_at : migration_created_at - - updated_at : migration_updated_at - - project_id : project_id - - replica_id : migration_replica_id - - base_id : base_id - - destination_endpoint_id : migration_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - last_execution_status : migration_last_execution_status - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - shutdown_instances : migration_shutdown_instances - - replication_count : replication_count - -**Example of a Migration Show Response** - .. literalinclude:: ../api_samples/migration/openstack-migration-get-resp.json - :language: javascript - -Create Migration -================ - -.. rest_method:: POST /migrations - -Creates a normal migration. - -Normal response codes: 200 - -forbidden(403) Error response codes: unauthorized(401), - -Request -------- - -.. rest_parameters:: parameters.yaml - - - migration : migration_object - - network_map : network_map - - storage_mappings : storage_map - - destination_environment : destination_environment - - source_environment : source_environment - - skip_os_morphing : skip_os_morphing - - destination_endpoint_id : migration_destination_endpoint_id - - origin_endpoint_id : migration_origin_endpoint_id - - instances : migration_instances - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - shutdown_instances : migration_shutdown_instances - - replication_count : replication_count - - user_scripts : user_scripts - -**Example Migration Create Request** - .. literalinclude:: ../api_samples/migration/openstack-migration-create-req.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - migration : migration_object - - id : migration_id - - deleted : migration_deleted - - deleted_at : migration_deleted_at - - instances : migration_instances - - notes : migration_notes - - status : migration_notes - - tasks : migration_tasks - - user_id : user_id - - destination_environment : destination_environment - - source_environment : source_environment - - type : migration_type - - info : migration_info - - origin_endpoint_id : migration_origin_endpoint_id - - created_at : migration_created_at - - updated_at : migration_updated_at - - project_id : project_id - - replica_id : migration_replica_id - - base_id : base_id - - destination_endpoint_id : migration_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - last_execution_status : migration_last_execution_status - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - shutdown_instances : migration_shutdown_instances - - replication_count : replication_count - -**Example Migration Create Response** - .. literalinclude:: ../api_samples/migration/openstack-migration-create-resp.json - :language: javascript - -Create Migration From Replica -============================= - -.. rest_method:: POST /migrations - -Creates migration from a successful replica execution. - -Normal response codes: 200 - -Error response codes: -unauthorized(401), forbidden(403), itemNotFound(404) - - -Request -------- - -.. rest_parameters:: parameters.yaml - - - migration : migration_object - - replica_id : replica_id - - force : migration_force - - clone_disks : migration_clone_disks - - skip_os_morphing : skip_os_morphing - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - -**Example of Migration Create From Replica Request** - .. literalinclude:: ../api_samples/migration/migration-from-replica-req.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - migration : migration_object - - id : migration_id - - deleted : migration_deleted - - deleted_at : migration_deleted_at - - instances : migration_instances - - notes : migration_notes - - status : migration_notes - - tasks : migration_tasks - - user_id : user_id - - destination_environment : destination_environment - - source_environtment : source_environment - - type : migration_type - - info : migration_info - - origin_endpoint_id : migration_origin_endpoint_id - - created_at : migration_created_at - - updated_at : migration_updated_at - - project_id : project_id - - replica_id : migration_replica_id - - base_id : base_id - - destination_endpoint_id : migration_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - last_execution_status : migration_last_execution_status - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - shutdown_instances : migration_shutdown_instances - -**Example of Migration Create From Replica Response** - .. literalinclude:: ../api_samples/migration/openstack-migration-from-replica-resp.json - :language: javascript - -Delete Migration -================ -.. rest_method:: DELETE /migrations/{migration_id} - -Deletes an non-running migration. - -**Preconditions** - -The migration must exist and not be running. - -Normal response codes: 204 - -Error response codes: -unauthorized(401), forbidden(403), itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - migration_id : migration_id_path - -Response --------- - -There is no response body for a successful deletion of an migration. - - -Cancel Migration -================ - -.. rest_method:: POST /migrations/{migration_id}/actions - -Cancels a running migration. - -**Preconditions** - -The migration must exist and must be running. - -Normal response codes: 200 - - -Error response codes: unauthorized(401), forbidden(403), -itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - migration_id : migration_id_path - - force : migration_cancel_force - - cancel : migration_cancel - -**Example of A Migration Cancellation Request** - .. literalinclude:: ../api_samples/migration/migration-cancel-req.json - :language: javascript - -Response --------- - -There is no response to a successful migration cancellation. diff --git a/coriolis/api-refs/source/parameters.yaml b/coriolis/api-refs/source/parameters.yaml index 5a4db2295..1155fd96a 100644 --- a/coriolis/api-refs/source/parameters.yaml +++ b/coriolis/api-refs/source/parameters.yaml @@ -1,4 +1,10 @@ # path variables +deployment_id_path: + description: | + The id of the deployment + in: path + required: true + type: uuid endpoint_id_path: description: | The id of the endpoint. @@ -7,7 +13,7 @@ endpoint_id_path: type: uuid execution_id_path: description: | - The id of the replica execution. + The id of the transfer execution. in: path required: true type: uuid @@ -17,12 +23,6 @@ instance_name_base64_path: in: path required: true type: string -migration_id_path: - description: | - The id of the migration - in: path - required: true - type: uuid minion_pool_id_path: description: | The ID of the minion pool. @@ -47,27 +47,27 @@ region_id_path: in: path type: uuid required: true -replica_id_path: +service_id_path: description: | - The id of the replica. + The ID of the service. in: path type: uuid required: true -replica_schedule_id_path: +transfer_id_path: description: | - The ID of the replica schedule. + The ID of the transfer. in: path type: uuid required: true -replica_tasks_execution_id_path: +transfer_schedule_id_path: description: | - The id of the replica execution. + The id of the transfer schedule. in: path type: uuid required: true -service_id_path: +transfer_tasks_execution_id_path: description: | - The ID of the service. + The id of the transfer execution. in: path type: uuid required: true @@ -81,7 +81,7 @@ instance_limit: # body variables base_id: description: | - The id of the migration in the mariadb database. + The id of the deployment in the mariadb database. in: body type: string required: true @@ -98,6 +98,131 @@ connection_info_schema: in: body type: object required: false +deployment_cancel: + description: | + Object containing information about the type of deployment cancellation. + in: body + type: string + required: true +deployment_cancel_force: + description: | + Boolean representing whether the deployment cancellation is forced. + in: body + type: boolean + required: true +deployment_clone_disks: + description: | + Boolean representing whether the deployment is started from transferred disks. + in: body + type: boolean + required: true +deployment_created_at: + description: | + Timestamp of deployment creation. + in: body + type: string + required: true +deployment_deleted: + description: | + Whether a deployment is deleted or not. + 1 for deleted + 0 for not deleted + in: body + type: integer + required: true +deployment_deleted_at: + description: | + The timestamp of deletion for a deployment. + in: body + type: object + required: true +deployment_destination_endpoint_id: + description: | + The id of the deployment destination cloud endpoint. + in: body + type: uuid + required: true +deployment_force: + description: | + Boolean representing whether the deployment is forced or not. + in: body + type: boolean + required: true +deployment_id: + description: | + The id of a coriolis deployment. + in: body + type: uuid + required: true +deployment_info: + description: | + Information about the instance that is deployed. + in: body + type: object + required: true +deployment_instances: + description: | + An array of all instance identifiers to be deployed. + in: body + type: array + required: true +deployment_last_execution_status: + description: | + Last execution status of the current deployment. + in: body + type: string + required: true +deployment_notes: + description: | + Notes about the deployment. + in: body + type: object + required: true +deployment_object: + description: | + Object containing deployment details. + in: body + type: object + required: true +deployment_origin_endpoint_id: + description: | + The id of the deployment source cloud endpoint. + in: body + type: uuid + required: true +deployment_shutdown_instances: + description: | + A boolean which describes whether the execution to shutdown the source + instance for the deployment process. + in: body + type: boolean + required: true +deployment_tasks: + description: | + The array of tasks that the deployment is going through, + contains id,instance name, status, and other details about + each task. + in: body + type: array + required: true +deployment_type: + description: | + The type of deployment, can also be a transfer. + in: body + type: string + required: true +deployment_updated_at: + description: | + Timestamp of last deployment update. + in: body + type: string + required: true +deployments_array: + description: | + Array of deployment objects. + in: body + type: array + required: true destination_environment: description: | JSON containing the options of how the instance will be @@ -127,7 +252,7 @@ destination_minion_pool_options: destination_options: description: | An array that contains the parameter options possible for - a migration or replica with the endpoint as destination. + a deployment or transfer with the endpoint as destination. in: body type: object required: true @@ -331,7 +456,7 @@ instance_os_type: required: true instance_osmorphing_minion_pool_mappings: description: | - Mapping between migrated instance name and their respective morphing minion pool IDs. + Mapping between deployed instance name and their respective morphing minion pool IDs. in: body type: object required: true @@ -347,143 +472,6 @@ maximum_minions: in: body type: integer required: false -migration_cancel: - description: | - Object containing information about the type of migration cancellation. - in: body - type: string - required: true -migration_cancel_force: - description: | - Boolean representing whether the migration cancellation is forced. - in: body - type: boolean - required: true -migration_clone_disks: - description: | - Boolean representing whether the migration is started from replicated disks. - in: body - type: boolean - required: true -migration_created_at: - description: | - Timestamp of migration creation. - in: body - type: string - required: true -migration_deleted: - description: | - Whether a migration is deleted or not. - 1 for deleted - 0 for not deleted - in: body - type: integer - required: true -migration_deleted_at: - description: | - The timestamp of deletion for a migration. - in: body - type: object - required: true -migration_destination_endpoint_id: - description: | - The id of the migration destination cloud endpoint. - in: body - type: uuid - required: true -migration_force: - description: | - Boolean representing whether the migration is forced or not. - in: body - type: boolean - required: true -migration_id: - description: | - The id of a coriolis migration. - in: body - type: uuid - required: true -migration_info: - description: | - Information about the instance that is migrated. - in: body - type: object - required: true -migration_instances: - description: | - An array of all instance identifiers to be migrated. - in: body - type: array - required: true -migration_last_execution_status: - description: | - Last execution status of the current migration. - in: body - type: string - required: true -migration_notes: - description: | - Notes about the migration. - in: body - type: object - required: true -migration_object: - description: | - Object containing migration details. - in: body - type: object - required: true -migration_origin_endpoint_id: - description: | - The id of the migration source cloud endpoint. - in: body - type: uuid - required: true -migration_replica_id: - description: | - id of the replica if the migration is created from one. - in: body - type: uuid - required: true -migration_shutdown_instances: - description: | - A boolean which describes whether the execution to shutdown the source - instance for the migration process. - in: body - type: boolean - required: true -migration_status: - description: | - Migration status, can either be ``RUNNING``, ``ERROR`` or ``COMPLETED``. - in: body - type: string - required: true -migration_tasks: - description: | - The array of tasks that the migration is going through, - contains id,instance name, status, and other details about - each task. - in: body - type: array - required: true -migration_type: - description: | - The type of migration, can also be a replica. - in: body - type: string - required: true -migration_updated_at: - description: | - Timestamp of last migration update. - in: body - type: string - required: true -migrations_array: - description: | - Array of migration objects. - in: body - type: array - required: true minimum_minions: description: | Minimum number of minion machines to be allocated for the minion pool. @@ -801,471 +789,477 @@ regions_array: in: body type: array required: true -replica_action_id: +scenario_type: description: | - Id of the replica excution. - in: body - type: uuid - required: true -replica_created_at: - description: | - Timestamp of replica creation. + The type of scenario. in: body type: string required: true -replica_delete_disks: +schemas: description: | - An object that describes delete disk replica action. + Object containing the platform's requested schema. in: body type: object required: true -replica_deleted: +service_binary: description: | - Value representing whether the replica is deleted or not + The name of the service binary. in: body - type: integer + type: string required: true -replica_deleted_at: +service_created_at: description: | - Timestamp of replica deletion if applicable. + Timestamp of service creation. in: body type: string required: true -replica_destination_endpoint_id: +service_deleted: description: | - The id of the destination cloud endpoint for the replica action. + Value representing whether the service is deleted or not. in: body - type: uuid + type: string required: true -replica_destination_environment: +service_deleted_at: description: | - The configuration on the destination cloud provider for the replica. + Timestamp of service deletion. in: body type: string - required: false -replica_empty_execution_array: + required: true +service_enabled: description: | - An empty array. Use the ``/replicas/{replica_id}`` request to get the replica executions. + Boolean representing whether the service is enabled or not. in: body - type: array + type: boolean required: true -replica_execution: +service_host: description: | - An ``execution`` object. + The hostname of the service. in: body - type: object + type: string required: true -replica_execution_action: +service_id: description: | - An ``action`` object regarding the specific operation. + The ID of the service. in: body - type: array + type: uuid required: true -replica_execution_array: +service_mapped_regions: description: | - An array of ``execution`` objects. + Array of regions mapped to this service. in: body type: array - required: true -replica_execution_created_at: + required: false +service_object: description: | - Timestamp of creation time of the replica execution. + Object containing information about the service. in: body - type: integer + type: object required: true -replica_execution_deleted: +service_providers: description: | - Integer representing whether the execution is deleted or not. + Object containing mappings of provider names and provider types available to this service. in: body - type: integer + type: object required: true -replica_execution_deleted_at: +service_specs: description: | - Timestamp of deletion time, if applicable for the replica execution. + Object containing miscellaneous specifications about the service. in: body - type: integer + type: object required: true -replica_execution_force: +service_status: description: | - A boolean which describes whether to force the cancellation of a replica - execution. + The status of the service. Possible values: "UP", "DOWN", "UNKNOWN". in: body - type: boolean + type: string required: true -replica_execution_id: +service_topic: description: | - The id of the replica execution. + The name of the service's messaging topic. in: body - type: array + type: string required: true -replica_execution_number: +service_updated_at: description: | - Integer representing n'th execution of the replica. + Timestamp of last service update. in: body - type: integer + type: string required: true -replica_execution_object: +services_array: description: | - An ``execution`` object + Array of service objects. in: body - type: boolean + type: array required: true -replica_execution_status: - description: > - The status of the replica execution, can either be ``RUNNING`` , ``ERROR`` - or ``COMPLETED`` +skip_os_morphing: + description: | + Boolean whether to skip os morphing or not. in: body - type: string + type: boolean required: true -replica_execution_tasks: +source_environment: description: | - An array of all the tasks regarding a specific replica execution. + JSON containing the options specific to the source cloud of the instance. in: body - type: array + type: object required: true -replica_execution_type: +source_environment_schema: description: | - The type of the replica execution. Can either be 'replica_execution', 'replica_update' or 'replica_disks_delete' + Object containing the source environment schema of the platform. in: body - type: string - required: true -replica_execution_updated_at: + type: object + required: false +source_minion_pool_options: description: | - Timestamp of last replica execution update. + Array that contains the paramter options possible for a minion pool with the endpoint as source. in: body - type: string + type: array required: true -replica_id: +source_options: description: | - The id of the replica. + An array that contains the parameter options possible for + a deployment or transfer with the endpoint as source. in: body - type: uuid + type: object required: true -replica_instances: +storage_backends: description: | - Name array of the instances to be replicated. + Array containing storage backends available to an endpoint. in: body type: array required: true -replica_last_execution_status: +storage_id: description: | - Last execution status of the current replica. + The unique identifier of a storage backend in: body type: string required: true -replica_network_map: +storage_map: description: | - Object containing the network mapping. + Object containing storage backend mapping. in: body type: object - required: false -replica_notes: + required: true +storage_name: description: | - Notes about the replica. + Name of the storage backend in: body type: string required: true -replica_object: +transfer_action_id: description: | - Object containing information about a replica. + Id of the transfer excution. in: body - type: object + type: uuid required: true -replica_origin_endpoint_id: +transfer_created_at: description: | - The id of the origin cloud endpoint for the replica action. + Timestamp of transfer creation. in: body - type: uuid + type: string required: true -replica_schedule: +transfer_delete_disks: description: | - Object containing the schedule information(month, day of month, etc.). + An object that describes delete disk transfer action. in: body type: object required: true -replica_schedule_created_at: +transfer_deleted: description: | - Timestamp of replica schedule creation. + Value representing whether the transfer is deleted or not in: body - type: string + type: integer required: true -replica_schedule_day_of_month: +transfer_deleted_at: description: | - The day of the month at which to run. + Timestamp of transfer deletion if applicable. in: body - type: integer - required: false -replica_schedule_day_of_week: + type: string + required: true +transfer_destination_endpoint_id: description: | - The day of week in which to run. + The id of the destination cloud endpoint for the transfer action. in: body - type: integer - required: false -replica_schedule_deleted: + type: uuid + required: true +transfer_destination_environment: description: | - Value representing whether the replica schedule is deleted or not + The configuration on the destination cloud provider for the transfer. in: body type: string - required: true -replica_schedule_deleted_at: + required: false +transfer_empty_execution_array: description: | - Timestamp of replica schedule deletion if applicable. + An empty array. Use the ``/transfers/{transfer_id}`` request to get the transfer executions. in: body - type: string + type: array required: true -replica_schedule_enabled: +transfer_execution: description: | - Whether the schedule is enabled or not. + An ``execution`` object. in: body - type: boolean + type: object required: true -replica_schedule_expiration: +transfer_execution_action: description: | - ISO8601 formatted date which sets the replica schedule expiration date. + An ``action`` object regarding the specific operation. in: body - type: string + type: array required: true -replica_schedule_expiration_request: +transfer_execution_array: description: | - ISO8601 formatted date which sets the replica schedule expiration date. + An array of ``execution`` objects. in: body - type: string - required: false -replica_schedule_hour: + type: array + required: true +transfer_execution_created_at: description: | - The hour of the day at which to run. + Timestamp of creation time of the transfer execution. in: body type: integer - required: false -replica_schedule_id: - description: | - The ID of the replica schedule. - in: body - type: uuid required: true -replica_schedule_minute: +transfer_execution_deleted: description: | - The minute of the hour at which to run. + Integer representing whether the execution is deleted or not. in: body type: integer - required: false -replica_schedule_month: + required: true +transfer_execution_deleted_at: description: | - The month in which to run. + Timestamp of deletion time, if applicable for the transfer execution. in: body type: integer - required: false -replica_schedule_updated_at: + required: true +transfer_execution_force: description: | - Timestamp of last replica schedule update. + A boolean which describes whether to force the cancellation of a transfer + execution. in: body - type: string + type: boolean required: true -replica_schedules: +transfer_execution_id: description: | - Array of replica schedules. + The id of the transfer execution. in: body type: array required: true -replica_shutdown_instances: +transfer_execution_number: description: | - A boolean which describes whether the execution to shutdown the source - instance for the replication process. + Integer representing n'th execution of the transfer. in: body - type: boolean + type: integer required: true -replica_source_environment: +transfer_execution_object: description: | - The configuration on the source cloud provider for the replica. + An ``execution`` object in: body - type: object - required: false -replica_storage_map: + type: boolean + required: true +transfer_execution_status: + description: > + The status of the transfer execution, can either be ``RUNNING`` , ``ERROR`` + or ``COMPLETED`` + in: body + type: string + required: true +transfer_execution_tasks: description: | - Object containing storage backend mapping. + An array of all the tasks regarding a specific transfer execution. in: body - type: object - required: false -replica_type: + type: array + required: true +transfer_execution_type: description: | - Type of coriolis action, in this case, a replica. + The type of the transfer execution. Can either be 'transfer_execution', 'transfer_update' or 'transfer_disks_delete' in: body type: string required: true -replica_update_notes: +transfer_execution_updated_at: description: | - Notes about the replica. + Timestamp of last transfer execution update. in: body type: string - required: false -replica_updated_at: + required: true +transfer_id: description: | - Timestamp of last replica update. + The id of the transfer. in: body - type: string + type: uuid required: true -replicas_array: +transfer_instances: description: | - Array of replica objects. + Name array of the instances to be transferred. in: body type: array required: true -replication_count: +transfer_last_execution_status: description: | - The number of disk syncs performed during a migration. + Last execution status of the current transfer. in: body - type: integer + type: string required: true -schemas: +transfer_network_map: description: | - Object containing the platform's requested schema. + Object containing the network mapping. in: body type: object - required: true -service_binary: + required: false +transfer_notes: description: | - The name of the service binary. + Notes about the transfer. in: body type: string required: true -service_created_at: +transfer_object: description: | - Timestamp of service creation. + Object containing information about a transfer. in: body - type: string + type: object required: true -service_deleted: +transfer_origin_endpoint_id: description: | - Value representing whether the service is deleted or not. + The id of the origin cloud endpoint for the transfer action. in: body - type: string + type: uuid required: true -service_deleted_at: +transfer_scenario_type: description: | - Timestamp of service deletion. + The type of transfer scenario. in: body type: string required: true -service_enabled: +transfer_schedule: description: | - Boolean representing whether the service is enabled or not. + Object containing the schedule information(month, day of month, etc.). in: body - type: boolean + type: object required: true -service_host: +transfer_schedule_created_at: description: | - The hostname of the service. + Timestamp of transfer schedule creation. in: body type: string required: true -service_id: +transfer_schedule_day_of_month: description: | - The ID of the service. + The day of the month at which to run. in: body - type: uuid - required: true -service_mapped_regions: + type: integer + required: false +transfer_schedule_day_of_week: description: | - Array of regions mapped to this service. + The day of week in which to run. in: body - type: array + type: integer required: false -service_object: +transfer_schedule_deleted: description: | - Object containing information about the service. + Value representing whether the transfer schedule is deleted or not in: body - type: object + type: string required: true -service_providers: +transfer_schedule_deleted_at: description: | - Object containing mappings of provider names and provider types available to this service. + Timestamp of transfer schedule deletion if applicable. in: body - type: object + type: string required: true -service_specs: +transfer_schedule_enabled: description: | - Object containing miscellaneous specifications about the service. + Whether the schedule is enabled or not. in: body - type: object + type: boolean required: true -service_status: +transfer_schedule_expiration: description: | - The status of the service. Possible values: "UP", "DOWN", "UNKNOWN". + ISO8601 formatted date which sets the transfer schedule expiration date. in: body type: string required: true -service_topic: +transfer_schedule_expiration_request: description: | - The name of the service's messaging topic. + ISO8601 formatted date which sets the transfer schedule expiration date. in: body type: string + required: false +transfer_schedule_hour: + description: | + The hour of the day at which to run. + in: body + type: integer + required: false +transfer_schedule_id: + description: | + The ID of the transfer schedule. + in: body + type: uuid required: true -service_updated_at: +transfer_schedule_minute: description: | - Timestamp of last service update. + The minute of the hour at which to run. + in: body + type: integer + required: false +transfer_schedule_month: + description: | + The month in which to run. + in: body + type: integer + required: false +transfer_schedule_updated_at: + description: | + Timestamp of last transfer schedule update. in: body type: string required: true -services_array: +transfer_schedules: description: | - Array of service objects. + Array of transfer schedules. in: body type: array required: true -skip_os_morphing: +transfer_shutdown_instances: description: | - Boolean whether to skip os morphing or not. + A boolean which describes whether the execution to shutdown the source + instance for the transfer process. in: body type: boolean required: true -source_environment: - description: | - JSON containing the options specific to the source cloud of the instance. - in: body - type: object - required: true -source_environment_schema: +transfer_source_environment: description: | - Object containing the source environment schema of the platform. + The configuration on the source cloud provider for the transfer. in: body type: object required: false -source_minion_pool_options: +transfer_storage_map: description: | - Array that contains the paramter options possible for a minion pool with the endpoint as source. - in: body - type: array - required: true -source_options: - description: | - An array that contains the parameter options possible for - a migration or replica with the endpoint as source. + Object containing storage backend mapping. in: body type: object - required: true -storage_backends: + required: false +transfer_type: description: | - Array containing storage backends available to an endpoint. + Type of coriolis action, in this case, a transfer. in: body - type: array + type: string required: true -storage_id: +transfer_update_notes: description: | - The unique identifier of a storage backend + Notes about the transfer. in: body type: string - required: true -storage_map: + required: false +transfer_updated_at: description: | - Object containing storage backend mapping. + Timestamp of last transfer update. in: body - type: object + type: string required: true -storage_name: +transfers_array: description: | - Name of the storage backend + Array of transfer objects. in: body - type: string + type: array required: true user_id: description: | @@ -1275,7 +1269,7 @@ user_id: required: true user_scripts: description: | - Mapping between instances selected for migration and custom scripts to be run during OSMorphing stage. + Mapping between instances selected for deployment and custom scripts to be run during OSMorphing stage. in: body type: object required: false diff --git a/coriolis/api-refs/source/replica.inc b/coriolis/api-refs/source/replica.inc deleted file mode 100644 index 7f69c4d07..000000000 --- a/coriolis/api-refs/source/replica.inc +++ /dev/null @@ -1,767 +0,0 @@ -.. -*- rst -*- - -======== -Replicas -======== - -Lists, creates, updates, shows details for, and deletes cloud replicas. - - -List Replicas -============= - -.. rest_method:: GET /replicas - -List all replicas. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403), itemNotFound(404) - -Response --------- - -.. rest_parameters:: parameters.yaml - - - replicas : replicas_array - - id : replica_id - - deleted : replica_deleted - - deleted_at : replica_deleted_at - - executions : replica_empty_execution_array - - instances : replica_instances - - notes : replica_notes - - user_id : user_id - - destination_environment : destination_environment - - source_environment : source_environment - - type : replica_type - - origin_endpoint_id : replica_origin_endpoint_id - - created_at : replica_created_at - - updated_at : replica_updated_at - - project_id : project_id - - base_id : base_id - - destination_endpoint_id : replica_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - last_execution_status : replica_last_execution_status - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - -**Example of Replica List Response** - -.. literalinclude:: ../api_samples/replica/replica-list-resp.json - :language: javascript - - -Show Replica -============ - -.. rest_method:: GET /replicas/{replica_id} - -Shows details about a replica. - -**Preconditions** - -The replica must exist. - - -Error response codes: unauthorized(401), -forbidden(403), itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - rpelica : replica_object - - id : replica_id - - deleted : replica_deleted - - deleted_at : replica_deleted_at - - executions : replica_execution_array - - instances : replica_instances - - notes : replica_notes - - user_id : user_id - - destination_environment : destination_environment - - source_environment : source_environment - - type : replica_type - - origin_endpoint_id : replica_origin_endpoint_id - - created_at : replica_created_at - - updated_at : replica_updated_at - - project_id : project_id - - base_id : base_id - - destination_endpoint_id : replica_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - last_execution_status : replica_last_execution_status - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - -**Example of Replica Show Response** - - .. literalinclude:: ../api_samples/replica/openstack-replica-get-resp.json - :language: javascript - -Create Replica -============== - -.. rest_method:: POST /replicas - -Creates a replica. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica : replica_object - - destination_environment : replica_destination_environment - - source_environment : replica_source_environment - - destination_endpoint_id : replica_destination_endpoint_id - - origin_endpoint_id : replica_origin_endpoint_id - - instances : replica_instances - - network_map : network_map - - storage_mappings : storage_map - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - user_scripts : user_scripts - -**Example of Replica Create Request** - - .. literalinclude:: ../api_samples/replica/openstack-replica-create-req.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - replica : replica_object - - id : replica_id - - deleted : replica_deleted - - deleted_at : replica_deleted_at - - executions : replica_execution_array - - instances : replica_instances - - notes : replica_notes - - user_id : user_id - - destination_environment : destination_environment - - source_environment : source_environment - - type : replica_type - - origin_endpoint_id : replica_origin_endpoint_id - - created_at : replica_created_at - - updated_at : replica_updated_at - - project_id : project_id - - base_id : base_id - - destination_endpoint_id : replica_destination_endpoint_id - - network_map : network_map - - storage_mappings : storage_map - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - user_scripts : user_scripts - -**Example of Replica Create Response** - -.. literalinclude:: ../api_samples/replica/openstack-replica-create-resp.json - :language: javascript - -Update Replica -============== - -.. rest_method:: PUT /replicas/{replica_id} - -Updates a replica. - -**Preconditions** -The replica must exist. - -Normal response codes: 200 - -Error response codes: unauthorized(401), forbidden(403), -itemNotFound(404) - -Request -------- - - .. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - destination_environment : replica_destination_environment - - source_environment : replica_source_environment - - network_map : replica_network_map - - notes : replica_update_notes - - storage_mappings : replica_storage_map - -**Example of Replica Update Request** - -.. literalinclude:: ../api_samples/replica/replica-update-req.json - :language: javascript - -Response --------- - - .. rest_parameters:: parameters.yaml - - - execution : replica_execution_object - - number : replica_execution_number - - action_id : replica_id - - deleted : replica_execution_deleted - - deleted_at : replica_execution_deleted_at - - created_at : replica_execution_created_at - - updated_at : replica_execution_updated_at - - status : replica_execution_status - - tasks : replica_execution_tasks - - action : replica_execution_action - - id : replica_execution_id - - origin_minion_pool_id : origin_minion_pool_id - - destination_minion_pool_id : destination_minion_pool_id - - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings - - user_scripts : user_scripts - -**Example of Replica Update Response** - -.. literalinclude:: ../api_samples/replica/replica-update-resp.json - :language: javascript - - -Delete Replica -============== - -.. rest_method:: DELETE /replicas/{replica_id} - -Deletes a replica. - -**Preconditions** - -The replica must exist and not have a running execution or migration. - -Normal response codes: 204 - -Error response codes: unauthorized(401), forbidden(403), -itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - -Response --------- - -There is no response body for a successful deletion. - -Create Replica Execution -======================== - -.. rest_method:: POST /replicas/{replica_id}/executions - -Executes a replica. - -**Preconditions** - -The replica must exist. - -Normal response codes: 200 - -Error response codes: unauthorized(401), forbidden(403), - -Request -------- - -.. rest_parameters:: parameters.yaml - - - shutdown_instances : replica_shutdown_instances - - replica_id : replica_id_path - -**Example Replica Execution Create Request** - -.. literalinclude:: ../api_samples/replica/replica-execution-req.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - execution : replica_execution - - id : replica_execution_id - - action_id : replica_id - - deleted : replica_deleted - - deleted_at : replica_execution_deleted_at - - created_at : replica_execution_created_at - - updated_at : replica_execution_updated_at - - status : replica_execution_status - - number : replica_execution_number - - tasks : replica_execution_tasks - - action : replica_execution_action - - type : replica_execution_type - -**Example Replica Execution Response** - - .. literalinclude:: ../api_samples/replica/openstack-replica-execution-resp.json - :language: javascript - -List Replica Executions -======================= - -.. rest_method:: GET /replicas/{replica_id}/executions - -List a replica's executions. - -**Preconditions** -The replica must exist. - -Normal response codes: 200 - -Error response codes: unauthorized(401), forbidden(403), -itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - executions : replica_execution_array - - updated_at : replica_updated_at - - action_id : replica_id - - deleted : replica_execution_deleted - - deleted_at : replica_execution_deleted_at - - created_at : replica_execution_created_at - - number : replica_execution_number - - status : replica_execution_status - - id : replica_execution_id - - type : replica_execution_type - -**Example Replica Execute Response** - - .. literalinclude:: ../api_samples/replica/replica-execution-list-resp.json - :language: javascript - -Show Replica Execution -====================== - -.. rest_method:: GET /replicas/{replica_id}/executions/{execution_id} - -Show a replica's execution. - -**Preconditions** -The replica execution must exist. - -Normal response codes: 200 - -Error response codes: -unauthorized(401), forbidden(403), itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - execution_id : execution_id_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - execution : replica_execution_object - - number : replica_execution_number - - action_id : replica_id - - deleted : replica_execution_deleted - - deleted_at : replica_execution_deleted_at - - created_at : replica_execution_created_at - - updated_at : replica_execution_updated_at - - status : replica_execution_status - - tasks : replica_execution_tasks - - action : replica_execution_action - - id : replica_execution_id - - type : replica_execution_type - - -**Example of Replica Executions Show Response** - .. literalinclude:: ../api_samples/replica/openstack-replica-execution-show-resp.json - :language: javascript - -Replica Actions -=============== - - -Delete Replica Disks -==================== - -.. rest_method:: POST /replicas/{replica_id}/actions - -Deletes a replicas disks on the destination environment. - -**Preconditions** - -The replica execution must have at least one successful execution. - - -Normal response codes: 200 - -Error response codes: -unauthorized(401), forbidden(403), itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - delete_disks : replica_delete_disks - - replica_id : replica_id_path - -**Example of Replica Execution Cancel Request** - - .. literalinclude:: ../api_samples/replica/replica-disks-delete-req.json - :language: javascript - -Response --------- - -The last execution of the requested replica is returned. - -**Example of Delete Replica Disks Response** - - .. literalinclude:: ../api_samples/replica/openstack-replica-execution-show-resp.json - :language: javascript - -Replica Execution Actions -========================= - -Cancel Replica Execution -======================== - -.. rest_method:: POST /replicas/{replica_id}/executions/{execution_id}/actions - -Cancels an ongoing replica execution. - -**Preconditions** - -The replica must exist and its execution must be ongoing. - -Normal response codes: 200 - -Error response codes: unauthorized(401), forbidden(403), -itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - force : replica_execution_force - - replica_id : replica_id_path - - execution_id : execution_id_path - -**Example of Replica Execution Cancel Request** - - .. literalinclude:: ../api_samples/replica/replica-execution-cancel-req.json - :language: javascript - -Response --------- - -There is no response to a successful replicas execution cancellation. - -Delete Replica Execution -======================== -.. rest_method:: DELETE /replicas/{replica_id}/executions/{execution_id} - -Deletes an replica execution. - -**Preconditions** - -The replica execution must not be running. - -Normal response codes: 204 - -Error response codes: -unauthorized(401), forbidden(403), itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - execution_id : execution_id_path - -Response --------- - -There is no response body for a successful deletion of an replica execution. - - -Replica Scheduling -================== - -Replica Schedule List -===================== - -.. rest_method:: GET /replicas/{replica_id}/schedules - -List schedules for a replica. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403), itemNotFound(404) - -Request -------- - - .. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - -Response --------- - - .. rest_parameters:: parameters.yaml - - - schedules : replica_schedules - - id : replica_schedule_id - - deleted : replica_schedule_deleted - - deleted_at : replica_schedule_deleted_at - - created_at : replica_schedule_created_at - - updated_at : replica_schedule_updated_at - - replica_id : replica_id - - enabled : replica_schedule_enabled - - shutdown_instance : replica_shutdown_instances - - schedule : replica_schedule - - minute : replica_schedule_minute - - hour : replica_schedule_hour - - dom : replica_schedule_day_of_month - - month : replica_schedule_month - - dow : replica_schedule_day_of_week - - expiration_date : replica_schedule_expiration - -**Example of Replica Schedule List Response** - -.. literalinclude:: ../api_samples/replica/replica-schedule-list-resp.json - :language: javascript - - -Replica Schedule Show -===================== - -.. rest_method:: GET /replicas/{replica_id}/schedules/{schedule_id} - -Shows a replica schedule. - -**Preconditions** -The replica schedule must exist. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403), itemNotFound(404) - -Request -------- - - .. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - schedule_id : replica_schedule_id_path - -Response --------- - - .. rest_parameters:: parameters.yaml - - - id : replica_schedule_id - - deleted : replica_schedule_deleted - - deleted_at : replica_schedule_deleted_at - - created_at : replica_schedule_created_at - - updated_at : replica_schedule_updated_at - - replica_id : replica_id - - enabled : replica_schedule_enabled - - shutdown_instance : replica_shutdown_instances - - schedule : replica_schedule - - minute : replica_schedule_minute - - hour : replica_schedule_hour - - dom : replica_schedule_day_of_month - - month : replica_schedule_month - - dow : replica_schedule_day_of_week - - expiration_date : replica_schedule_expiration - -**Example Replica Schedule Show Response** - -.. literalinclude:: ../api_samples/replica/replica-schedule-show-resp.json - :language: javascript - -Replica Schedule Create -======================= - -.. rest_method:: POST /replicas/{replica_id}/schedules - -Creates a replica schedule. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - enabled : replica_schedule_enabled - - shutdown_instance : replica_shutdown_instances - - schedule : replica_schedule - - minute : replica_schedule_minute - - hour : replica_schedule_hour - - dom : replica_schedule_day_of_month - - month : replica_schedule_month - - dow : replica_schedule_day_of_week - - expiration_date : replica_schedule_expiration_request - -**Example of Replica Schedule Create Request** - -.. literalinclude:: ../api_samples/replica/replica-schedule-create-req.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - schedule : replica_schedule - - id : replica_schedule_id - - deleted : replica_schedule_deleted - - deleted_at : replica_schedule_deleted_at - - created_at : replica_schedule_created_at - - updated_at : replica_schedule_updated_at - - replica_id : replica_id - - enabled : replica_schedule_enabled - - shutdown_instance : replica_shutdown_instances - - schedule : replica_schedule - - minute : replica_schedule_minute - - hour : replica_schedule_hour - - dom : replica_schedule_day_of_month - - month : replica_schedule_month - - dow : replica_schedule_day_of_week - - expiration_date : replica_schedule_expiration - -**Example of Replica Schedule Create Response** - -.. literalinclude:: ../api_samples/replica/replica-schedule-create-resp.json - :language: javascript - -Replica Schedule Update -======================= - -.. rest_method:: PUT /replicas/{replica_id}/schedules/{schedule_id} - -Updates a replica schedule. - -**Preconditions** -The replica schedule must exist. - -Normal response codes: 200 - -Error response codes: unauthorized(401), -forbidden(403) - -Request -------- - - .. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - schedule_id : replica_schedule_id_path - - shutdown_instance : replica_shutdown_instances - - schedule : replica_schedule - - minute : replica_schedule_minute - - hour : replica_schedule_hour - - dom : replica_schedule_day_of_month - - month : replica_schedule_month - - dow : replica_schedule_day_of_week - - expiration_date : replica_schedule_expiration_request - -**Example of Replica Schedule Update Request** - -.. literalinclude:: ../api_samples/replica/replica-schedule-update-req.json - :language: javascript - -Response --------- - - .. rest_parameters:: parameters.yaml - - - id : replica_schedule_id - - deleted : replica_schedule_deleted - - deleted_at : replica_schedule_deleted_at - - created_at : replica_schedule_created_at - - updated_at : replica_schedule_updated_at - - replica_id : replica_id - - enabled : replica_schedule_enabled - - shutdown_instance : replica_shutdown_instances - - schedule : replica_schedule - - minute : replica_schedule_minute - - hour : replica_schedule_hour - - dom : replica_schedule_day_of_month - - month : replica_schedule_month - - dow : replica_schedule_day_of_week - - expiration_date : replica_schedule_expiration - -**Example of Replica Schedule Update Response** - -.. literalinclude:: ../api_samples/replica/replica-schedule-update-resp.json - :language: javascript - -Replica Schedule Delete -======================= - -.. rest_method:: DELETE /replicas/{replica_id}/schedules/{schedule_id} - -Deletes a replica schedule. - -**Preconditions** -The replica schedule must exist. - -Normal response codes: 204 - -Error response codes: unauthorized(401), -forbidden(403) - -Request -------- - - .. rest_parameters:: parameters.yaml - - - replica_id : replica_id_path - - schedule_id : replica_schedule_id - -Response --------- - -There is no response body for a successful deletion of a replica schedule. diff --git a/coriolis/api-refs/source/transfer.inc b/coriolis/api-refs/source/transfer.inc new file mode 100644 index 000000000..6f6ed5ac1 --- /dev/null +++ b/coriolis/api-refs/source/transfer.inc @@ -0,0 +1,774 @@ +.. -*- rst -*- + +========= +Transfers +========= + +Lists, creates, updates, shows details for, and deletes cloud transfers. + + +List Transfers +============== + +.. rest_method:: GET /transfers + +List all transfers. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403), itemNotFound(404) + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - transfers : transfers_array + - id : transfer_id + - deleted : transfer_deleted + - deleted_at : transfer_deleted_at + - executions : transfer_empty_execution_array + - instances : transfer_instances + - notes : transfer_notes + - user_id : user_id + - destination_environment : destination_environment + - source_environment : source_environment + - type : transfer_type + - origin_endpoint_id : transfer_origin_endpoint_id + - created_at : transfer_created_at + - updated_at : transfer_updated_at + - project_id : project_id + - base_id : base_id + - destination_endpoint_id : transfer_destination_endpoint_id + - network_map : network_map + - storage_mappings : storage_map + - last_execution_status : transfer_last_execution_status + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + - scenario: scenario_type + +**Example of Transfer List Response** + +.. literalinclude:: ../api_samples/transfer/transfer-list-resp.json + :language: javascript + + +Show Transfer +============= + +.. rest_method:: GET /transfers/{transfer_id} + +Shows details about a transfer. + +**Preconditions** + +The transfer must exist. + + +Error response codes: unauthorized(401), +forbidden(403), itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - transfer : transfer_object + - id : transfer_id + - deleted : transfer_deleted + - deleted_at : transfer_deleted_at + - executions : transfer_execution_array + - instances : transfer_instances + - notes : transfer_notes + - user_id : user_id + - destination_environment : destination_environment + - source_environment : source_environment + - type : transfer_type + - origin_endpoint_id : transfer_origin_endpoint_id + - created_at : transfer_created_at + - updated_at : transfer_updated_at + - project_id : project_id + - base_id : base_id + - destination_endpoint_id : transfer_destination_endpoint_id + - network_map : network_map + - storage_mappings : storage_map + - last_execution_status : transfer_last_execution_status + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + - scenario: scenario_type + +**Example of Transfer Show Response** + + .. literalinclude:: ../api_samples/transfer/openstack-transfer-get-resp.json + :language: javascript + +Create Transfer +=============== + +.. rest_method:: POST /transfers + +Creates a transfer. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer : transfer_object + - destination_environment : transfer_destination_environment + - source_environment : transfer_source_environment + - destination_endpoint_id : transfer_destination_endpoint_id + - origin_endpoint_id : transfer_origin_endpoint_id + - instances : transfer_instances + - network_map : network_map + - storage_mappings : storage_map + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + - id : transfer_id + - scenario: scenario_type + +**Example of Transfer Create Request** + + .. literalinclude:: ../api_samples/transfer/openstack-transfer-create-req.json + :language: javascript + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - transfer : transfer_object + - id : transfer_id + - deleted : transfer_deleted + - deleted_at : transfer_deleted_at + - executions : transfer_execution_array + - instances : transfer_instances + - notes : transfer_notes + - user_id : user_id + - destination_environment : destination_environment + - source_environment : source_environment + - type : transfer_type + - origin_endpoint_id : transfer_origin_endpoint_id + - created_at : transfer_created_at + - updated_at : transfer_updated_at + - project_id : project_id + - base_id : base_id + - destination_endpoint_id : transfer_destination_endpoint_id + - network_map : network_map + - storage_mappings : storage_map + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + - scenario: scenario_type + +**Example of Transfer Create Response** + +.. literalinclude:: ../api_samples/transfer/openstack-transfer-create-resp.json + :language: javascript + +Update Transfer +=============== + +.. rest_method:: PUT /transfers/{transfer_id} + +Updates a transfer. + +**Preconditions** +The transfer must exist. + +Normal response codes: 200 + +Error response codes: unauthorized(401), forbidden(403), +itemNotFound(404) + +Request +------- + + .. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + - destination_environment : transfer_destination_environment + - source_environment : transfer_source_environment + - network_map : transfer_network_map + - notes : transfer_update_notes + - storage_mappings : transfer_storage_map + +**Example of Transfer Update Request** + +.. literalinclude:: ../api_samples/transfer/transfer-update-req.json + :language: javascript + +Response +-------- + + .. rest_parameters:: parameters.yaml + + - execution : transfer_execution_object + - number : transfer_execution_number + - action_id : transfer_id + - deleted : transfer_execution_deleted + - deleted_at : transfer_execution_deleted_at + - created_at : transfer_execution_created_at + - updated_at : transfer_execution_updated_at + - status : transfer_execution_status + - tasks : transfer_execution_tasks + - action : transfer_execution_action + - id : transfer_execution_id + - origin_minion_pool_id : origin_minion_pool_id + - destination_minion_pool_id : destination_minion_pool_id + - instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings + - user_scripts : user_scripts + +**Example of Transfer Update Response** + +.. literalinclude:: ../api_samples/transfer/transfer-update-resp.json + :language: javascript + + +Delete Transfer +=============== + +.. rest_method:: DELETE /transfers/{transfer_id} + +Deletes a transfer. + +**Preconditions** + +The transfer must exist and not have a running execution or deployment. + +Normal response codes: 204 + +Error response codes: unauthorized(401), forbidden(403), +itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + +Response +-------- + +There is no response body for a successful deletion. + +Create Transfer Execution +========================= + +.. rest_method:: POST /transfers/{transfer_id}/executions + +Executes a transfer. + +**Preconditions** + +The transfer must exist. + +Normal response codes: 200 + +Error response codes: unauthorized(401), forbidden(403), + +Request +------- + +.. rest_parameters:: parameters.yaml + + - shutdown_instances : transfer_shutdown_instances + - transfer_id : transfer_id_path + +**Example Transfer Execution Create Request** + +.. literalinclude:: ../api_samples/transfer/transfer-execution-req.json + :language: javascript + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - execution : transfer_execution + - id : transfer_execution_id + - action_id : transfer_id + - deleted : transfer_deleted + - deleted_at : transfer_execution_deleted_at + - created_at : transfer_execution_created_at + - updated_at : transfer_execution_updated_at + - status : transfer_execution_status + - number : transfer_execution_number + - tasks : transfer_execution_tasks + - action : transfer_execution_action + - type : transfer_execution_type + +**Example Transfer Execution Response** + + .. literalinclude:: ../api_samples/transfer/openstack-transfer-execution-resp.json + :language: javascript + +List Transfer Executions +======================== + +.. rest_method:: GET /transfers/{transfer_id}/executions + +List a transfer's executions. + +**Preconditions** +The transfer must exist. + +Normal response codes: 200 + +Error response codes: unauthorized(401), forbidden(403), +itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - executions : transfer_execution_array + - updated_at : transfer_updated_at + - action_id : transfer_id + - deleted : transfer_execution_deleted + - deleted_at : transfer_execution_deleted_at + - created_at : transfer_execution_created_at + - number : transfer_execution_number + - status : transfer_execution_status + - id : transfer_execution_id + - type : transfer_execution_type + +**Example Transfer Execute Response** + + .. literalinclude:: ../api_samples/transfer/transfer-execution-list-resp.json + :language: javascript + +Show Transfer Execution +======================= + +.. rest_method:: GET /transfers/{transfer_id}/executions/{execution_id} + +Show a transfer's execution. + +**Preconditions** +The transfer execution must exist. + +Normal response codes: 200 + +Error response codes: +unauthorized(401), forbidden(403), itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + - execution_id : execution_id_path + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - execution : transfer_execution_object + - number : transfer_execution_number + - action_id : transfer_id + - deleted : transfer_execution_deleted + - deleted_at : transfer_execution_deleted_at + - created_at : transfer_execution_created_at + - updated_at : transfer_execution_updated_at + - status : transfer_execution_status + - tasks : transfer_execution_tasks + - action : transfer_execution_action + - id : transfer_execution_id + - type : transfer_execution_type + + +**Example of Transfer Executions Show Response** + .. literalinclude:: ../api_samples/transfer/openstack-transfer-execution-show-resp.json + :language: javascript + +Transfers Actions +================= + + +Delete Transfer Disks +===================== + +.. rest_method:: POST /transfers/{transfer_id}/actions + +Deletes a transfers disks on the destination environment. + +**Preconditions** + +The transfer execution must have at least one successful execution. + + +Normal response codes: 200 + +Error response codes: +unauthorized(401), forbidden(403), itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - delete_disks : transfer_delete_disks + - transfer_id : transfer_id_path + +**Example of Transfer Execution Cancel Request** + + .. literalinclude:: ../api_samples/transfer/transfer-disks-delete-req.json + :language: javascript + +Response +-------- + +The last execution of the requested transfer is returned. + +**Example of Delete Transfer Disks Response** + + .. literalinclude:: ../api_samples/transfer/openstack-transfer-execution-show-resp.json + :language: javascript + +Transfer Execution Actions +========================== + +Cancel Transfer Execution +========================= + +.. rest_method:: POST /transfers/{transfer_id}/executions/{execution_id}/actions + +Cancels an ongoing transfer execution. + +**Preconditions** + +The transfer must exist and its execution must be ongoing. + +Normal response codes: 200 + +Error response codes: unauthorized(401), forbidden(403), +itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - force : transfer_execution_force + - transfer_id : transfer_id_path + - execution_id : execution_id_path + +**Example of Transfer Execution Cancel Request** + + .. literalinclude:: ../api_samples/transfer/transfer-execution-cancel-req.json + :language: javascript + +Response +-------- + +There is no response to a successful transfers execution cancellation. + +Delete Transfer Execution +========================= +.. rest_method:: DELETE /transfers/{transfer_id}/executions/{execution_id} + +Deletes an transfer execution. + +**Preconditions** + +The Transfer execution must not be running. + +Normal response codes: 204 + +Error response codes: +unauthorized(401), forbidden(403), itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + - execution_id : execution_id_path + +Response +-------- + +There is no response body for a successful deletion of an transfer execution. + + +Transfer Scheduling +=================== + +Transfer Schedule List +====================== + +.. rest_method:: GET /transfers/{transfer_id}/schedules + +List schedules for a transfer. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403), itemNotFound(404) + +Request +------- + + .. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + +Response +-------- + + .. rest_parameters:: parameters.yaml + + - schedules : transfer_schedules + - id : transfer_schedule_id + - deleted : transfer_schedule_deleted + - deleted_at : transfer_schedule_deleted_at + - created_at : transfer_schedule_created_at + - updated_at : transfer_schedule_updated_at + - transfer_id : transfer_id + - enabled : transfer_schedule_enabled + - shutdown_instance : transfer_shutdown_instances + - schedule : transfer_schedule + - minute : transfer_schedule_minute + - hour : transfer_schedule_hour + - dom : transfer_schedule_day_of_month + - month : transfer_schedule_month + - dow : transfer_schedule_day_of_week + - expiration_date : transfer_schedule_expiration + +**Example of Transfer Schedule List Response** + +.. literalinclude:: ../api_samples/transfer/transfer-schedule-list-resp.json + :language: javascript + + +Transfer Schedule Show +====================== + +.. rest_method:: GET /transfers/{transfer_id}/schedules/{schedule_id} + +Shows a transfer schedule. + +**Preconditions** +The transfer schedule must exist. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403), itemNotFound(404) + +Request +------- + + .. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + - schedule_id : transfer_schedule_id_path + +Response +-------- + + .. rest_parameters:: parameters.yaml + + - id : transfer_schedule_id + - deleted : transfer_schedule_deleted + - deleted_at : transfer_schedule_deleted_at + - created_at : transfer_schedule_created_at + - updated_at : transfer_schedule_updated_at + - transfer_id : transfer_id + - enabled : transfer_schedule_enabled + - shutdown_instance : transfer_shutdown_instances + - schedule : transfer_schedule + - minute : transfer_schedule_minute + - hour : transfer_schedule_hour + - dom : transfer_schedule_day_of_month + - month : transfer_schedule_month + - dow : transfer_schedule_day_of_week + - expiration_date : transfer_schedule_expiration + +**Example Transfer Schedule Show Response** + +.. literalinclude:: ../api_samples/transfer/transfer-schedule-show-resp.json + :language: javascript + +Transfer Schedule Create +======================== + +.. rest_method:: POST /transfers/{transfer_id}/schedules + +Creates a transfer schedule. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id + - enabled : transfer_schedule_enabled + - shutdown_instance : transfer_shutdown_instances + - schedule : transfer_schedule + - minute : transfer_schedule_minute + - hour : transfer_schedule_hour + - dom : transfer_schedule_day_of_month + - month : transfer_schedule_month + - dow : transfer_schedule_day_of_week + - expiration_date : transfer_schedule_expiration_request + +**Example of Transfer Schedule Create Request** + +.. literalinclude:: ../api_samples/transfer/transfer-schedule-create-req.json + :language: javascript + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - schedule : transfer_schedule + - id : transfer_schedule_id + - deleted : transfer_schedule_deleted + - deleted_at : transfer_schedule_deleted_at + - created_at : transfer_schedule_created_at + - updated_at : transfer_schedule_updated_at + - transfer_id : transfer_id + - enabled : transfer_schedule_enabled + - shutdown_instance : transfer_shutdown_instances + - schedule : transfer_schedule + - minute : transfer_schedule_minute + - hour : transfer_schedule_hour + - dom : transfer_schedule_day_of_month + - month : transfer_schedule_month + - dow : transfer_schedule_day_of_week + - expiration_date : transfer_schedule_expiration + +**Example of Transfer Schedule Create Response** + +.. literalinclude:: ../api_samples/transfer/transfer-schedule-create-resp.json + :language: javascript + +Transfer Schedule Update +======================== + +.. rest_method:: PUT /transfers/{transfer_id}/schedules/{schedule_id} + +Updates a transfer schedule. + +**Preconditions** +The transfer schedule must exist. + +Normal response codes: 200 + +Error response codes: unauthorized(401), +forbidden(403) + +Request +------- + + .. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id + - schedule_id : transfer_schedule_id_path + - shutdown_instance : transfer_shutdown_instances + - schedule : transfer_schedule + - minute : transfer_schedule_minute + - hour : transfer_schedule_hour + - dom : transfer_schedule_day_of_month + - month : transfer_schedule_month + - dow : transfer_schedule_day_of_week + - expiration_date : transfer_schedule_expiration_request + +**Example of Transfer Schedule Update Request** + +.. literalinclude:: ../api_samples/transfer/transfer-schedule-update-req.json + :language: javascript + +Response +-------- + + .. rest_parameters:: parameters.yaml + + - id : transfer_schedule_id + - deleted : transfer_schedule_deleted + - deleted_at : transfer_schedule_deleted_at + - created_at : transfer_schedule_created_at + - updated_at : transfer_schedule_updated_at + - transfer_id : transfer_id + - enabled : transfer_schedule_enabled + - shutdown_instance : transfer_shutdown_instances + - schedule : transfer_schedule + - minute : transfer_schedule_minute + - hour : transfer_schedule_hour + - dom : transfer_schedule_day_of_month + - month : transfer_schedule_month + - dow : transfer_schedule_day_of_week + - expiration_date : transfer_schedule_expiration + +**Example of Transfer Schedule Update Response** + +.. literalinclude:: ../api_samples/transfer/transfer-schedule-update-resp.json + :language: javascript + +Transfer Schedule Delete +======================== + +.. rest_method:: DELETE /transfers/{transfer_id}/schedules/{schedule_id} + +Deletes a transfer schedule. + +**Preconditions** +The transfer schedule must exist. + +Normal response codes: 204 + +Error response codes: unauthorized(401), +forbidden(403) + +Request +------- + + .. rest_parameters:: parameters.yaml + + - transfer_id : transfer_id_path + - schedule_id : transfer_schedule_id + +Response +-------- + +There is no response body for a successful deletion of a transfer schedule.