forked from TrueCloudLab/frostfs-node
[#1382] neofs-cli: move netmap
command to a separate package
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
81f925d5a0
commit
12bc5607f7
5 changed files with 158 additions and 119 deletions
30
cmd/neofs-cli/modules/netmap/root.go
Normal file
30
cmd/neofs-cli/modules/netmap/root.go
Normal file
|
@ -0,0 +1,30 @@
|
|||
package netmap
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-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)
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
Cmd.AddCommand(
|
||||
getEpochCmd,
|
||||
nodeInfoCmd,
|
||||
netInfoCmd,
|
||||
)
|
||||
|
||||
initGetEpochCmd()
|
||||
initNetInfoCmd()
|
||||
initNodeInfoCmd()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue