File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed
Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 1+ package snapshot
2+
3+ import (
4+ "github.com/spf13/cobra"
5+ "github.com/stackitcloud/stackit-cli/internal/cmd/params"
6+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot/create"
7+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot/delete"
8+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot/describe"
9+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot/list"
10+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot/update"
11+ "github.com/stackitcloud/stackit-cli/internal/pkg/args"
12+ "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
13+ )
14+
15+ func NewCmd (params * params.CmdParams ) * cobra.Command {
16+ cmd := & cobra.Command {
17+ Use : "snapshot" ,
18+ Short : "Provides functionality for snapshots" ,
19+ Long : "Provides functionality for snapshots." ,
20+ Args : args .NoArgs ,
21+ Run : utils .CmdHelp ,
22+ }
23+ addSubcommands (cmd , params )
24+ return cmd
25+ }
26+
27+ func addSubcommands (cmd * cobra.Command , params * params.CmdParams ) {
28+ cmd .AddCommand (create .NewCmd (params ))
29+ cmd .AddCommand (delete .NewCmd (params ))
30+ cmd .AddCommand (describe .NewCmd (params ))
31+ cmd .AddCommand (list .NewCmd (params ))
32+ cmd .AddCommand (update .NewCmd (params ))
33+ }
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ package volume
22
33import (
44 "github.com/stackitcloud/stackit-cli/internal/cmd/params"
5- "github.com/stackitcloud/stackit-cli/internal/cmd/volume/backup"
65 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/create"
76 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/delete"
87 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/describe"
98 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/list"
109 performanceclass "github.com/stackitcloud/stackit-cli/internal/cmd/volume/performance-class"
1110 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/resize"
11+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot"
1212 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/update"
1313 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
1414 "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
@@ -36,5 +36,5 @@ func addSubcommands(cmd *cobra.Command, params *params.CmdParams) {
3636 cmd .AddCommand (update .NewCmd (params ))
3737 cmd .AddCommand (resize .NewCmd (params ))
3838 cmd .AddCommand (performanceclass .NewCmd (params ))
39- cmd .AddCommand (backup .NewCmd (params ))
39+ cmd .AddCommand (snapshot .NewCmd (params ))
4040}
You can’t perform that action at this time.
0 commit comments