Skip to content

Commit a458d3b

Browse files
authored
feat(vpc/v1): allow listing regional PN using include_regional parameter (#2970)
1 parent 4d3e016 commit a458d3b

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[tags.{index}] Filter private networks with one or more matching tags
1212
[project-id] The project ID on which to filter the returned private networks
1313
[private-network-ids.{index}] The PrivateNetwork IDs on which to filter the returned private networks
14+
[include-regional] Include regional Private Networks
1415
[organization-id] The organization ID on which to filter the returned private networks
1516
[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 | pl-waw-1 | pl-waw-2 | all)
1617

docs/commands/vpc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ scw vpc private-network list [arg=value ...]
105105
| tags.{index} | | Filter private networks with one or more matching tags |
106106
| project-id | | The project ID on which to filter the returned private networks |
107107
| private-network-ids.{index} | | The PrivateNetwork IDs on which to filter the returned private networks |
108+
| include-regional | | Include regional Private Networks |
108109
| organization-id | | The organization ID on which to filter the returned private networks |
109110
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2`, `all` | Zone to target. If none is passed will use default zone from the config |
110111

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/moby/buildkit v0.11.5
2323
github.com/opencontainers/go-digest v1.0.0
2424
github.com/pkg/errors v0.9.1
25-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230328152143-e7dd9eaf36ab
25+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329081537-bf8509de0894
2626
github.com/spf13/cobra v1.6.1
2727
github.com/spf13/pflag v1.0.5
2828
github.com/stretchr/testify v1.8.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
275275
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
276276
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
277277
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
278-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230328152143-e7dd9eaf36ab h1:VCye3DHBTXfYxCi014GkRliIOvKImUBySvyHwIROCaE=
279-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230328152143-e7dd9eaf36ab/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
278+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329081537-bf8509de0894 h1:a/hpDFkms0rA96XT35q3k8u3Vnue+BLhgolcLcBF4Rc=
279+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329081537-bf8509de0894/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
280280
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
281281
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
282282
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=

internal/namespaces/vpc/v1/vpc_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ func vpcPrivateNetworkList() *core.Command {
9898
Deprecated: false,
9999
Positional: false,
100100
},
101+
{
102+
Name: "include-regional",
103+
Short: `Include regional Private Networks`,
104+
Required: false,
105+
Deprecated: false,
106+
Positional: false,
107+
},
101108
{
102109
Name: "organization-id",
103110
Short: `The organization ID on which to filter the returned private networks`,

0 commit comments

Comments
 (0)