File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
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 88 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/list"
99 performanceclass "github.com/stackitcloud/stackit-cli/internal/cmd/volume/performance-class"
1010 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/resize"
11+ "github.com/stackitcloud/stackit-cli/internal/cmd/volume/snapshot"
1112 "github.com/stackitcloud/stackit-cli/internal/cmd/volume/update"
1213 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
1314 "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
@@ -35,4 +36,5 @@ func addSubcommands(cmd *cobra.Command, params *params.CmdParams) {
3536 cmd .AddCommand (update .NewCmd (params ))
3637 cmd .AddCommand (resize .NewCmd (params ))
3738 cmd .AddCommand (performanceclass .NewCmd (params ))
39+ cmd .AddCommand (snapshot .NewCmd (params ))
3840}
You can’t perform that action at this time.
0 commit comments