-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathsecurity-group.go
More file actions
28 lines (24 loc) · 875 Bytes
/
security-group.go
File metadata and controls
28 lines (24 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package securitygroup
import (
"github.com/stackitcloud/stackit-cli/internal/cmd/server/security-group/attach"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/security-group/detach"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
"github.com/spf13/cobra"
)
func NewCmd(params *types.CmdParams) *cobra.Command {
cmd := &cobra.Command{
Use: "security-group",
Short: "Allows attaching/detaching security groups to servers",
Long: "Allows attaching/detaching security groups to servers.",
Args: args.NoArgs,
Run: utils.CmdHelp,
}
addSubcommands(cmd, params)
return cmd
}
func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
cmd.AddCommand(attach.NewCmd(params))
cmd.AddCommand(detach.NewCmd(params))
}