Skip to content

Commit a774083

Browse files
feat(instance): deprecate use of nat for IP (#4105)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 0c969c9 commit a774083

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARGS:
1919
[project-id] Project ID to use. If none is passed the default project ID will be used
2020
[tags.{index}] Tags of the IP
2121
[server] UUID of the Instance you want to attach the IP to
22-
[type] IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6') (unknown_iptype | nat | routed_ipv4 | routed_ipv6)
22+
[type] IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated) (unknown_iptype | nat | routed_ipv4 | routed_ipv6)
2323
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
2424
[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)
2525

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ARGS:
1616
[project-id] Project ID in which the IPs are reserved
1717
[tags] Filter IPs with these exact tags (to filter with several tags, use commas to separate them)
1818
[name] Filter on the IP address (Works as a LIKE operation on the IP address)
19-
[type] Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6')
19+
[type] Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat')
2020
[organization-id] Organization ID in which the IPs are reserved
2121
[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 | all)
2222

cmd/scw/testdata/test-all-usage-instance-server-update-usage.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ ARGS:
3333
[volumes.{key}.project] Project ID of the volume
3434
[volumes.{key}.organization] Organization ID of the volume
3535
[dynamic-ip-required]
36-
[routed-ip-enabled] True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False)
3736
[public-ips.{index}] A list of reserved IP IDs to attach to the Instance
3837
[protected]
3938
[security-group-id]
@@ -45,8 +44,9 @@ ARGS:
4544
[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)
4645

4746
DEPRECATED ARGS:
48-
[bootscript]
49-
[enable-ipv6]
47+
[bootscript]
48+
[routed-ip-enabled] True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False)
49+
[enable-ipv6]
5050

5151
FLAGS:
5252
-h, --help help for update

docs/commands/instance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ scw instance ip create [arg=value ...]
374374
| project-id | | Project ID to use. If none is passed the default project ID will be used |
375375
| tags.{index} | | Tags of the IP |
376376
| server | | UUID of the Instance you want to attach the IP to |
377-
| type | One of: `unknown_iptype`, `nat`, `routed_ipv4`, `routed_ipv6` | IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6') |
377+
| type | One of: `unknown_iptype`, `nat`, `routed_ipv4`, `routed_ipv6` | IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated) |
378378
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
379379
| 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 |
380380

@@ -533,7 +533,7 @@ scw instance ip list [arg=value ...]
533533
| project-id | | Project ID in which the IPs are reserved |
534534
| tags | | Filter IPs with these exact tags (to filter with several tags, use commas to separate them) |
535535
| name | | Filter on the IP address (Works as a LIKE operation on the IP address) |
536-
| type | | Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6') |
536+
| type | | Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat') |
537537
| organization-id | | Organization ID in which the IPs are reserved |
538538
| 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`, `all` | Zone to target. If none is passed will use default zone from the config |
539539

@@ -2264,7 +2264,7 @@ scw instance server update <server-id ...> [arg=value ...]
22642264
| volumes.{key}.organization | | Organization ID of the volume |
22652265
| ~~bootscript~~ | Deprecated | |
22662266
| dynamic-ip-required | | |
2267-
| routed-ip-enabled | | True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False) |
2267+
| ~~routed-ip-enabled~~ | Deprecated | True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False) |
22682268
| public-ips.{index} | | A list of reserved IP IDs to attach to the Instance |
22692269
| ~~enable-ipv6~~ | Deprecated | |
22702270
| protected | | |

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240823125746-1aae88e92d14
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
465465
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
466466
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
468-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240823125746-1aae88e92d14 h1:BxQQCTnvdpnhUJl1ICWeCKzV2Esbi3dGruIIk9xrDTk=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240823125746-1aae88e92d14/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
468+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30 h1:yoKAVkEVwAqbGbR8n87rHQ1dulL25rKloGadb3vm770=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30/go.mod h1:sH0u6fq6x4R5M7WxkoQFY/o7UaiItec0o1LinLCJNq8=
470470
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
471471
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
472472
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ func instanceServerUpdate() *core.Command {
665665
Name: "routed-ip-enabled",
666666
Short: `True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False)`,
667667
Required: false,
668-
Deprecated: false,
668+
Deprecated: true,
669669
Positional: false,
670670
},
671671
{
@@ -3326,7 +3326,7 @@ func instanceIPList() *core.Command {
33263326
},
33273327
{
33283328
Name: "type",
3329-
Short: `Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6')`,
3329+
Short: `Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat')`,
33303330
Required: false,
33313331
Deprecated: false,
33323332
Positional: false,
@@ -3432,7 +3432,7 @@ func instanceIPCreate() *core.Command {
34323432
},
34333433
{
34343434
Name: "type",
3435-
Short: `IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6')`,
3435+
Short: `IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated)`,
34363436
Required: false,
34373437
Deprecated: false,
34383438
Positional: false,

0 commit comments

Comments
 (0)