[#1501] cli: Move PrintHumanReadableAPEChain to a common package

* Both `frostfs-cli` and `frostfs-adm` APE-related subcommands use
  `PrintHumanReadableAPEChain` to print a parsed APE-chain. So, it's
  more correct to have it in a common package over `frostfs-cli` and
  `frostfs-adm` folders.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-11-18 12:37:55 +03:00 committed by Evgenii Stratonikov
parent e2cb0640f1
commit ae31ef3602
10 changed files with 57 additions and 46 deletions

View file

@ -7,6 +7,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/key"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/modules/util"
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
apeCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common/ape"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/client"
apechain "git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
@ -55,7 +56,7 @@ func parseChain(cmd *cobra.Command) *apechain.Chain {
}
cmd.Println("Parsed chain:")
util.PrintHumanReadableAPEChain(cmd, chain)
apeCmd.PrintHumanReadableAPEChain(cmd, chain)
return chain
}