forked from TrueCloudLab/frostfs-node
[#1012] cli: Fix messages for list commands
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
93bf9acbc2
commit
6f25c790aa
2 changed files with 4 additions and 3 deletions
|
@ -69,9 +69,10 @@ func parseTarget(cmd *cobra.Command) *control.ChainTarget {
|
||||||
func listRules(cmd *cobra.Command, _ []string) {
|
func listRules(cmd *cobra.Command, _ []string) {
|
||||||
pk := key.Get(cmd)
|
pk := key.Get(cmd)
|
||||||
|
|
||||||
|
target := parseTarget(cmd)
|
||||||
req := &control.ListChainLocalOverridesRequest{
|
req := &control.ListChainLocalOverridesRequest{
|
||||||
Body: &control.ListChainLocalOverridesRequest_Body{
|
Body: &control.ListChainLocalOverridesRequest_Body{
|
||||||
Target: parseTarget(cmd),
|
Target: target,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ func listRules(cmd *cobra.Command, _ []string) {
|
||||||
|
|
||||||
chains := resp.GetBody().GetChains()
|
chains := resp.GetBody().GetChains()
|
||||||
if len(chains) == 0 {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ func listTargets(cmd *cobra.Command, _ []string) {
|
||||||
|
|
||||||
targets := resp.GetBody().GetTargets()
|
targets := resp.GetBody().GetTargets()
|
||||||
if len(targets) == 0 {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue