Skip to content

Commit a52e33b

Browse files
authored
feat(vpc): add ACL calls to vpc_v2 (scaleway#4433)
1 parent 93b5c42 commit a52e33b

File tree

6 files changed

+44
-3
lines changed

6 files changed

+44
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Acl Rules.
4+
5+
USAGE:
6+
scw vpc rule
7+
8+
FLAGS:
9+
-h, --help help for rule
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ USAGE:
88
AVAILABLE COMMANDS:
99
private-network Private network management command
1010
route Route management command
11+
rule Rule management command
1112
subnet Subnet management command
1213
vpc VPC management command
1314

docs/commands/vpc.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
1717
- [Get a Route](#get-a-route)
1818
- [Return routes with associated next hop data](#return-routes-with-associated-next-hop-data)
1919
- [Update Route](#update-route)
20+
- [Rule management command](#rule-management-command)
2021
- [Subnet management command](#subnet-management-command)
2122
- [VPC management command](#vpc-management-command)
2223
- [Create a VPC](#create-a-vpc)
@@ -331,6 +332,20 @@ scw vpc route update <route-id ...> [arg=value ...]
331332

332333

333334

335+
## Rule management command
336+
337+
Acl Rules.
338+
339+
Acl Rules.
340+
341+
**Usage:**
342+
343+
```
344+
scw vpc rule
345+
```
346+
347+
348+
334349
## Subnet management command
335350

336351
CIDR Subnet.

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.30.0.20250113175114-44bd5547ea5b
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250115142435-07825390847c
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
@@ -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.30.0.20250113175114-44bd5547ea5b h1:x15N6mLN/5Yp/MACKBocLUKRPDnM8ZtMOUpVIXKt3lg=
467-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250113175114-44bd5547ea5b/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250115142435-07825390847c h1:zn2PUSZUy/YS1oVV03pAGH6IB+gjxHxCyc/+KoRehUI=
467+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20250115142435-07825390847c/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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func GetGeneratedCommands() *core.Commands {
2424
vpcPrivateNetwork(),
2525
vpcSubnet(),
2626
vpcRoute(),
27+
vpcRule(),
2728
vpcVpcList(),
2829
vpcVpcCreate(),
2930
vpcVpcGet(),
@@ -93,6 +94,15 @@ func vpcRoute() *core.Command {
9394
}
9495
}
9596

97+
func vpcRule() *core.Command {
98+
return &core.Command{
99+
Short: `Rule management command`,
100+
Long: `Acl Rules.`,
101+
Namespace: "vpc",
102+
Resource: "rule",
103+
}
104+
}
105+
96106
func vpcVpcList() *core.Command {
97107
return &core.Command{
98108
Short: `List VPCs`,

0 commit comments

Comments
 (0)