Skip to content

Commit b84f19c

Browse files
committed
feat(vpc): add route namespace
1 parent cf91286 commit b84f19c

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ USAGE:
77

88
AVAILABLE COMMANDS:
99
private-network Private network management command
10+
route Route management command
1011
routes Routes management command
1112
subnet Subnet management command
1213
vpc VPC management command

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
A Virtual Private Cloud (VPC) allows you to group your regional
4-
Private Networks together. Note that a Private Network can be a
3+
A Virtual Private Cloud (VPC) allows you to group your regional
4+
Private Networks together. Note that a Private Network can be a
55
part of only one VPC.
66

77
USAGE:

docs/commands/vpc.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
1010
- [List Private Networks](#list-private-networks)
1111
- [Migrate Private Networks from zoned to regional](#migrate-private-networks-from-zoned-to-regional)
1212
- [Update Private Network](#update-private-network)
13+
- [Route management command](#route-management-command)
1314
- [Routes management command](#routes-management-command)
1415
- [Return routes with associated next hop data](#return-routes-with-associated-next-hop-data)
1516
- [Subnet management command](#subnet-management-command)
@@ -184,6 +185,20 @@ scw vpc private-network update <private-network-id ...> [arg=value ...]
184185

185186

186187

188+
## Route management command
189+
190+
Custom routes.
191+
192+
Custom routes.
193+
194+
**Usage:**
195+
196+
```
197+
scw vpc route
198+
```
199+
200+
201+
187202
## Routes management command
188203

189204
Routes management command.
@@ -232,8 +247,8 @@ scw vpc subnet
232247

233248
## VPC management command
234249

235-
A Virtual Private Cloud (VPC) allows you to group your regional
236-
Private Networks together. Note that a Private Network can be a
250+
A Virtual Private Cloud (VPC) allows you to group your regional
251+
Private Networks together. Note that a Private Network can be a
237252
part of only one VPC.
238253

239254

internal/namespaces/vpc/v2/vpc_cli.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func GetGeneratedCommands() *core.Commands {
2323
vpcVpc(),
2424
vpcPrivateNetwork(),
2525
vpcSubnet(),
26+
vpcRoute(),
2627
vpcRoutes(),
2728
vpcVpcList(),
2829
vpcVpcCreate(),
@@ -50,8 +51,8 @@ func vpcRoot() *core.Command {
5051
func vpcVpc() *core.Command {
5152
return &core.Command{
5253
Short: `VPC management command`,
53-
Long: `A Virtual Private Cloud (VPC) allows you to group your regional
54-
Private Networks together. Note that a Private Network can be a
54+
Long: `A Virtual Private Cloud (VPC) allows you to group your regional
55+
Private Networks together. Note that a Private Network can be a
5556
part of only one VPC.`,
5657
Namespace: "vpc",
5758
Resource: "vpc",
@@ -79,6 +80,15 @@ func vpcSubnet() *core.Command {
7980
}
8081
}
8182

83+
func vpcRoute() *core.Command {
84+
return &core.Command{
85+
Short: `Route management command`,
86+
Long: `Custom routes.`,
87+
Namespace: "vpc",
88+
Resource: "route",
89+
}
90+
}
91+
8292
func vpcRoutes() *core.Command {
8393
return &core.Command{
8494
Short: `Routes management command`,

0 commit comments

Comments
 (0)