forked from TrueCloudLab/frostfs-node
Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
42554a9298
commit
923f84722a
934 changed files with 3470 additions and 3451 deletions
45
cmd/frostfs-cli/modules/tree/root.go
Normal file
45
cmd/frostfs-cli/modules/tree/root.go
Normal file
|
@ -0,0 +1,45 @@
|
|||
package tree
|
||||
|
||||
import (
|
||||
"github.com/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "tree",
|
||||
Short: "Operations with the Tree service",
|
||||
}
|
||||
|
||||
func init() {
|
||||
Cmd.AddCommand(addCmd)
|
||||
Cmd.AddCommand(getByPathCmd)
|
||||
Cmd.AddCommand(addByPathCmd)
|
||||
Cmd.AddCommand(listCmd)
|
||||
|
||||
initAddCmd()
|
||||
initGetByPathCmd()
|
||||
initAddByPathCmd()
|
||||
initListCmd()
|
||||
}
|
||||
|
||||
const (
|
||||
treeIDFlagKey = "tid"
|
||||
parentIDFlagKey = "pid"
|
||||
|
||||
metaFlagKey = "meta"
|
||||
|
||||
pathFlagKey = "path"
|
||||
pathAttributeFlagKey = "pattr"
|
||||
|
||||
latestOnlyFlagKey = "latest"
|
||||
)
|
||||
|
||||
func initCTID(cmd *cobra.Command) {
|
||||
ff := cmd.Flags()
|
||||
|
||||
ff.String(commonflags.CIDFlag, "", commonflags.CIDFlagUsage)
|
||||
_ = cmd.MarkFlagRequired(commonflags.CIDFlag)
|
||||
|
||||
ff.String(treeIDFlagKey, "", "Tree ID")
|
||||
_ = cmd.MarkFlagRequired(treeIDFlagKey)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue