forked from TrueCloudLab/frostfs-node
[#932] adm: Move cmd morph ape
to ape
package
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
ba00fc4971
commit
bee3741f4e
4 changed files with 25 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
||||||
package morph
|
package ape
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -33,11 +33,6 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
apeCmd = &cobra.Command{
|
|
||||||
Use: "ape",
|
|
||||||
Short: "Section for APE configuration commands",
|
|
||||||
}
|
|
||||||
|
|
||||||
addRuleChainCmd = &cobra.Command{
|
addRuleChainCmd = &cobra.Command{
|
||||||
Use: "add-rule-chain",
|
Use: "add-rule-chain",
|
||||||
Short: "Add rule chain",
|
Short: "Add rule chain",
|
||||||
|
@ -90,7 +85,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func initAddRuleChainCmd() {
|
func initAddRuleChainCmd() {
|
||||||
apeCmd.AddCommand(addRuleChainCmd)
|
Cmd.AddCommand(addRuleChainCmd)
|
||||||
|
|
||||||
addRuleChainCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
addRuleChainCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
||||||
addRuleChainCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
addRuleChainCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
||||||
|
@ -109,7 +104,7 @@ func initAddRuleChainCmd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func initRemoveRuleChainCmd() {
|
func initRemoveRuleChainCmd() {
|
||||||
apeCmd.AddCommand(removeRuleChainCmd)
|
Cmd.AddCommand(removeRuleChainCmd)
|
||||||
|
|
||||||
removeRuleChainCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
removeRuleChainCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
||||||
removeRuleChainCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
removeRuleChainCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
||||||
|
@ -123,7 +118,7 @@ func initRemoveRuleChainCmd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func initListRuleChainsCmd() {
|
func initListRuleChainsCmd() {
|
||||||
apeCmd.AddCommand(listRuleChainsCmd)
|
Cmd.AddCommand(listRuleChainsCmd)
|
||||||
|
|
||||||
listRuleChainsCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
listRuleChainsCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
||||||
listRuleChainsCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
listRuleChainsCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
||||||
|
@ -135,7 +130,7 @@ func initListRuleChainsCmd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func initSetAdminCmd() {
|
func initSetAdminCmd() {
|
||||||
apeCmd.AddCommand(setAdminCmd)
|
Cmd.AddCommand(setAdminCmd)
|
||||||
|
|
||||||
setAdminCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
setAdminCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
||||||
setAdminCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
setAdminCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
||||||
|
@ -144,7 +139,7 @@ func initSetAdminCmd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func initGetAdminCmd() {
|
func initGetAdminCmd() {
|
||||||
apeCmd.AddCommand(getAdminCmd)
|
Cmd.AddCommand(getAdminCmd)
|
||||||
|
|
||||||
getAdminCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
getAdminCmd.Flags().StringP(morphUtil.EndpointFlag, morphUtil.EndpointFlagShort, "", morphUtil.EndpointFlagDesc)
|
||||||
getAdminCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
getAdminCmd.Flags().String(morphUtil.AlphabetWalletsFlag, "", morphUtil.AlphabetWalletsFlagDesc)
|
|
@ -1,4 +1,4 @@
|
||||||
package morph
|
package ape
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
16
cmd/frostfs-adm/internal/modules/morph/ape/root.go
Normal file
16
cmd/frostfs-adm/internal/modules/morph/ape/root.go
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
package ape
|
||||||
|
|
||||||
|
import "github.com/spf13/cobra"
|
||||||
|
|
||||||
|
var Cmd = &cobra.Command{
|
||||||
|
Use: "ape",
|
||||||
|
Short: "Section for APE configuration commands",
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
initAddRuleChainCmd()
|
||||||
|
initRemoveRuleChainCmd()
|
||||||
|
initListRuleChainsCmd()
|
||||||
|
initSetAdminCmd()
|
||||||
|
initGetAdminCmd()
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package morph
|
package morph
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/ape"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -283,12 +284,7 @@ func init() {
|
||||||
initDepositoryNotaryCmd()
|
initDepositoryNotaryCmd()
|
||||||
initNetmapCandidatesCmd()
|
initNetmapCandidatesCmd()
|
||||||
|
|
||||||
RootCmd.AddCommand(apeCmd)
|
RootCmd.AddCommand(ape.Cmd)
|
||||||
initAddRuleChainCmd()
|
|
||||||
initRemoveRuleChainCmd()
|
|
||||||
initListRuleChainsCmd()
|
|
||||||
initSetAdminCmd()
|
|
||||||
initGetAdminCmd()
|
|
||||||
|
|
||||||
initProxyAddAccount()
|
initProxyAddAccount()
|
||||||
initProxyRemoveAccount()
|
initProxyRemoveAccount()
|
||||||
|
|
Loading…
Reference in a new issue