Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(vpc): drop MigrateZonalPrivateNetworks #4472

Merged
merged 3 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ USAGE:
scw vpc private-network <command>

AVAILABLE COMMANDS:
create Create a Private Network
delete Delete a Private Network
enable-dhcp Enable DHCP on a Private Network
get Get a Private Network
list List Private Networks
migrate-to-regional Migrate Private Networks from zoned to regional
update Update Private Network
create Create a Private Network
delete Delete a Private Network
enable-dhcp Enable DHCP on a Private Network
get Get a Private Network
list List Private Networks
update Update Private Network

FLAGS:
-h, --help help for private-network
Expand Down
23 changes: 0 additions & 23 deletions docs/commands/vpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
- [Enable DHCP on a Private Network](#enable-dhcp-on-a-private-network)
- [Get a Private Network](#get-a-private-network)
- [List Private Networks](#list-private-networks)
- [Migrate Private Networks from zoned to regional](#migrate-private-networks-from-zoned-to-regional)
- [Update Private Network](#update-private-network)
- [Route management command](#route-management-command)
- [Create a Route](#create-a-route)
Expand Down Expand Up @@ -146,28 +145,6 @@ scw vpc private-network list [arg=value ...]



### Migrate Private Networks from zoned to regional

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.

**Usage:**

```
scw vpc private-network migrate-to-regional <private-network-ids.{index} ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| private-network-ids.{index} | Required | IDs of the Private Networks to migrate |
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
| 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 |



### Update Private Network

Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.
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.31.0.20250129134826-04caf0452484
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250117133139-e360c98f921d
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,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.31.0.20250129134826-04caf0452484 h1:CQNllJ4XCELHD64WYXHh0ytdJYr0DAEcr0GkvAQfds4=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.31.0.20250129134826-04caf0452484/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250117133139-e360c98f921d h1:npDtKGreHq1EA6DoHo18YG25bsvZVlo4XlNm822GZ7A=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250117133139-e360c98f921d/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
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
39 changes: 0 additions & 39 deletions internal/namespaces/vpc/v2/vpc_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func GetGeneratedCommands() *core.Commands {
vpcPrivateNetworkGet(),
vpcPrivateNetworkUpdate(),
vpcPrivateNetworkDelete(),
vpcPrivateNetworkMigrateToRegional(),
vpcPrivateNetworkEnableDHCP(),
vpcRouteEnableRouting(),
vpcRouteCreate(),
Expand Down Expand Up @@ -593,44 +592,6 @@ func vpcPrivateNetworkDelete() *core.Command {
}
}

func vpcPrivateNetworkMigrateToRegional() *core.Command {
return &core.Command{
Short: `Migrate Private Networks from zoned to regional`,
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.`,
Namespace: "vpc",
Resource: "private-network",
Verb: "migrate-to-regional",
// Deprecated: false,
ArgsType: reflect.TypeOf(vpc.MigrateZonalPrivateNetworksRequest{}),
ArgSpecs: core.ArgSpecs{
core.ProjectIDArgSpec(),
{
Name: "private-network-ids.{index}",
Short: `IDs of the Private Networks to migrate`,
Required: true,
Deprecated: false,
Positional: true,
},
core.OrganizationIDArgSpec(),
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
request := args.(*vpc.MigrateZonalPrivateNetworksRequest)

client := core.ExtractClient(ctx)
api := vpc.NewAPI(client)
e = api.MigrateZonalPrivateNetworks(request)
if e != nil {
return nil, e
}
return &core.SuccessResult{
Resource: "private-network",
Verb: "migrate-to-regional",
}, nil
},
}
}

func vpcPrivateNetworkEnableDHCP() *core.Command {
return &core.Command{
Short: `Enable DHCP on a Private Network`,
Expand Down
Loading