From 6f25c790aa20a43949fe64cf90d8fe79b437d9b6 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Thu, 29 Feb 2024 14:22:10 +0300 Subject: [PATCH] [#1012] cli: Fix messages for list commands Signed-off-by: Airat Arifullin --- cmd/frostfs-cli/modules/control/list_rules.go | 5 +++-- cmd/frostfs-cli/modules/control/list_targets.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/frostfs-cli/modules/control/list_rules.go b/cmd/frostfs-cli/modules/control/list_rules.go index 31f5ff959..4598320d7 100644 --- a/cmd/frostfs-cli/modules/control/list_rules.go +++ b/cmd/frostfs-cli/modules/control/list_rules.go @@ -69,9 +69,10 @@ func parseTarget(cmd *cobra.Command) *control.ChainTarget { func listRules(cmd *cobra.Command, _ []string) { pk := key.Get(cmd) + target := parseTarget(cmd) req := &control.ListChainLocalOverridesRequest{ Body: &control.ListChainLocalOverridesRequest_Body{ - Target: parseTarget(cmd), + Target: target, }, } @@ -91,7 +92,7 @@ func listRules(cmd *cobra.Command, _ []string) { chains := resp.GetBody().GetChains() if len(chains) == 0 { - cmd.Println("Local overrides are not defined for the container.") + cmd.Printf("Local overrides are not defined for the %s.\n", strings.ToLower(target.GetType().String())) return } diff --git a/cmd/frostfs-cli/modules/control/list_targets.go b/cmd/frostfs-cli/modules/control/list_targets.go index 29033d017..ddd80b31b 100644 --- a/cmd/frostfs-cli/modules/control/list_targets.go +++ b/cmd/frostfs-cli/modules/control/list_targets.go @@ -58,7 +58,7 @@ func listTargets(cmd *cobra.Command, _ []string) { targets := resp.GetBody().GetTargets() if len(targets) == 0 { - cmd.Println("Local overrides are not defined for the container.") + cmd.Println("Local overrides are not defined for any target.") return }