WIP: [#469] cli: Fix bug with name option for container list command #469

Closed
aarifullin wants to merge 1 commit from aarifullin/frostfs-node:fix/113-list_name_flag into master
Showing only changes of commit ea5002d20b - Show all commits

View file

@ -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) {

Well, we also had #224 (comment)
I think we need to change the help instead.

Well, we also had https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/224#issuecomment-5234 I think we need to change the help instead.

Fixed. Anyway, it seems that using not whole name but its part is also useful

Fixed. Anyway, it seems that using not whole name but its part is also useful

This could be useful, but also makes it impossible to search for the exact name.
The exact name was the original requirement for this task #113

This could be useful, but also makes it impossible to search for the exact name. The exact name was the original requirement for this task https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/113
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)",