Skip to content

Commit 8c65b55

Browse files
authored
doc(instance): change documentation about the backup action and the migration of b_ssd resources (#758)
1 parent 6aca8f7 commit 8c65b55

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed

scaleway-async/scaleway_async/instance/v1/api.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,12 @@ async def server_action(
921921
* `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
922922
* `enable_routed_ip`: Migrate the Instance to the new network stack.
923923
924-
Keep in mind that `terminate` an Instance will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
924+
The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
925925
If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
926+
927+
The `backup` action can be done with:
928+
* No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
929+
* `volumes` key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in `volumes` key. `scratch` volumes types can't be shapshotted.
926930
:param server_id: UUID of the Instance.
927931
:param zone: Zone to target. If none is passed will use default zone from the config.
928932
:param action: Action to perform on the Instance.
@@ -3969,7 +3973,11 @@ async def plan_block_migration(
39693973
) -> MigrationPlan:
39703974
"""
39713975
Get a volume or snapshot's migration plan.
3972-
Given a volume or snapshot, returns the migration plan for a call to the "Apply a migration plan" endpoint. This plan will include zero or one volume, and zero or more snapshots, which will need to be migrated together. This endpoint does not perform the actual migration itself, the "Apply a migration plan" endpoint must be used. The validation_key value returned by this endpoint must be provided to the call to the "Apply a migration plan" endpoint to confirm that all resources listed in the plan should be migrated.
3976+
Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward.
3977+
The endpoint returns the resources that should be migrated together:
3978+
- the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
3979+
- the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration.
3980+
The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated.
39733981
:param zone: Zone to target. If none is passed will use default zone from the config.
39743982
:param volume_id: The volume for which the migration plan will be generated.
39753983
One-Of ('resource'): at most one of 'volume_id', 'snapshot_id' could be set.
@@ -4011,12 +4019,12 @@ async def apply_block_migration(
40114019
) -> None:
40124020
"""
40134021
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage).
4014-
To be used, the call to this endpoint must be preceded by a call to the "Plan a migration" endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
4015-
:param validation_key: A value to be retrieved from a call to the "Plan a migration" endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
4022+
To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
4023+
:param validation_key: A value to be retrieved from a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
40164024
:param zone: Zone to target. If none is passed will use default zone from the config.
4017-
:param volume_id: The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the "Plan a migration" endpoint.
4025+
:param volume_id: The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
40184026
One-Of ('resource'): at most one of 'volume_id', 'snapshot_id' could be set.
4019-
:param snapshot_id: The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the "Plan a migration" endpoint.
4027+
:param snapshot_id: The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
40204028
One-Of ('resource'): at most one of 'volume_id', 'snapshot_id' could be set.
40214029
40224030
Usage:

scaleway-async/scaleway_async/instance/v1/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ class SecurityGroupTemplate:
14681468
class ApplyBlockMigrationRequest:
14691469
validation_key: str
14701470
"""
1471-
A value to be retrieved from a call to the "Plan a migration" endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
1471+
A value to be retrieved from a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
14721472
"""
14731473

14741474
zone: Optional[Zone]
@@ -2933,7 +2933,7 @@ class MigrationPlan:
29332933

29342934
validation_key: str
29352935
"""
2936-
A value to be passed to the call to the "Apply a migration plan" endpoint, to confirm that the execution of the plan is being requested.
2936+
A value to be passed to the call to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint, to confirm that the execution of the plan is being requested.
29372937
"""
29382938

29392939
volume: Optional[Volume]

scaleway/scaleway/instance/v1/api.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,12 @@ def server_action(
921921
* `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
922922
* `enable_routed_ip`: Migrate the Instance to the new network stack.
923923
924-
Keep in mind that `terminate` an Instance will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
924+
The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
925925
If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
926+
927+
The `backup` action can be done with:
928+
* No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
929+
* `volumes` key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in `volumes` key. `scratch` volumes types can't be shapshotted.
926930
:param server_id: UUID of the Instance.
927931
:param zone: Zone to target. If none is passed will use default zone from the config.
928932
:param action: Action to perform on the Instance.
@@ -3969,7 +3973,11 @@ def plan_block_migration(
39693973
) -> MigrationPlan:
39703974
"""
39713975
Get a volume or snapshot's migration plan.
3972-
Given a volume or snapshot, returns the migration plan for a call to the "Apply a migration plan" endpoint. This plan will include zero or one volume, and zero or more snapshots, which will need to be migrated together. This endpoint does not perform the actual migration itself, the "Apply a migration plan" endpoint must be used. The validation_key value returned by this endpoint must be provided to the call to the "Apply a migration plan" endpoint to confirm that all resources listed in the plan should be migrated.
3976+
Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward.
3977+
The endpoint returns the resources that should be migrated together:
3978+
- the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
3979+
- the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration.
3980+
The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated.
39733981
:param zone: Zone to target. If none is passed will use default zone from the config.
39743982
:param volume_id: The volume for which the migration plan will be generated.
39753983
One-Of ('resource'): at most one of 'volume_id', 'snapshot_id' could be set.
@@ -4011,12 +4019,12 @@ def apply_block_migration(
40114019
) -> None:
40124020
"""
40134021
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage).
4014-
To be used, the call to this endpoint must be preceded by a call to the "Plan a migration" endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
4015-
:param validation_key: A value to be retrieved from a call to the "Plan a migration" endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
4022+
To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
4023+
:param validation_key: A value to be retrieved from a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
40164024
:param zone: Zone to target. If none is passed will use default zone from the config.
4017-
:param volume_id: The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the "Plan a migration" endpoint.
4025+
:param volume_id: The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
40184026
One-Of ('resource'): at most one of 'volume_id', 'snapshot_id' could be set.
4019-
:param snapshot_id: The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the "Plan a migration" endpoint.
4027+
:param snapshot_id: The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
40204028
One-Of ('resource'): at most one of 'volume_id', 'snapshot_id' could be set.
40214029
40224030
Usage:

scaleway/scaleway/instance/v1/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ class SecurityGroupTemplate:
14681468
class ApplyBlockMigrationRequest:
14691469
validation_key: str
14701470
"""
1471-
A value to be retrieved from a call to the "Plan a migration" endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
1471+
A value to be retrieved from a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
14721472
"""
14731473

14741474
zone: Optional[Zone]
@@ -2933,7 +2933,7 @@ class MigrationPlan:
29332933

29342934
validation_key: str
29352935
"""
2936-
A value to be passed to the call to the "Apply a migration plan" endpoint, to confirm that the execution of the plan is being requested.
2936+
A value to be passed to the call to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint, to confirm that the execution of the plan is being requested.
29372937
"""
29382938

29392939
volume: Optional[Volume]

0 commit comments

Comments
 (0)