Skip to content

Commit 179d974

Browse files
scaleway-botMia-Cross
authored andcommitted
feat(ipam): add new ip source
1 parent 6fa305f commit 179d974

File tree

6 files changed

+20
-4
lines changed

6 files changed

+20
-4
lines changed

cmd/scw/testdata/test-all-usage-block-snapshot-create-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ To create a snapshot, the volume must be in the `in_use` or the `available` stat
44
If your volume is in a transient state, you need to wait until the end of the current operation.
55

66
USAGE:
7-
scw block snapshot create [arg=value ...]
7+
scw block snapshot create <volume-id ...> [arg=value ...]
88

99
ARGS:
10-
[volume-id] UUID of the volume to snapshot
10+
volume-id UUID of the volume to snapshot
1111
[name=<generated>] Name of the snapshot
1212
[project-id] Project ID to use. If none is passed the default project ID will be used
1313
[tags.{index}] List of tags assigned to the snapshot

cmd/scw/testdata/test-all-usage-ipam-ip-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARGS:
1010
[source.zonal] Zone the IP lives in if the IP is a public zoned IP.
1111
[source.private-network-id] Private Network the IP lives in if the IP is a private IP.
1212
[source.subnet-id] Private Network subnet the IP lives in if the IP is a private IP in a Private Network.
13+
[source.vpc-id]
1314
[is-ipv6] Request an IPv6 instead of an IPv4
1415
[address] Request this specific IP address in the specified source pool
1516
[tags.{index}] Tags for the IP

cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ARGS:
2222
[tags.{index}] Tags to filter for, only IPs with one or more matching tags will be returned
2323
[is-ipv6] Defines whether to filter only for IPv4s or IPv6s
2424
[ip-ids.{index}] IP IDs to filter for. Only IPs with these UUIDs will be returned
25+
[source-vpc-id]
2526
[organization-id] Organization ID to filter for. Only IPs belonging to this Organization will be returned
2627
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
2728

docs/commands/block.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ If your volume is in a transient state, you need to wait until the end of the cu
3535
**Usage:**
3636

3737
```
38-
scw block snapshot create [arg=value ...]
38+
scw block snapshot create <volume-id ...> [arg=value ...]
3939
```
4040

4141

4242
**Args:**
4343

4444
| Name | | Description |
4545
|------|---|-------------|
46-
| volume-id | | UUID of the volume to snapshot |
46+
| volume-id | Required | UUID of the volume to snapshot |
4747
| name | Default: `<generated>` | Name of the snapshot |
4848
| project-id | | Project ID to use. If none is passed the default project ID will be used |
4949
| tags.{index} | | List of tags assigned to the snapshot |

docs/commands/ipam.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ scw ipam ip create [arg=value ...]
3636
| source.zonal | | Zone the IP lives in if the IP is a public zoned IP. |
3737
| source.private-network-id | | Private Network the IP lives in if the IP is a private IP. |
3838
| source.subnet-id | | Private Network subnet the IP lives in if the IP is a private IP in a Private Network. |
39+
| source.vpc-id | | |
3940
| is-ipv6 | | Request an IPv6 instead of an IPv4 |
4041
| address | | Request this specific IP address in the specified source pool |
4142
| tags.{index} | | Tags for the IP |
@@ -116,6 +117,7 @@ scw ipam ip list [arg=value ...]
116117
| tags.{index} | | Tags to filter for, only IPs with one or more matching tags will be returned |
117118
| is-ipv6 | | Defines whether to filter only for IPv4s or IPv6s |
118119
| ip-ids.{index} | | IP IDs to filter for. Only IPs with these UUIDs will be returned |
120+
| source-vpc-id | | |
119121
| organization-id | | Organization ID to filter for. Only IPs belonging to this Organization will be returned |
120122
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |
121123

internal/namespaces/ipam/v1/ipam_cli.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ func ipamIPCreate() *core.Command {
8989
Deprecated: false,
9090
Positional: false,
9191
},
92+
{
93+
Name: "source.vpc-id",
94+
Required: false,
95+
Deprecated: false,
96+
Positional: false,
97+
},
9298
{
9399
Name: "is-ipv6",
94100
Short: `Request an IPv6 instead of an IPv4`,
@@ -491,6 +497,12 @@ func ipamIPList() *core.Command {
491497
Deprecated: false,
492498
Positional: false,
493499
},
500+
{
501+
Name: "source-vpc-id",
502+
Required: false,
503+
Deprecated: false,
504+
Positional: false,
505+
},
494506
{
495507
Name: "organization-id",
496508
Short: `Organization ID to filter for. Only IPs belonging to this Organization will be returned`,

0 commit comments

Comments
 (0)