Skip to content

Commit 3d8e361

Browse files
authored
feat(vpc): add l3vni to route (#5320)
1 parent 9d5a6bf commit 3d8e361

File tree

7 files changed

+30
-3
lines changed

7 files changed

+30
-3
lines changed

cmd/scw/testdata/test-all-usage-vpc-route-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARGS:
1212
[destination] Destination of the Route
1313
[nexthop-resource-id] ID of the nexthop resource
1414
[nexthop-private-network-id] ID of the nexthop private network
15+
[nexthop-vpc-connector-id] ID of the nexthop VPC Connector
1516
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1617

1718
FLAGS:

cmd/scw/testdata/test-all-usage-vpc-route-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[nexthop-resource-id] Next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned
1212
[nexthop-private-network-id] Next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned
1313
[nexthop-resource-type] Next hop resource type to filter for. Only Routes with a matching next hop resource type will be returned (unknown_type | vpc_gateway_network | instance_private_nic | baremetal_private_nic | apple_silicon_private_nic)
14+
[nexthop-vpc-connector-id] Next hop VPC connector ID to filter for. Only routes with a matching next hop VPC connector ID will be returned
1415
[contains] Only routes whose destination is contained in this subnet will be returned
1516
[tags.{index}] Tags to filter for, only routes with one or more matching tags will be returned
1617
[is-ipv6] Only routes with an IPv6 destination will be returned

cmd/scw/testdata/test-all-usage-vpc-route-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARGS:
1212
[destination] Destination of the Route
1313
[nexthop-resource-id] ID of the nexthop resource
1414
[nexthop-private-network-id] ID of the nexthop private network
15+
[nexthop-vpc-connector-id] ID of the nexthop VPC connector
1516
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1617

1718
FLAGS:

docs/commands/vpc.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ scw vpc route create [arg=value ...]
197197
| destination | | Destination of the Route |
198198
| nexthop-resource-id | | ID of the nexthop resource |
199199
| nexthop-private-network-id | | ID of the nexthop private network |
200+
| nexthop-vpc-connector-id | | ID of the nexthop VPC Connector |
200201
| 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 |
201202

202203

@@ -281,6 +282,7 @@ scw vpc route list [arg=value ...]
281282
| nexthop-resource-id | | Next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned |
282283
| nexthop-private-network-id | | Next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned |
283284
| nexthop-resource-type | One of: `unknown_type`, `vpc_gateway_network`, `instance_private_nic`, `baremetal_private_nic`, `apple_silicon_private_nic` | Next hop resource type to filter for. Only Routes with a matching next hop resource type will be returned |
285+
| nexthop-vpc-connector-id | | Next hop VPC connector ID to filter for. Only routes with a matching next hop VPC connector ID will be returned |
284286
| contains | | Only routes whose destination is contained in this subnet will be returned |
285287
| tags.{index} | | Tags to filter for, only routes with one or more matching tags will be returned |
286288
| is-ipv6 | | Only routes with an IPv6 destination will be returned |
@@ -309,6 +311,7 @@ scw vpc route update <route-id ...> [arg=value ...]
309311
| destination | | Destination of the Route |
310312
| nexthop-resource-id | | ID of the nexthop resource |
311313
| nexthop-private-network-id | | ID of the nexthop private network |
314+
| nexthop-vpc-connector-id | | ID of the nexthop VPC connector |
312315
| 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 |
313316

314317

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.26.3
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260203052142-918ae3efe337
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260205134439-552c4fd7bb15
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.2
2929
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
468468
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
469469
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
470470
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
471-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260203052142-918ae3efe337 h1:E7zH2bIf8EtLomw/tFgfevq7HJ8mKuBKOm+BEx5YxLc=
472-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260203052142-918ae3efe337/go.mod h1:VbEqG0nAXcEFyHLKWwbhgbDNimnLf24Qat73/12DU9o=
471+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260205134439-552c4fd7bb15 h1:1TEkXowNZybCaCrgTA+id+AjsPGt3n0xiTPBuaUgoTo=
472+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260205134439-552c4fd7bb15/go.mod h1:VbEqG0nAXcEFyHLKWwbhgbDNimnLf24Qat73/12DU9o=
473473
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
474474
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
475475
github.com/secure-systems-lab/go-securesystemslib v0.9.1 h1:nZZaNz4DiERIQguNy0cL5qTdn9lR8XKHf4RUyG1Sx3g=

internal/namespaces/vpc/v2/vpc_cli.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,13 @@ func vpcRouteCreate() *core.Command {
773773
Deprecated: false,
774774
Positional: false,
775775
},
776+
{
777+
Name: "nexthop-vpc-connector-id",
778+
Short: `ID of the nexthop VPC Connector`,
779+
Required: false,
780+
Deprecated: false,
781+
Positional: false,
782+
},
776783
core.RegionArgSpec(
777784
scw.RegionFrPar,
778785
scw.RegionNlAms,
@@ -876,6 +883,13 @@ func vpcRouteUpdate() *core.Command {
876883
Deprecated: false,
877884
Positional: false,
878885
},
886+
{
887+
Name: "nexthop-vpc-connector-id",
888+
Short: `ID of the nexthop VPC connector`,
889+
Required: false,
890+
Deprecated: false,
891+
Positional: false,
892+
},
879893
core.RegionArgSpec(
880894
scw.RegionFrPar,
881895
scw.RegionNlAms,
@@ -1162,6 +1176,13 @@ func vpcRouteList() *core.Command {
11621176
"apple_silicon_private_nic",
11631177
},
11641178
},
1179+
{
1180+
Name: "nexthop-vpc-connector-id",
1181+
Short: `Next hop VPC connector ID to filter for. Only routes with a matching next hop VPC connector ID will be returned`,
1182+
Required: false,
1183+
Deprecated: false,
1184+
Positional: false,
1185+
},
11651186
{
11661187
Name: "contains",
11671188
Short: `Only routes whose destination is contained in this subnet will be returned`,

0 commit comments

Comments
 (0)