From a0b24de32fa3459ab01d3f667384c51b0d7e43d0 Mon Sep 17 00:00:00 2001 From: Jakub Guzik Date: Tue, 22 Jun 2021 22:51:46 +0200 Subject: Add support for volume prune until filter to http api As stated in #10579 docker silently implements until filter for volume prune. This commit adds initial support to the HTTP API, both libpod and compat. It enables further work on that issue, such as adding cli support in the future. Signed-off-by: Jakub Guzik --- pkg/api/server/register_volumes.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkg/api') diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go index e5d6cf195..d58bf0662 100644 --- a/pkg/api/server/register_volumes.go +++ b/pkg/api/server/register_volumes.go @@ -88,7 +88,8 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // description: | // JSON encoded value of filters (a map[string][]string) to match volumes against before pruning. // Available filters: - // - label (label=, label==, label!=, or label!==) Prune volumes with (or without, in case label!=... is used) the specified labels. + // - `until=` Prune volumes created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + // - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. // responses: // '200': // "$ref": "#/responses/VolumePruneResponse" @@ -268,7 +269,8 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // description: | // JSON encoded value of filters (a map[string][]string) to match volumes against before pruning. // Available filters: - // - label (label=, label==, label!=, or label!==) Prune volumes with (or without, in case label!=... is used) the specified labels. + // - `until=` Prune volumes created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + // - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. // responses: // '200': // "$ref": "#/responses/DockerVolumePruneResponse" -- cgit v1.2.3-54-g00ecf