summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-14 09:22:30 -0500
committerGitHub <noreply@github.com>2020-12-14 09:22:30 -0500
commite5741b984ed438e4c716eec67c83b3c927a97ebb (patch)
treeb4805b1a2a01cdb00bbb1f237ac194196fe446ae /pkg/domain/entities
parentbdbf47f606fbb592d563d33ddf3b7200c8607bf2 (diff)
parenta0204ada0974343cbf6eefe988ef35cdfe28fb52 (diff)
downloadpodman-e5741b984ed438e4c716eec67c83b3c927a97ebb.tar.gz
podman-e5741b984ed438e4c716eec67c83b3c927a97ebb.tar.bz2
podman-e5741b984ed438e4c716eec67c83b3c927a97ebb.zip
Merge pull request #8689 from bblenard/issue-8672-volume-prune
Add volume prune --filter support
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r--pkg/domain/entities/engine_container.go2
-rw-r--r--pkg/domain/entities/volumes.go7
2 files changed, 8 insertions, 1 deletions
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index 5ad475133..ac9073402 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -80,6 +80,6 @@ type ContainerEngine interface {
VolumeCreate(ctx context.Context, opts VolumeCreateOptions) (*IDOrNameResponse, error)
VolumeInspect(ctx context.Context, namesOrIds []string, opts InspectOptions) ([]*VolumeInspectReport, []error, error)
VolumeList(ctx context.Context, opts VolumeListOptions) ([]*VolumeListReport, error)
- VolumePrune(ctx context.Context) ([]*VolumePruneReport, error)
+ VolumePrune(ctx context.Context, options VolumePruneOptions) ([]*VolumePruneReport, error)
VolumeRm(ctx context.Context, namesOrIds []string, opts VolumeRmOptions) ([]*VolumeRmReport, error)
}
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index 1bc1e4301..e6b29e374 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -1,6 +1,7 @@
package entities
import (
+ "net/url"
"time"
docker_api_types "github.com/docker/docker/api/types"
@@ -109,6 +110,12 @@ type VolumeInspectReport struct {
*VolumeConfigResponse
}
+// VolumePruneOptions describes the options needed
+// to prune a volume from the CLI
+type VolumePruneOptions struct {
+ Filters url.Values `json:"filters" schema:"filters"`
+}
+
type VolumePruneReport struct {
Err error
Id string //nolint