Skip to content

Commit f573dc2

Browse files
committed
refactor(ufw):
- completed workflow for cli commands
1 parent b3f6256 commit f573dc2

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

‎internal/cmd/ufw/rules/rules.go‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ package rules
22

33
import (
44
"github.com/spf13/cobra"
5+
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/create"
6+
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/delete"
57
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/describe"
68
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/list"
9+
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/update"
710
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
811
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
912
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
@@ -13,7 +16,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
1316
cmd := &cobra.Command{
1417
Use: "rules",
1518
Short: "Provides functionality for UFW rules",
16-
Long: "Provides functionality for UFW rules.",
19+
Long: "Provides functionality for STACKIT Unified Firewall (UFW) rules.",
1720
Args: args.NoArgs,
1821
Run: utils.CmdHelp,
1922
}
@@ -24,7 +27,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
2427
func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
2528
cmd.AddCommand(list.NewCmd(params))
2629
cmd.AddCommand(describe.NewCmd(params))
27-
//cmd.AddCommand(create.NewCmd(params))
28-
//cmd.AddCommand(delete.NewCmd(params))
29-
//cmd.AddCommand(update.NewCmd(params))
30+
cmd.AddCommand(create.NewCmd(params))
31+
cmd.AddCommand(delete.NewCmd(params))
32+
cmd.AddCommand(update.NewCmd(params))
3033
}

‎internal/cmd/ufw/ufw.go‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ package ufw
22

33
import (
44
"github.com/spf13/cobra"
5-
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/create"
6-
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/delete"
7-
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/describe"
8-
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/list"
9-
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules/update"
5+
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw/rules"
106
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
117
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
128
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
@@ -25,9 +21,5 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
2521
}
2622

2723
func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
28-
cmd.AddCommand(list.NewCmd(params))
29-
cmd.AddCommand(describe.NewCmd(params))
30-
cmd.AddCommand(create.NewCmd(params))
31-
cmd.AddCommand(update.NewCmd(params))
32-
cmd.AddCommand(delete.NewCmd(params))
24+
cmd.AddCommand(rules.NewCmd(params))
3325
}

0 commit comments

Comments
 (0)