From ea5002d20b49cbc1d2c31ba445044b4a4fef0530 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Mon, 26 Jun 2023 17:19:33 +0300 Subject: [PATCH] [#XX] cli: Fix bug with name option for container list command Signed-off-by: Airat Arifullin a.arifullin@yadro.com --- cmd/frostfs-cli/modules/container/list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/frostfs-cli/modules/container/list.go b/cmd/frostfs-cli/modules/container/list.go index 1c9e4767f..079c0d4b6 100644 --- a/cmd/frostfs-cli/modules/container/list.go +++ b/cmd/frostfs-cli/modules/container/list.go @@ -70,7 +70,7 @@ var listContainersCmd = &cobra.Command{ } cnr := res.Container() - if cnrName := containerSDK.Name(cnr); flagVarListName != "" && cnrName != flagVarListName { + if cnrName := containerSDK.Name(cnr); flagVarListName != "" && !strings.Contains(cnrName, flagVarListName) { continue } cmd.Println(cnrID.String()) @@ -93,7 +93,7 @@ func initContainerListContainersCmd() { flags := listContainersCmd.Flags() flags.StringVar(&flagVarListName, flagListName, "", - "List containers by the attribute name", + "List containers by the attribute name or by its part", ) flags.StringVar(&flagVarListContainerOwner, flagListContainerOwner, "", "Owner of containers (omit to use owner from private key)",