Skip to content

Commit 90d2321

Browse files
chore(vpc): drop MigrateZonalPrivateNetworks (#4472)
Co-authored-by: Rémy Léone <[email protected]>
1 parent cd06155 commit 90d2321

File tree

5 files changed

+9
-72
lines changed

5 files changed

+9
-72
lines changed

cmd/scw/testdata/test-all-usage-vpc-private-network-usage.golden

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ USAGE:
99
scw vpc private-network <command>
1010

1111
AVAILABLE COMMANDS:
12-
create Create a Private Network
13-
delete Delete a Private Network
14-
enable-dhcp Enable DHCP on a Private Network
15-
get Get a Private Network
16-
list List Private Networks
17-
migrate-to-regional Migrate Private Networks from zoned to regional
18-
update Update Private Network
12+
create Create a Private Network
13+
delete Delete a Private Network
14+
enable-dhcp Enable DHCP on a Private Network
15+
get Get a Private Network
16+
list List Private Networks
17+
update Update Private Network
1918

2019
FLAGS:
2120
-h, --help help for private-network

docs/commands/vpc.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
88
- [Enable DHCP on a Private Network](#enable-dhcp-on-a-private-network)
99
- [Get a Private Network](#get-a-private-network)
1010
- [List Private Networks](#list-private-networks)
11-
- [Migrate Private Networks from zoned to regional](#migrate-private-networks-from-zoned-to-regional)
1211
- [Update Private Network](#update-private-network)
1312
- [Route management command](#route-management-command)
1413
- [Create a Route](#create-a-route)
@@ -146,28 +145,6 @@ scw vpc private-network list [arg=value ...]
146145

147146

148147

149-
### Migrate Private Networks from zoned to regional
150-
151-
Transform multiple existing zoned Private Networks (scoped to a single Availability Zone) into regional Private Networks, scoped to an entire region. You can transform one or many Private Networks (specified by their Private Network IDs) within a single Scaleway Organization or Project, with the same call.
152-
153-
**Usage:**
154-
155-
```
156-
scw vpc private-network migrate-to-regional <private-network-ids.{index} ...> [arg=value ...]
157-
```
158-
159-
160-
**Args:**
161-
162-
| Name | | Description |
163-
|------|---|-------------|
164-
| project-id | | Project ID to use. If none is passed the default project ID will be used |
165-
| private-network-ids.{index} | Required | IDs of the Private Networks to migrate |
166-
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
167-
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
168-
169-
170-
171148
### Update Private Network
172149

173150
Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.

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.31.0.20250129134826-04caf0452484
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250117133139-e360c98f921d
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.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
463463
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
465465
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.31.0.20250129134826-04caf0452484 h1:CQNllJ4XCELHD64WYXHh0ytdJYr0DAEcr0GkvAQfds4=
467-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.31.0.20250129134826-04caf0452484/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250117133139-e360c98f921d h1:npDtKGreHq1EA6DoHo18YG25bsvZVlo4XlNm822GZ7A=
467+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250117133139-e360c98f921d/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
468468
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
469469
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
470470
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/vpc/v2/vpc_cli.go

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func GetGeneratedCommands() *core.Commands {
3535
vpcPrivateNetworkGet(),
3636
vpcPrivateNetworkUpdate(),
3737
vpcPrivateNetworkDelete(),
38-
vpcPrivateNetworkMigrateToRegional(),
3938
vpcPrivateNetworkEnableDHCP(),
4039
vpcRouteEnableRouting(),
4140
vpcRouteCreate(),
@@ -593,44 +592,6 @@ func vpcPrivateNetworkDelete() *core.Command {
593592
}
594593
}
595594

596-
func vpcPrivateNetworkMigrateToRegional() *core.Command {
597-
return &core.Command{
598-
Short: `Migrate Private Networks from zoned to regional`,
599-
Long: `Transform multiple existing zoned Private Networks (scoped to a single Availability Zone) into regional Private Networks, scoped to an entire region. You can transform one or many Private Networks (specified by their Private Network IDs) within a single Scaleway Organization or Project, with the same call.`,
600-
Namespace: "vpc",
601-
Resource: "private-network",
602-
Verb: "migrate-to-regional",
603-
// Deprecated: false,
604-
ArgsType: reflect.TypeOf(vpc.MigrateZonalPrivateNetworksRequest{}),
605-
ArgSpecs: core.ArgSpecs{
606-
core.ProjectIDArgSpec(),
607-
{
608-
Name: "private-network-ids.{index}",
609-
Short: `IDs of the Private Networks to migrate`,
610-
Required: true,
611-
Deprecated: false,
612-
Positional: true,
613-
},
614-
core.OrganizationIDArgSpec(),
615-
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
616-
},
617-
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
618-
request := args.(*vpc.MigrateZonalPrivateNetworksRequest)
619-
620-
client := core.ExtractClient(ctx)
621-
api := vpc.NewAPI(client)
622-
e = api.MigrateZonalPrivateNetworks(request)
623-
if e != nil {
624-
return nil, e
625-
}
626-
return &core.SuccessResult{
627-
Resource: "private-network",
628-
Verb: "migrate-to-regional",
629-
}, nil
630-
},
631-
}
632-
}
633-
634595
func vpcPrivateNetworkEnableDHCP() *core.Command {
635596
return &core.Command{
636597
Short: `Enable DHCP on a Private Network`,

0 commit comments

Comments
 (0)