From 179d9745185d40fa26058dcb59e83bc09e5bd8d4 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 28 May 2025 14:14:22 +0000 Subject: [PATCH] feat(ipam): add new ip source --- ...test-all-usage-block-snapshot-create-usage.golden | 4 ++-- .../test-all-usage-ipam-ip-create-usage.golden | 1 + .../test-all-usage-ipam-ip-list-usage.golden | 1 + docs/commands/block.md | 4 ++-- docs/commands/ipam.md | 2 ++ internal/namespaces/ipam/v1/ipam_cli.go | 12 ++++++++++++ 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-block-snapshot-create-usage.golden b/cmd/scw/testdata/test-all-usage-block-snapshot-create-usage.golden index 4760220693..5480c0d434 100644 --- a/cmd/scw/testdata/test-all-usage-block-snapshot-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-block-snapshot-create-usage.golden @@ -4,10 +4,10 @@ To create a snapshot, the volume must be in the `in_use` or the `available` stat If your volume is in a transient state, you need to wait until the end of the current operation. USAGE: - scw block snapshot create [arg=value ...] + scw block snapshot create [arg=value ...] ARGS: - [volume-id] UUID of the volume to snapshot + volume-id UUID of the volume to snapshot [name=] Name of the snapshot [project-id] Project ID to use. If none is passed the default project ID will be used [tags.{index}] List of tags assigned to the snapshot diff --git a/cmd/scw/testdata/test-all-usage-ipam-ip-create-usage.golden b/cmd/scw/testdata/test-all-usage-ipam-ip-create-usage.golden index f9ea7ef6b0..f9dc59f98a 100644 --- a/cmd/scw/testdata/test-all-usage-ipam-ip-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-ipam-ip-create-usage.golden @@ -10,6 +10,7 @@ ARGS: [source.zonal] Zone the IP lives in if the IP is a public zoned IP. [source.private-network-id] Private Network the IP lives in if the IP is a private IP. [source.subnet-id] Private Network subnet the IP lives in if the IP is a private IP in a Private Network. + [source.vpc-id] [is-ipv6] Request an IPv6 instead of an IPv4 [address] Request this specific IP address in the specified source pool [tags.{index}] Tags for the IP diff --git a/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden b/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden index 8525afb4e2..8315cbb7c5 100644 --- a/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden @@ -22,6 +22,7 @@ ARGS: [tags.{index}] Tags to filter for, only IPs with one or more matching tags will be returned [is-ipv6] Defines whether to filter only for IPv4s or IPv6s [ip-ids.{index}] IP IDs to filter for. Only IPs with these UUIDs will be returned + [source-vpc-id] [organization-id] Organization ID to filter for. Only IPs belonging to this Organization will be returned [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) diff --git a/docs/commands/block.md b/docs/commands/block.md index 29acdf452c..e39c4e1f50 100644 --- a/docs/commands/block.md +++ b/docs/commands/block.md @@ -35,7 +35,7 @@ If your volume is in a transient state, you need to wait until the end of the cu **Usage:** ``` -scw block snapshot create [arg=value ...] +scw block snapshot create [arg=value ...] ``` @@ -43,7 +43,7 @@ scw block snapshot create [arg=value ...] | Name | | Description | |------|---|-------------| -| volume-id | | UUID of the volume to snapshot | +| volume-id | Required | UUID of the volume to snapshot | | name | Default: `` | Name of the snapshot | | project-id | | Project ID to use. If none is passed the default project ID will be used | | tags.{index} | | List of tags assigned to the snapshot | diff --git a/docs/commands/ipam.md b/docs/commands/ipam.md index b5c693d3b8..23149f6c3e 100644 --- a/docs/commands/ipam.md +++ b/docs/commands/ipam.md @@ -36,6 +36,7 @@ scw ipam ip create [arg=value ...] | source.zonal | | Zone the IP lives in if the IP is a public zoned IP. | | source.private-network-id | | Private Network the IP lives in if the IP is a private IP. | | source.subnet-id | | Private Network subnet the IP lives in if the IP is a private IP in a Private Network. | +| source.vpc-id | | | | is-ipv6 | | Request an IPv6 instead of an IPv4 | | address | | Request this specific IP address in the specified source pool | | tags.{index} | | Tags for the IP | @@ -116,6 +117,7 @@ scw ipam ip list [arg=value ...] | tags.{index} | | Tags to filter for, only IPs with one or more matching tags will be returned | | is-ipv6 | | Defines whether to filter only for IPv4s or IPv6s | | ip-ids.{index} | | IP IDs to filter for. Only IPs with these UUIDs will be returned | +| source-vpc-id | | | | organization-id | | Organization ID to filter for. Only IPs belonging to this Organization will be returned | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/ipam/v1/ipam_cli.go b/internal/namespaces/ipam/v1/ipam_cli.go index b60b2dff9e..9b46779b4b 100644 --- a/internal/namespaces/ipam/v1/ipam_cli.go +++ b/internal/namespaces/ipam/v1/ipam_cli.go @@ -89,6 +89,12 @@ func ipamIPCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "source.vpc-id", + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "is-ipv6", Short: `Request an IPv6 instead of an IPv4`, @@ -491,6 +497,12 @@ func ipamIPList() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "source-vpc-id", + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "organization-id", Short: `Organization ID to filter for. Only IPs belonging to this Organization will be returned`,