Skip to content

Commit 4fbf67b

Browse files
committed
review feedback
1 parent c1d5074 commit 4fbf67b

8 files changed

Lines changed: 29 additions & 16 deletions

File tree

‎docs/stackit_alpha.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ Contains alpha STACKIT CLI commands
55
### Synopsis
66

77
Contains alpha STACKIT CLI commands.
8-
The commands under this group are still in a beta state, and functionality may be incomplete or have breaking changes.
8+
The commands under this group are still in an alpha state, and functionality may be incomplete or have breaking changes.
9+
10+
```
11+
stackit alpha [flags]
12+
```
913

1014
### Examples
1115

‎docs/stackit_alpha_vpc_list.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ stackit alpha vpc list [flags]
1414

1515
```
1616
Lists all VPCs
17-
$ stackit alpha vpc list xxx
17+
$ stackit alpha vpc list
1818
19-
Lists all VPCsin JSON format
19+
Lists all VPCs in JSON format
2020
$ stackit alpha vpc list --output-format json
2121
2222
Lists up to 10 VPCs
23-
$ stackit alpha vpc list xxx --limit 10
23+
$ stackit alpha vpc list --limit 10
2424
2525
Lists all VPCs which has the name "my-vpc"
26-
$ stackit alpha vpc list xxx --filter "name == 'my-vpc'"
26+
$ stackit alpha vpc list --filter "name == 'my-vpc'"
2727
```
2828

2929
### Options

‎docs/stackit_alpha_vpc_update.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ stackit alpha vpc update VPC_ID [flags]
1313
### Examples
1414

1515
```
16-
Delete a vpc with ID "xxx"
17-
$ stackit alpha vpc delete xxx
16+
Update a vpc with ID "xxx" to new name "vpc-new"
17+
$ stackit alpha vpc update xxx --name vpc-new
18+
19+
Update a vpc with ID "xxx" to new description "updated vpc"
20+
$ stackit alpha vpc update xxx --description "updated vpc"
1821
```
1922

2023
### Options

‎internal/cmd/alpha/alpha.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1010
"github.com/stackitcloud/stackit-cli/internal/pkg/examples"
1111
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
12+
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1213
)
1314

1415
func NewCmd(params *types.CmdParams) *cobra.Command {
@@ -17,8 +18,9 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
1718
Short: "Contains alpha STACKIT CLI commands",
1819
Long: fmt.Sprintf("%s\n%s",
1920
"Contains alpha STACKIT CLI commands.",
20-
"The commands under this group are still in a beta state, and functionality may be incomplete or have breaking changes."),
21+
"The commands under this group are still in an alpha state, and functionality may be incomplete or have breaking changes."),
2122
Args: args.NoArgs,
23+
Run: utils.CmdHelp,
2224
Example: examples.Build(
2325
examples.NewExample(
2426
"See the currently available alpha commands",

‎internal/cmd/alpha/vpc/delete/delete.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
5353

5454
vpcLabel, err := iaasUtils.GetVPCName(ctx, apiClient.DefaultAPI, model.ProjectId, model.VpcId)
5555
if err != nil {
56-
params.Printer.Debug(print.ErrorLevel, "get VPC name: %w", err)
56+
params.Printer.Debug(print.ErrorLevel, "get VPC name: %v", err)
5757
vpcLabel = model.VpcId
5858
} else if vpcLabel == "" {
5959
vpcLabel = model.VpcId

‎internal/cmd/alpha/vpc/list/list.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3939
Example: examples.Build(
4040
examples.NewExample(
4141
`Lists all VPCs`,
42-
"$ stackit alpha vpc list xxx"),
42+
"$ stackit alpha vpc list"),
4343
examples.NewExample(
44-
`Lists all VPCsin JSON format`,
44+
`Lists all VPCs in JSON format`,
4545
"$ stackit alpha vpc list --output-format json"),
4646
examples.NewExample(
4747
`Lists up to 10 VPCs`,
48-
"$ stackit alpha vpc list xxx --limit 10"),
48+
"$ stackit alpha vpc list --limit 10"),
4949
examples.NewExample(
5050
`Lists all VPCs which has the name "my-vpc"`,
51-
`$ stackit alpha vpc list xxx --filter "name == 'my-vpc'"`),
51+
`$ stackit alpha vpc list --filter "name == 'my-vpc'"`),
5252
),
5353
RunE: func(cmd *cobra.Command, args []string) error {
5454
ctx := context.Background()

‎internal/cmd/alpha/vpc/update/update.go‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4343
Args: args.SingleArg(vpcIdArg, utils.ValidateUUID),
4444
Example: examples.Build(
4545
examples.NewExample(
46-
`Delete a vpc with ID "xxx"`,
47-
"$ stackit alpha vpc delete xxx",
46+
`Update a vpc with ID "xxx" to new name "vpc-new"`,
47+
"$ stackit alpha vpc update xxx --name vpc-new",
48+
),
49+
examples.NewExample(
50+
`Update a vpc with ID "xxx" to new description "updated vpc"`,
51+
`$ stackit alpha vpc update xxx --description "updated vpc"`,
4852
),
4953
),
5054
RunE: func(cmd *cobra.Command, args []string) error {

‎internal/cmd/alpha/vpc/update/update_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func TestOutputResult(t *testing.T) {
210210
{
211211
name: "empty vpc response",
212212
args: args{
213-
vpcLabel: testLabels,
213+
vpcLabel: testVpcId,
214214
resp: &iaas.VPC{},
215215
},
216216
},

0 commit comments

Comments
 (0)