From c255d3ea120f6c41356fe00d76b7cc76b5f0835f Mon Sep 17 00:00:00 2001 From: Ekaterina Lebedeva Date: Thu, 16 May 2024 20:33:18 +0300 Subject: [PATCH] [#1139] adm: fix dump-config output Added preferable type to params in `frostfs-adm morph dump-config` output. Signed-off-by: Ekaterina Lebedeva --- cmd/frostfs-adm/internal/modules/morph/config/config.go | 7 ++++++- pkg/morph/client/netmap/config.go | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmd/frostfs-adm/internal/modules/morph/config/config.go b/cmd/frostfs-adm/internal/modules/morph/config/config.go index f35e7aa03..1df9c1584 100644 --- a/cmd/frostfs-adm/internal/modules/morph/config/config.go +++ b/cmd/frostfs-adm/internal/modules/morph/config/config.go @@ -61,7 +61,9 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error { case netmap.ContainerFeeConfig, netmap.ContainerAliasFeeConfig, netmap.EpochDurationConfig, netmap.IrCandidateFeeConfig, netmap.MaxObjectSizeConfig, netmap.WithdrawFeeConfig, - netmap.MaxECDataCountConfig, netmap.MaxECParityCountConfig: + netmap.MaxECDataCountConfig, netmap.MaxECParityCountConfig, + netmap.EigenTrustIterationsConfig, netmap.BasicIncomeRateConfig, + netmap.AuditFeeConfig: nbuf := make([]byte, 8) copy(nbuf[:], v) n := binary.LittleEndian.Uint64(nbuf) @@ -71,6 +73,9 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error { return helper.InvalidConfigValueErr(k) } _, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%t (bool)\n", k, v[0] == 1))) + case netmap.EigenTrustAlphaConfig: + res, _ := hex.DecodeString(hex.EncodeToString(v)) + _, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s (string)\n", k, res))) default: _, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s (hex)\n", k, hex.EncodeToString(v)))) } diff --git a/pkg/morph/client/netmap/config.go b/pkg/morph/client/netmap/config.go index 2d19a8193..9b3d15f07 100644 --- a/pkg/morph/client/netmap/config.go +++ b/pkg/morph/client/netmap/config.go @@ -20,6 +20,10 @@ const ( WithdrawFeeConfig = "WithdrawFee" HomomorphicHashingDisabledKey = "HomomorphicHashingDisabled" MaintenanceModeAllowedConfig = "MaintenanceModeAllowed" + EigenTrustIterationsConfig = "EigenTrustIterations" + EigenTrustAlphaConfig = "EigenTrustAlpha" + BasicIncomeRateConfig = "BasicIncomeRate" + AuditFeeConfig = "AuditFee" ) // MaxObjectSize receives max object size configuration -- 2.45.2