-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathserver.go
More file actions
71 lines (66 loc) · 3.08 KB
/
server.go
File metadata and controls
71 lines (66 loc) · 3.08 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package server
import (
"github.com/stackitcloud/stackit-cli/internal/cmd/server/backup"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/command"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/console"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/create"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/deallocate"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/describe"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/list"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/log"
machinetype "github.com/stackitcloud/stackit-cli/internal/cmd/server/machine-type"
networkinterface "github.com/stackitcloud/stackit-cli/internal/cmd/server/network-interface"
osUpdate "github.com/stackitcloud/stackit-cli/internal/cmd/server/os-update"
publicip "github.com/stackitcloud/stackit-cli/internal/cmd/server/public-ip"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/reboot"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/rescue"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/resize"
securitygroup "github.com/stackitcloud/stackit-cli/internal/cmd/server/security-group"
serviceaccount "github.com/stackitcloud/stackit-cli/internal/cmd/server/service-account"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/start"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/stop"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/unrescue"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/update"
"github.com/stackitcloud/stackit-cli/internal/cmd/server/volume"
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
"github.com/spf13/cobra"
)
func NewCmd(params *types.CmdParams) *cobra.Command {
cmd := &cobra.Command{
Use: "server",
Short: "Provides functionality for servers",
Long: "Provides functionality for servers.",
Args: args.NoArgs,
Run: utils.CmdHelp,
}
addSubcommands(cmd, params)
return cmd
}
func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
cmd.AddCommand(backup.NewCmd(params))
cmd.AddCommand(command.NewCmd(params))
cmd.AddCommand(create.NewCmd(params))
cmd.AddCommand(delete.NewCmd(params))
cmd.AddCommand(describe.NewCmd(params))
cmd.AddCommand(list.NewCmd(params))
cmd.AddCommand(publicip.NewCmd(params))
cmd.AddCommand(securitygroup.NewCmd(params))
cmd.AddCommand(serviceaccount.NewCmd(params))
cmd.AddCommand(update.NewCmd(params))
cmd.AddCommand(volume.NewCmd(params))
cmd.AddCommand(networkinterface.NewCmd(params))
cmd.AddCommand(console.NewCmd(params))
cmd.AddCommand(log.NewCmd(params))
cmd.AddCommand(start.NewCmd(params))
cmd.AddCommand(stop.NewCmd(params))
cmd.AddCommand(reboot.NewCmd(params))
cmd.AddCommand(deallocate.NewCmd(params))
cmd.AddCommand(resize.NewCmd(params))
cmd.AddCommand(rescue.NewCmd(params))
cmd.AddCommand(unrescue.NewCmd(params))
cmd.AddCommand(osUpdate.NewCmd(params))
cmd.AddCommand(machinetype.NewCmd(params))
}