Evgenii Stratonikov
f1f56ef871
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
35 lines
784 B
Go
35 lines
784 B
Go
package netmap
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/common"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var Cmd = &cobra.Command{
|
|
Use: "netmap",
|
|
Short: "Operations with Network Map",
|
|
Long: `Operations with Network Map`,
|
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
|
// bind exactly that cmd's flags to
|
|
// the viper before execution
|
|
commonflags.Bind(cmd)
|
|
commonflags.BindAPI(cmd)
|
|
common.StartClientCommandSpan(cmd)
|
|
},
|
|
PersistentPostRun: common.StopClientCommandSpan,
|
|
}
|
|
|
|
func init() {
|
|
Cmd.AddCommand(
|
|
getEpochCmd,
|
|
nodeInfoCmd,
|
|
netInfoCmd,
|
|
snapshotCmd,
|
|
)
|
|
|
|
initGetEpochCmd()
|
|
initNetInfoCmd()
|
|
initNodeInfoCmd()
|
|
initSnapshotCmd()
|
|
}
|