From 439ea5715c2944161e6ce58c0985f913d3a6d640 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 30 Aug 2019 13:21:30 -0400 Subject: [PATCH 1/3] Add more details about /linode/instances/{linodeId}/migrate --- openapi.yaml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 04c069867..71d347196 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4941,13 +4941,25 @@ paths: x-linode-cli-command: linodes post: x-linode-grant: read_write - summary: Initiate Pending Migration + summary: Initiate Pending Host Migration/DC Migration description: > - In some circumstances, a Linode may have pending migrations scheduled that - you can initiate when convenient. In these cases, a Notification - will be returned from [GET /account/notifications](#getNotifications). - This endpoint initiates the scheduled migration, which will shut the Linode - down, migrate it, and then bring it back to its original state. + Initiate a pending host migration that has been scheduled by Linode or + initiate a cross data center (DC) migration. A list of pending migrations, + if any, can be accessed from [GET /account/notifications](/api/v4/account-notifications). + When the migration begins, your Linode will be shutdown if not already off. + If the migration initiated the shutdown, it will reboot the Linode when completed. + + + To initiate a cross DC migration, you must pass a `region` parameter to the + request body specifying the target data center region. + You can view a list of all available regions and their feature capabilities + from [GET /regions](/api/v4/regions). If your Linode has a pending migration already queued, + you will not be able to initiate a DC migration until it has completed. + + + **Note:** Next Generation Network (NGN) data centers do not support IPv6 `/116` pools or IP Failover. + If you have these features enabled on your Linode and attempt to migrate to an NGN data center, + the migration will not initiate. NGN data centers include Toronto and Mumbai. tags: - Linode Instances operationId: migrateLinodeInstance @@ -4969,6 +4981,8 @@ paths: by using the [GET /regions](/api/v4/regions) endpoint. A cross-region migration will cancel a pending migration that has not yet been initiated. + + A cross-region migration will initiate a `linode_migrate_datacenter_create` event. example: us-east responses: '200': @@ -4979,6 +4993,18 @@ paths: type: object default: $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TOKEN" \ + -X POST -d '{ + "region": "us-central" + }' \ + https://api.linode.com/v4/linode/instances/123/migrate + - lang: CLI + source: > + linode-cli linodes migrate 123 /linode/instances/{linodeId}/mutate: parameters: - name: linodeId From 15fe214470bb944e1cda439d488eac1985feee37 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 30 Aug 2019 13:44:47 -0400 Subject: [PATCH 2/3] Add region parameter to CLI example --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 71d347196..27765a450 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5004,7 +5004,7 @@ paths: https://api.linode.com/v4/linode/instances/123/migrate - lang: CLI source: > - linode-cli linodes migrate 123 + linode-cli linodes migrate 123 --region us-central /linode/instances/{linodeId}/mutate: parameters: - name: linodeId From 0b61c7498eaadec4cb22afd788d2eb040019366d Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 6 Sep 2019 10:00:22 -0400 Subject: [PATCH 3/3] Add changes requested by reviewer --- openapi.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 27765a450..fa8655112 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4953,8 +4953,9 @@ paths: To initiate a cross DC migration, you must pass a `region` parameter to the request body specifying the target data center region. You can view a list of all available regions and their feature capabilities - from [GET /regions](/api/v4/regions). If your Linode has a pending migration already queued, - you will not be able to initiate a DC migration until it has completed. + from [GET /regions](/api/v4/regions). If your Linode has a DC migration already queued + or you have initiated a previously scheduled migration, you will not be able to initiate + a DC migration until it has completed. **Note:** Next Generation Network (NGN) data centers do not support IPv6 `/116` pools or IP Failover. @@ -4979,10 +4980,10 @@ paths: The region to which the Linode will be migrated. Must be a valid region slug. A list of regions can be viewed by using the [GET /regions](/api/v4/regions) endpoint. - A cross-region migration will cancel a pending migration + A cross data center migration will cancel a pending migration that has not yet been initiated. - A cross-region migration will initiate a `linode_migrate_datacenter_create` event. + A cross data center migration will initiate a `linode_migrate_datacenter_create` event. example: us-east responses: '200':