forked from TrueCloudLab/frostfs-node
[#716] adm: Add dump policy
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
20d6132f31
commit
cae50ecb21
2 changed files with 48 additions and 0 deletions
|
@ -146,6 +146,15 @@ var (
|
|||
},
|
||||
}
|
||||
|
||||
dumpPolicy = &cobra.Command{
|
||||
Use: "dump-policy",
|
||||
Short: "Dump FrostFS policy",
|
||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
|
||||
},
|
||||
RunE: dumpPolicyCmd,
|
||||
}
|
||||
|
||||
dumpContractHashesCmd = &cobra.Command{
|
||||
Use: "dump-hashes",
|
||||
Short: "Dump deployed contract hashes",
|
||||
|
@ -239,6 +248,7 @@ func init() {
|
|||
initForceNewEpochCmd()
|
||||
initRemoveNodesCmd()
|
||||
initSetPolicyCmd()
|
||||
initDumpPolicyCmd()
|
||||
initDumpContractHashesCmd()
|
||||
initDumpNetworkConfigCmd()
|
||||
initSetConfigCmd()
|
||||
|
@ -341,6 +351,11 @@ func initSetPolicyCmd() {
|
|||
setPolicy.Flags().String(localDumpFlag, "", "Path to the blocks dump file")
|
||||
}
|
||||
|
||||
func initDumpPolicyCmd() {
|
||||
RootCmd.AddCommand(dumpPolicy)
|
||||
dumpPolicy.Flags().StringP(endpointFlag, "r", "", "N3 RPC node endpoint")
|
||||
}
|
||||
|
||||
func initRemoveNodesCmd() {
|
||||
RootCmd.AddCommand(removeNodes)
|
||||
removeNodes.Flags().String(alphabetWalletsFlag, "", "Path to alphabet wallets dir")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue