Skip to content

Commit 9b83511

Browse files
committed
fix(vpn): lint, fmt, docs
1 parent f0cf7e9 commit 9b83511

4 files changed

Lines changed: 48 additions & 6 deletions

File tree

docs/stackit_beta_vpn_connection.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ stackit beta vpn connection [flags]
3434
* [stackit beta vpn connection delete](./stackit_beta_vpn_connection_delete.md) - Deletes a VPN connection
3535
* [stackit beta vpn connection describe](./stackit_beta_vpn_connection_describe.md) - Shows details of a VPN connection
3636
* [stackit beta vpn connection list](./stackit_beta_vpn_connection_list.md) - Lists all VPN connections of a gateway
37+
* [stackit beta vpn connection status](./stackit_beta_vpn_connection_status.md) - Shows the status of a VPN connection
3738

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## stackit beta vpn connection status
2+
3+
Shows the status of a VPN connection
4+
5+
### Synopsis
6+
7+
Shows the status of a VPN connection.
8+
9+
```
10+
stackit beta vpn connection status CONNECTION_ID [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Show status of a VPN connection
17+
$ stackit beta vpn connection status xxx --gateway-id yyy
18+
```
19+
20+
### Options
21+
22+
```
23+
--gateway-id string Gateway ID
24+
-h, --help Help for "stackit beta vpn connection status"
25+
```
26+
27+
### Options inherited from parent commands
28+
29+
```
30+
-y, --assume-yes If set, skips all confirmation prompts
31+
--async If set, runs the command asynchronously
32+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
33+
-p, --project-id string Project ID
34+
--region string Target region for region-specific requests
35+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
36+
```
37+
38+
### SEE ALSO
39+
40+
* [stackit beta vpn connection](./stackit_beta_vpn_connection.md) - Provides functionality for VPN connections
41+

internal/cmd/beta/vpn/connection/create/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command) (*inputModel, error) {
331331
return &model, nil
332332
}
333333

334-
func buildTunnelConfiguration(model tunnelInputModel) vpn.TunnelConfiguration {
334+
func buildTunnelConfiguration(model *tunnelInputModel) vpn.TunnelConfiguration {
335335
tunnel := vpn.TunnelConfiguration{
336336
RemoteAddress: model.RemoteAddress,
337337
}
@@ -376,8 +376,8 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *vpn.APIClie
376376
StaticRoutes: model.StaticRoutes,
377377
}
378378

379-
payload.Tunnel1 = buildTunnelConfiguration(model.Tunnel1)
380-
payload.Tunnel2 = buildTunnelConfiguration(model.Tunnel2)
379+
payload.Tunnel1 = buildTunnelConfiguration(&model.Tunnel1)
380+
payload.Tunnel2 = buildTunnelConfiguration(&model.Tunnel2)
381381

382382
return req.CreateGatewayConnectionPayload(payload), nil
383383
}

internal/cmd/beta/vpn/connection/create/create_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
6161
Verbosity: globalflags.VerbosityDefault,
6262
ProjectId: testProjectId,
6363
},
64-
GatewayId: testGatewayID,
65-
DisplayName: "test-connection",
66-
Enabled: nil,
64+
GatewayId: testGatewayID,
65+
DisplayName: "test-connection",
66+
Enabled: nil,
6767
Tunnel1: tunnelInputModel{
6868
RemoteAddress: "1.2.3.4",
6969
PreSharedKey: "test-psk-1",

0 commit comments

Comments
 (0)