-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathaffinity-groups.go
More file actions
33 lines (30 loc) · 1 KB
/
affinity-groups.go
File metadata and controls
33 lines (30 loc) · 1 KB
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
29
30
31
32
33
package affinity_groups
import (
"github.com/spf13/cobra"
"github.com/stackitcloud/stackit-cli/internal/cmd/affinity-groups/create"
"github.com/stackitcloud/stackit-cli/internal/cmd/affinity-groups/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/affinity-groups/describe"
"github.com/stackitcloud/stackit-cli/internal/cmd/affinity-groups/list"
"github.com/stackitcloud/stackit-cli/internal/cmd/params"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
)
func NewCmd(params *params.CmdParams) *cobra.Command {
cmd := &cobra.Command{
Use: "affinity-group",
Short: "Manage server affinity groups",
Long: "Manage the lifecycle of server affinity groups.",
Args: args.NoArgs,
Run: utils.CmdHelp,
}
addSubcommands(cmd, params)
return cmd
}
func addSubcommands(cmd *cobra.Command, params *params.CmdParams) {
cmd.AddCommand(
create.NewCmd(params),
delete.NewCmd(params),
describe.NewCmd(params),
list.NewCmd(params),
)
}