Skip to content

Commit

Permalink
feat: update generated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot committed Sep 9, 2024
1 parent b3b142e commit ff1c5aa
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
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.

USAGE:
scw instance volume apply-migration [arg=value ...]

ARGS:
[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.
[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.
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.
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for apply-migration

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
--web open console page for the current ressource
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
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.

USAGE:
scw instance volume plan-migration [arg=value ...]

ARGS:
[volume-id] The volume for which the migration plan will be generated.
[snapshot-id] The snapshot for which the migration plan will be generated.
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for plan-migration

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
--web open console page for the current ressource
14 changes: 8 additions & 6 deletions cmd/scw/testdata/test-all-usage-instance-volume-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ USAGE:
scw instance volume <command>

AVAILABLE COMMANDS:
create Create a volume
delete Delete a volume
get Get a volume
list List volumes
update Update a volume
apply-migration Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)
create Create a volume
delete Delete a volume
get Get a volume
list List volumes
plan-migration Get a volume or snapshot's migration plan
update Update a volume

WORKFLOW COMMANDS:
wait Wait for volume to reach a stable state
wait Wait for volume to reach a stable state

FLAGS:
-h, --help help for volume
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Book a new IP from the specified source. Currently IPs can only be booked from a Private Network.
Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network.

USAGE:
scw ipam ip create [arg=value ...]
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-ipam-ip-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USAGE:
scw ipam ip <command>

AVAILABLE COMMANDS:
create Book a new IP
create Reserve a new IP
delete Release an IP
get Get an IP
list List existing IPs
Expand Down
45 changes: 45 additions & 0 deletions docs/commands/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ it-generate-hosts-for-instance-servers,-baremetal,-apple-silicon-and-bastions)
- [List user data](#list-user-data)
- [Add/set user data](#addset-user-data)
- [Volume management commands](#volume-management-commands)
- [Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)](#migrate-a-volume-andor-snapshots-to-sbs-(scaleway-block-storage))
- [Create a volume](#create-a-volume)
- [Delete a volume](#delete-a-volume)
- [Get a volume](#get-a-volume)
- [List volumes](#list-volumes)
- [Get a volume or snapshot's migration plan](#get-a-volume-or-snapshot's-migration-plan)
- [Update a volume](#update-a-volume)
- [Wait for volume to reach a stable state](#wait-for-volume-to-reach-a-stable-state)
- [Volume type management commands](#volume-type-management-commands)
Expand Down Expand Up @@ -2890,6 +2892,28 @@ subject to change depending on the volumes order. Block devices
UUIDs can be found in `/dev/disk/by-id/`.


### Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)

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.

**Usage:**

```
scw instance volume apply-migration [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| 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. |
| 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. |
| validation-key | Required | 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. |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |



### Create a volume

Create a volume of a specified type in an Availability Zone.
Expand Down Expand Up @@ -3045,6 +3069,27 @@ scw instance volume list volume-type=b_ssd name=foobar



### Get a volume or snapshot's migration plan

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.

**Usage:**

```
scw instance volume plan-migration [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| volume-id | | The volume for which the migration plan will be generated. |
| snapshot-id | | The snapshot for which the migration plan will be generated. |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |



### Update a volume

Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
Expand Down
6 changes: 3 additions & 3 deletions docs/commands/ipam.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This API allows you to manage your Scaleway IP addresses with our IP Address Management tool.

- [IP management command](#ip-management-command)
- [Book a new IP](#book-a-new-ip)
- [Reserve a new IP](#reserve-a-new-ip)
- [Release an IP](#release-an-ip)
- [Get an IP](#get-an-ip)
- [List existing IPs](#list-existing-ips)
Expand All @@ -17,9 +17,9 @@ This API allows you to manage your Scaleway IP addresses with our IP Address Man
*ips_long.


### Book a new IP
### Reserve a new IP

Book a new IP from the specified source. Currently IPs can only be booked from a Private Network.
Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network.

**Usage:**

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909084652-00d3fbf2d825
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909125135-78208b16b93b
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909084652-00d3fbf2d825 h1:bkMLD6c7sSsDlyHlCbRMStabJevV4wDGn0dHhHB7OBM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909084652-00d3fbf2d825/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909125135-78208b16b93b h1:sq/wiFsbNY7qB4mOT/GKVABsNe5ybidv5sJEKKzZado=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909125135-78208b16b93b/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
4 changes: 2 additions & 2 deletions internal/namespaces/ipam/v1/ipam_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func ipamIPSet() *core.Command {

func ipamIPCreate() *core.Command {
return &core.Command{
Short: `Book a new IP`,
Long: `Book a new IP from the specified source. Currently IPs can only be booked from a Private Network.`,
Short: `Reserve a new IP`,
Long: `Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network.`,
Namespace: "ipam",
Resource: "ip",
Verb: "create",
Expand Down

0 comments on commit ff1c5aa

Please sign in to comment.