Fix multiple filter options logic for podman volume ls

Fixes a bug where `podman volume ls` with multiple `label` filters would
return volumes that matched *any* of the filters, not *all* of them.

Adapts generating volume filter functions to be more in
line with how it is done for containers and pods.

Fixes: #19219

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
Jake Correnti
2023-07-17 12:57:51 -04:00
parent 34a2a48e9c
commit 96241159a8
6 changed files with 154 additions and 133 deletions

View File

@ -16,6 +16,11 @@ flag. Use the **--quiet** flag to print only the volume names.
#### **--filter**, **-f**=*filter*
Filter what volumes are shown in the output.
Multiple filters can be given with multiple uses of the --filter flag.
Filters with the same key work inclusive, with the only exception being `label`
which is exclusive. Filters with different keys always work exclusive.
Volumes can be filtered by the following attributes:
| **Filter** | **Description** |