forked from TrueCloudLab/frostfs-node
[#932] adm: Move `netmap-candidates` to package `netmap`
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>bugfix/namespace_require
parent
36fd6c663c
commit
9690bd02aa
|
@ -1,4 +1,4 @@
|
||||||
package morph
|
package netmap
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/commonflags"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/commonflags"
|
|
@ -0,0 +1,25 @@
|
||||||
|
package netmap
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
"github.com/spf13/viper"
|
||||||
|
)
|
||||||
|
|
||||||
|
var CandidatesCmd = &cobra.Command{
|
||||||
|
Use: "netmap-candidates",
|
||||||
|
Short: "List netmap candidates nodes",
|
||||||
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||||
|
_ = viper.BindPFlag(util.EndpointFlag, cmd.Flags().Lookup(util.EndpointFlag))
|
||||||
|
_ = viper.BindPFlag(util.AlphabetWalletsFlag, cmd.Flags().Lookup(util.AlphabetWalletsFlag))
|
||||||
|
},
|
||||||
|
Run: listNetmapCandidatesNodes,
|
||||||
|
}
|
||||||
|
|
||||||
|
func initNetmapCandidatesCmd() {
|
||||||
|
CandidatesCmd.Flags().StringP(util.EndpointFlag, util.EndpointFlagShort, "", util.EndpointFlagDesc)
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
initNetmapCandidatesCmd()
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/config"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/config"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/container"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/container"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/frostfsid"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/frostfsid"
|
||||||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/netmap"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/notary"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/notary"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/policy"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/policy"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/proxy"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/proxy"
|
||||||
|
@ -135,16 +136,6 @@ var (
|
||||||
},
|
},
|
||||||
RunE: updateContracts,
|
RunE: updateContracts,
|
||||||
}
|
}
|
||||||
|
|
||||||
netmapCandidatesCmd = &cobra.Command{
|
|
||||||
Use: "netmap-candidates",
|
|
||||||
Short: "List netmap candidates nodes",
|
|
||||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
|
||||||
_ = viper.BindPFlag(util.EndpointFlag, cmd.Flags().Lookup(util.EndpointFlag))
|
|
||||||
_ = viper.BindPFlag(util.AlphabetWalletsFlag, cmd.Flags().Lookup(util.AlphabetWalletsFlag))
|
|
||||||
},
|
|
||||||
Run: listNetmapCandidatesNodes,
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -166,7 +157,7 @@ func init() {
|
||||||
RootCmd.AddCommand(container.DumpCmd)
|
RootCmd.AddCommand(container.DumpCmd)
|
||||||
initRefillGasCmd()
|
initRefillGasCmd()
|
||||||
RootCmd.AddCommand(notary.DepositCmd)
|
RootCmd.AddCommand(notary.DepositCmd)
|
||||||
initNetmapCandidatesCmd()
|
RootCmd.AddCommand(netmap.CandidatesCmd)
|
||||||
|
|
||||||
RootCmd.AddCommand(ape.Cmd)
|
RootCmd.AddCommand(ape.Cmd)
|
||||||
RootCmd.AddCommand(proxy.AddAccountCmd)
|
RootCmd.AddCommand(proxy.AddAccountCmd)
|
||||||
|
@ -175,11 +166,6 @@ func init() {
|
||||||
RootCmd.AddCommand(frostfsid.Cmd)
|
RootCmd.AddCommand(frostfsid.Cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initNetmapCandidatesCmd() {
|
|
||||||
RootCmd.AddCommand(netmapCandidatesCmd)
|
|
||||||
netmapCandidatesCmd.Flags().StringP(util.EndpointFlag, util.EndpointFlagShort, "", util.EndpointFlagDesc)
|
|
||||||
}
|
|
||||||
|
|
||||||
func initRefillGasCmd() {
|
func initRefillGasCmd() {
|
||||||
RootCmd.AddCommand(refillGasCmd)
|
RootCmd.AddCommand(refillGasCmd)
|
||||||
refillGasCmd.Flags().String(util.AlphabetWalletsFlag, "", util.AlphabetWalletsFlagDesc)
|
refillGasCmd.Flags().String(util.AlphabetWalletsFlag, "", util.AlphabetWalletsFlagDesc)
|
||||||
|
|
Loading…
Reference in New Issue