aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml26
-rw-r--r--Makefile2
-rwxr-xr-xcontrib/cirrus/pr-should-include-tests1
-rwxr-xr-xcontrib/cirrus/setup_environment.sh11
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rwxr-xr-xhack/swagger-check7
-rw-r--r--pkg/api/handlers/compat/volumes.go2
-rw-r--r--pkg/api/handlers/libpod/volumes.go2
-rw-r--r--pkg/api/server/register_containers.go13
-rw-r--r--pkg/api/server/register_generate.go4
-rw-r--r--pkg/api/server/register_healthcheck.go4
-rw-r--r--pkg/api/server/register_images.go60
-rw-r--r--pkg/api/server/register_manifest.go12
-rw-r--r--pkg/domain/filters/volumes.go20
-rw-r--r--test/apiv2/30-volumes.at16
-rw-r--r--test/e2e/config_amd64.go2
-rw-r--r--test/e2e/images_test.go6
-rw-r--r--test/e2e/rmi_test.go4
-rw-r--r--test/e2e/toolbox_test.go5
-rw-r--r--vendor/github.com/onsi/ginkgo/CHANGELOG.md5
-rw-r--r--vendor/github.com/onsi/ginkgo/config/config.go2
-rw-r--r--vendor/github.com/onsi/ginkgo/ginkgo/run_command.go3
-rw-r--r--vendor/github.com/onsi/ginkgo/types/deprecation_support.go2
-rw-r--r--vendor/modules.txt2
25 files changed, 131 insertions, 86 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 0b69f83fd..194bcae52 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -24,13 +24,13 @@ env:
####
#### Cache-image names to test with (double-quotes around names are critical)
####
- FEDORA_NAME: "fedora-33"
- PRIOR_FEDORA_NAME: "fedora-32"
+ FEDORA_NAME: "fedora-34beta"
+ PRIOR_FEDORA_NAME: "fedora-33"
UBUNTU_NAME: "ubuntu-2010"
PRIOR_UBUNTU_NAME: "ubuntu-2004"
# Google-cloud VM Images
- IMAGE_SUFFIX: "c6518453914828800"
+ IMAGE_SUFFIX: "c5032481331085312"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
@@ -151,11 +151,11 @@ build_task:
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
# ID for re-use of build output
_BUILD_CACHE_HANDLE: ${FEDORA_NAME}-build-${CIRRUS_BUILD_ID}
- # - env:
- # DISTRO_NV: ${PRIOR_FEDORA_NAME}
- # VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
- # CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
- # _BUILD_CACHE_HANDLE: ${PRIOR_FEDORA_NAME}-build-${CIRRUS_BUILD_ID}
+ - env:
+ DISTRO_NV: ${PRIOR_FEDORA_NAME}
+ VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
+ CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
+ _BUILD_CACHE_HANDLE: ${PRIOR_FEDORA_NAME}-build-${CIRRUS_BUILD_ID}
- env:
DISTRO_NV: ${UBUNTU_NAME}
VM_IMAGE_NAME: ${UBUNTU_CACHE_IMAGE_NAME}
@@ -515,11 +515,11 @@ container_integration_test_task:
_BUILD_CACHE_HANDLE: ${FEDORA_NAME}-build-${CIRRUS_BUILD_ID}
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
- # - env:
- # DISTRO_NV: ${PRIOR_FEDORA_NAME}
- # _BUILD_CACHE_HANDLE: ${PRIOR_FEDORA_NAME}-build-${CIRRUS_BUILD_ID}
- # VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
- # CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
+ - env:
+ DISTRO_NV: ${PRIOR_FEDORA_NAME}
+ _BUILD_CACHE_HANDLE: ${PRIOR_FEDORA_NAME}-build-${CIRRUS_BUILD_ID}
+ VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
+ CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
gce_instance: *standardvm
timeout_in: 90m
env:
diff --git a/Makefile b/Makefile
index a70e07991..55e15d049 100644
--- a/Makefile
+++ b/Makefile
@@ -703,7 +703,7 @@ vendor:
.PHONY: vendor-in-container
vendor-in-container:
- podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src docker.io/library/golang:1.13 make vendor
+ podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src docker.io/library/golang:1.16 make vendor
.PHONY: package
package: ## Build rpm packages
diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests
index e3c5d5da1..2bc06df50 100755
--- a/contrib/cirrus/pr-should-include-tests
+++ b/contrib/cirrus/pr-should-include-tests
@@ -32,6 +32,7 @@ fi
# This is OK if the only files being touched are "safe" ones.
filtered_changes=$(git diff --name-status $base $head |
awk '{print $2}' |
+ fgrep -vx Makefile |
fgrep -vx .cirrus.yml |
fgrep -vx changelog.txt |
fgrep -vx go.mod |
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 36878365d..86b8d78ef 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -50,14 +50,9 @@ echo -e "\n# Begin single-use VM global variables (${BASH_SOURCE[0]})" \
done <<<"$(passthrough_envars)"
) >> "/etc/ci_environment"
-#####
-##### FIXME. /etc/containers/storage.conf should have a driver name set
-##### Remove when VMs updated
-sed 's/^driver.*=.*""/driver = "overlay"/g' -i /etc/containers/storage.conf
-
# This is a possible manual maintenance gaff, check to be sure everything matches.
# shellcheck disable=SC2154
-[[ "$DISTRO_NV" == "$OS_REL_VER" ]] || \
+[[ "$DISTRO_NV" =~ $OS_REL_VER ]] || \
die "Automation spec. '$DISTRO_NV'; actual host '$OS_REL_VER'"
# Only allow this script to execute once
@@ -200,7 +195,9 @@ case "$TEST_FLAVOR" in
build) make clean ;;
unit) ;;
apiv2) ;& # use next item
- compose) ;&
+ compose)
+ dnf install -y $PACKAGE_DOWNLOAD_DIR/podman-docker*
+ ;& # continue with next item
int) ;&
sys) ;&
upgrade_test) ;&
diff --git a/go.mod b/go.mod
index 9b2bfa8ac..176ef2f32 100644
--- a/go.mod
+++ b/go.mod
@@ -43,7 +43,7 @@ require (
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635
github.com/mrunalp/fileutils v0.5.0
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
- github.com/onsi/ginkgo v1.16.0
+ github.com/onsi/ginkgo v1.16.1
github.com/onsi/gomega v1.11.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6
diff --git a/go.sum b/go.sum
index 3b6efc062..072addb4a 100644
--- a/go.sum
+++ b/go.sum
@@ -585,8 +585,8 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o=
-github.com/onsi/ginkgo v1.16.0 h1:NBrNLB37exjJLxXtFOktx6CISBdS1aF8+7MwKlTV8U4=
-github.com/onsi/ginkgo v1.16.0/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
+github.com/onsi/ginkgo v1.16.1 h1:foqVmeWDD6yYpK+Yz3fHyNIxFYNxswxqNFjSKe+vI54=
+github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
diff --git a/hack/swagger-check b/hack/swagger-check
index 646cbcb84..fc280c02d 100755
--- a/hack/swagger-check
+++ b/hack/swagger-check
@@ -178,9 +178,10 @@ sub handle_handle {
or die "$ME: $path:$.: Cannot grok '$line'\n";
my $endpoint = $1;
- # FIXME: in older code, '{name:..*}' meant 'nameOrID'. As of 2020-02
- # it looks like most of the '{name:..*}' entries are gone, except for one.
-###FIXME-obsolete? $endpoint =~ s|\{name:\.\.\*\}|{nameOrID}|;
+ # Some function declarations require an argument of the form '{name:.*}'
+ # but the swagger (which gets derived from the comments) should not
+ # include them. Normalize all such args to just '{name}'.
+ $endpoint =~ s/\{name:\.\*\}/\{name\}/;
# e.g. /auth, /containers/*/rename, /distribution, /monitor, /plugins
return 1 if $line =~ /\.UnsupportedHandler/;
diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go
index 42ece643b..d86fc1e19 100644
--- a/pkg/api/handlers/compat/volumes.go
+++ b/pkg/api/handlers/compat/volumes.go
@@ -266,7 +266,7 @@ func PruneVolumes(w http.ResponseWriter, r *http.Request) {
}
f := (url.Values)(*filterMap)
- filterFuncs, err := filters.GenerateVolumeFilters(f)
+ filterFuncs, err := filters.GeneratePruneVolumeFilters(f)
if err != nil {
utils.Error(w, "Something when wrong.", http.StatusInternalServerError, errors.Wrapf(err, "failed to parse filters for %s", f.Encode()))
return
diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go
index 442b53d1e..68aec30d5 100644
--- a/pkg/api/handlers/libpod/volumes.go
+++ b/pkg/api/handlers/libpod/volumes.go
@@ -150,7 +150,7 @@ func pruneVolumesHelper(r *http.Request) ([]*reports.PruneReport, error) {
}
f := (url.Values)(*filterMap)
- filterFuncs, err := filters.GenerateVolumeFilters(f)
+ filterFuncs, err := filters.GeneratePruneVolumeFilters(f)
if err != nil {
return nil, err
}
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index c2bb44c8f..536c4707a 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -1194,11 +1194,22 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - removing
// - stopping
// description: "Conditions to wait for. If no condition provided the 'exited' condition is assumed."
+ // - in: query
+ // name: interval
+ // type: string
+ // default: "250ms"
+ // description: Time Interval to wait before polling for completion.
// produces:
// - application/json
+ // - text/plain
// responses:
// 200:
- // $ref: "#/responses/ContainerWaitResponse"
+ // description: Status code
+ // schema:
+ // type: integer
+ // format: int32
+ // examples:
+ // text/plain: 137
// 404:
// $ref: "#/responses/NoSuchContainer"
// 500:
diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go
index 208bf668c..e10c7029c 100644
--- a/pkg/api/server/register_generate.go
+++ b/pkg/api/server/register_generate.go
@@ -8,7 +8,7 @@ import (
)
func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
- // swagger:operation GET /libpod/generate/{name:.*}/systemd libpod GenerateSystemdLibpod
+ // swagger:operation GET /libpod/generate/{name}/systemd libpod GenerateSystemdLibpod
// ---
// tags:
// - containers
@@ -17,7 +17,7 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// description: Generate Systemd Units based on a pod or container.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: Name or ID of the container or pod.
diff --git a/pkg/api/server/register_healthcheck.go b/pkg/api/server/register_healthcheck.go
index e2fd5ac68..7d8541a51 100644
--- a/pkg/api/server/register_healthcheck.go
+++ b/pkg/api/server/register_healthcheck.go
@@ -8,7 +8,7 @@ import (
)
func (s *APIServer) registerHealthCheckHandlers(r *mux.Router) error {
- // swagger:operation GET /libpod/containers/{name:.*}/healthcheck libpod ContainerHealthcheckLibpod
+ // swagger:operation GET /libpod/containers/{name}/healthcheck libpod ContainerHealthcheckLibpod
// ---
// tags:
// - containers
@@ -16,7 +16,7 @@ func (s *APIServer) registerHealthCheckHandlers(r *mux.Router) error {
// description: Execute the defined healthcheck and return information about the results
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index de8d50cc9..b32c0df20 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -188,7 +188,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/search", s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
- // swagger:operation DELETE /images/{name:.*} compat ImageDelete
+ // swagger:operation DELETE /images/{name} compat ImageDelete
// ---
// tags:
// - images (compat)
@@ -196,7 +196,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Delete an image from local storage
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: name or ID of image to delete
@@ -222,7 +222,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}"), s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}", s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete)
- // swagger:operation POST /images/{name:.*}/push compat ImagePush
+ // swagger:operation POST /images/{name}/push compat ImagePush
// ---
// tags:
// - images (compat)
@@ -230,7 +230,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Push an image to a container registry
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: Name of image to push.
@@ -269,7 +269,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/push"), s.APIHandler(compat.PushImage)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/push", s.APIHandler(compat.PushImage)).Methods(http.MethodPost)
- // swagger:operation GET /images/{name:.*}/get compat ImageGet
+ // swagger:operation GET /images/{name}/get compat ImageGet
// ---
// tags:
// - images (compat)
@@ -277,7 +277,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Export an image in tarball format
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -319,7 +319,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/get"), s.APIHandler(compat.ExportImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/get", s.APIHandler(compat.ExportImages)).Methods(http.MethodGet)
- // swagger:operation GET /images/{name:.*}/history compat ImageHistory
+ // swagger:operation GET /images/{name}/history compat ImageHistory
// ---
// tags:
// - images (compat)
@@ -327,7 +327,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Return parent layers of an image.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -343,7 +343,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/history"), s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/history", s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet)
- // swagger:operation GET /images/{name:.*}/json compat ImageInspect
+ // swagger:operation GET /images/{name}/json compat ImageInspect
// ---
// tags:
// - images (compat)
@@ -351,7 +351,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Return low-level information about an image.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -367,7 +367,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/json"), s.APIHandler(compat.GetImage)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/json", s.APIHandler(compat.GetImage)).Methods(http.MethodGet)
- // swagger:operation POST /images/{name:.*}/tag compat ImageTag
+ // swagger:operation POST /images/{name}/tag compat ImageTag
// ---
// tags:
// - images (compat)
@@ -375,7 +375,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Tag an image so that it becomes part of a repository.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -667,7 +667,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
libpod endpoints
*/
- // swagger:operation POST /libpod/images/{name:.*}/push libpod ImagePushLibpod
+ // swagger:operation POST /libpod/images/{name}/push libpod ImagePushLibpod
// ---
// tags:
// - images
@@ -675,7 +675,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Push an image to a container registry
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: Name of image to push.
@@ -705,7 +705,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/push"), s.APIHandler(libpod.PushImage)).Methods(http.MethodPost)
- // swagger:operation GET /libpod/images/{name:.*}/exists libpod ImageExistsLibpod
+ // swagger:operation GET /libpod/images/{name}/exists libpod ImageExistsLibpod
// ---
// tags:
// - images
@@ -713,7 +713,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Check if image exists in local store
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -727,7 +727,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/exists"), s.APIHandler(libpod.ImageExists)).Methods(http.MethodGet)
- // swagger:operation GET /libpod/images/{name:.*}/tree libpod ImageTreeLibpod
+ // swagger:operation GET /libpod/images/{name}/tree libpod ImageTreeLibpod
// ---
// tags:
// - images
@@ -735,7 +735,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Retrieve the image tree for the provided image name or ID
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -753,7 +753,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/tree"), s.APIHandler(libpod.ImageTree)).Methods(http.MethodGet)
- // swagger:operation GET /libpod/images/{name:.*}/history libpod ImageHistoryLibpod
+ // swagger:operation GET /libpod/images/{name}/history libpod ImageHistoryLibpod
// ---
// tags:
// - images
@@ -761,7 +761,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Return parent layers of an image.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -906,7 +906,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/remove"), s.APIHandler(libpod.ImagesBatchRemove)).Methods(http.MethodDelete)
- // swagger:operation DELETE /libpod/images/{name:.*} libpod ImageDeleteLibpod
+ // swagger:operation DELETE /libpod/images/{name} libpod ImageDeleteLibpod
// ---
// tags:
// - images
@@ -914,7 +914,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Remove an image from the local storage.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: name or ID of image to remove
@@ -1042,7 +1042,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
- // swagger:operation GET /libpod/images/{name:.*}/get libpod ImageGetLibpod
+ // swagger:operation GET /libpod/images/{name}/get libpod ImageGetLibpod
// ---
// tags:
// - images
@@ -1050,7 +1050,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Export an image
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -1109,7 +1109,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/export"), s.APIHandler(libpod.ExportImages)).Methods(http.MethodGet)
- // swagger:operation GET /libpod/images/{name:.*}/json libpod ImageInspectLibpod
+ // swagger:operation GET /libpod/images/{name}/json libpod ImageInspectLibpod
// ---
// tags:
// - images
@@ -1117,7 +1117,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Obtain low-level information about an image
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -1131,7 +1131,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/json"), s.APIHandler(libpod.GetImage)).Methods(http.MethodGet)
- // swagger:operation POST /libpod/images/{name:.*}/tag libpod ImageTagLibpod
+ // swagger:operation POST /libpod/images/{name}/tag libpod ImageTagLibpod
// ---
// tags:
// - images
@@ -1139,7 +1139,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Tag an image so that it becomes part of a repository.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
@@ -1217,7 +1217,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/commit"), s.APIHandler(libpod.CommitContainer)).Methods(http.MethodPost)
- // swagger:operation POST /libpod/images/{name:.*}/untag libpod ImageUntagLibpod
+ // swagger:operation POST /libpod/images/{name}/untag libpod ImageUntagLibpod
// ---
// tags:
// - images
@@ -1225,7 +1225,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: Untag an image. If not repo and tag are specified, all tags are removed from the image.
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the container
diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go
index ba5577a85..010d8a79e 100644
--- a/pkg/api/server/register_manifest.go
+++ b/pkg/api/server/register_manifest.go
@@ -59,7 +59,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/manifests/{name}/exists"), s.APIHandler(libpod.ExistsManifest)).Methods(http.MethodGet)
- // swagger:operation GET /libpod/manifests/{name:.*}/json manifests ManifestInspectLibpod
+ // swagger:operation GET /libpod/manifests/{name}/json manifests ManifestInspectLibpod
// ---
// summary: Inspect
// description: Display a manifest list
@@ -67,7 +67,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// - application/json
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the manifest
@@ -79,7 +79,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/{name:.*}/json"), s.APIHandler(libpod.ManifestInspect)).Methods(http.MethodGet)
- // swagger:operation POST /libpod/manifests/{name:.*}/add manifests ManifestAddLibpod
+ // swagger:operation POST /libpod/manifests/{name}/add manifests ManifestAddLibpod
// ---
// summary: Add image
// description: Add an image to a manifest list
@@ -87,7 +87,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// - application/json
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the name or ID of the manifest
@@ -107,7 +107,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/{name:.*}/add"), s.APIHandler(libpod.ManifestAdd)).Methods(http.MethodPost)
- // swagger:operation DELETE /libpod/manifests/{name:.*} manifests ManifestDeleteLibpod
+ // swagger:operation DELETE /libpod/manifests/{name} manifests ManifestDeleteLibpod
// ---
// summary: Remove
// description: Remove an image from a manifest list
@@ -115,7 +115,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// - application/json
// parameters:
// - in: path
- // name: name:.*
+ // name: name
// type: string
// required: true
// description: the image associated with the manifest
diff --git a/pkg/domain/filters/volumes.go b/pkg/domain/filters/volumes.go
index 9b2fc5280..9a08adf82 100644
--- a/pkg/domain/filters/volumes.go
+++ b/pkg/domain/filters/volumes.go
@@ -75,7 +75,25 @@ func GenerateVolumeFilters(filters url.Values) ([]libpod.VolumeFilter, error) {
return dangling
})
default:
- return nil, errors.Errorf("%q is in an invalid volume filter", filter)
+ return nil, errors.Errorf("%q is an invalid volume filter", filter)
+ }
+ }
+ }
+ return vf, nil
+}
+
+func GeneratePruneVolumeFilters(filters url.Values) ([]libpod.VolumeFilter, error) {
+ var vf []libpod.VolumeFilter
+ for filter, v := range filters {
+ for _, val := range v {
+ switch filter {
+ case "label":
+ filter := val
+ vf = append(vf, func(v *libpod.Volume) bool {
+ return util.MatchLabelFilters([]string{filter}, v.Labels())
+ })
+ default:
+ return nil, errors.Errorf("%q is an invalid volume filter", filter)
}
}
}
diff --git a/test/apiv2/30-volumes.at b/test/apiv2/30-volumes.at
index 18ff31100..623e691e3 100644
--- a/test/apiv2/30-volumes.at
+++ b/test/apiv2/30-volumes.at
@@ -123,4 +123,20 @@ t POST libpod/volumes/prune 200
#After prune volumes, there should be no volume existing
t GET libpod/volumes/json 200 length=0
+# libpod api: do not use list filters for prune
+t POST libpod/volumes/prune?filters='{"name":["anyname"]}' 500 \
+ .cause="\"name\" is an invalid volume filter"
+t POST libpod/volumes/prune?filters='{"driver":["anydriver"]}' 500 \
+ .cause="\"driver\" is an invalid volume filter"
+t POST libpod/volumes/prune?filters='{"scope":["anyscope"]}' 500 \
+ .cause="\"scope\" is an invalid volume filter"
+
+# compat api: do not use list filters for prune
+t POST volumes/prune?filters='{"name":["anyname"]}' 500 \
+ .cause="\"name\" is an invalid volume filter"
+t POST volumes/prune?filters='{"driver":["anydriver"]}' 500 \
+ .cause="\"driver\" is an invalid volume filter"
+t POST volumes/prune?filters='{"scope":["anyscope"]}' 500 \
+ .cause="\"scope\" is an invalid volume filter"
+
# vim: filetype=sh
diff --git a/test/e2e/config_amd64.go b/test/e2e/config_amd64.go
index 25e50a541..3607bdc30 100644
--- a/test/e2e/config_amd64.go
+++ b/test/e2e/config_amd64.go
@@ -5,7 +5,7 @@ var (
STORAGE_OPTIONS = "--storage-driver vfs"
ROOTLESS_STORAGE_FS = "vfs"
ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs"
- CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels, healthcheck, ubi_init, ubi_minimal}
+ CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels, healthcheck, ubi_init, ubi_minimal, fedoraToolbox}
nginx = "quay.io/libpod/alpine_nginx:latest"
BB_GLIBC = "docker.io/library/busybox:glibc"
registry = "quay.io/libpod/registry:2.6"
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 29be505b7..098d58033 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -78,7 +78,7 @@ var _ = Describe("Podman images", func() {
session = podmanTest.Podman([]string{"images", "-qn"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(len(session.OutputToStringArray())).To(BeNumerically("==", 11))
+ Expect(len(session.OutputToStringArray())).To(BeNumerically("==", len(CACHE_IMAGES)))
})
It("podman images with digests", func() {
@@ -194,7 +194,7 @@ WORKDIR /test
result := podmanTest.Podman([]string{"images", "-q", "-f", "since=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(8))
+ Expect(len(result.OutputToStringArray())).To(Equal(9))
})
It("podman image list filter after image", func() {
@@ -204,7 +204,7 @@ WORKDIR /test
result := podmanTest.Podman([]string{"image", "list", "-q", "-f", "after=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(result.OutputToStringArray()).Should(HaveLen(8), "list filter output: %q", result.OutputToString())
+ Expect(result.OutputToStringArray()).Should(HaveLen(9), "list filter output: %q", result.OutputToString())
})
It("podman images filter dangling", func() {
diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go
index 5e6d66d53..03a347a6f 100644
--- a/test/e2e/rmi_test.go
+++ b/test/e2e/rmi_test.go
@@ -221,7 +221,7 @@ var _ = Describe("Podman rmi", func() {
session = podmanTest.Podman([]string{"images", "-q", "-a"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(len(session.OutputToStringArray())).To(Equal(12))
+ Expect(len(session.OutputToStringArray())).To(Equal(len(CACHE_IMAGES) + 1))
podmanTest.BuildImage(dockerfile, "test3", "true")
@@ -236,7 +236,7 @@ var _ = Describe("Podman rmi", func() {
session = podmanTest.Podman([]string{"images", "-q", "-a"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(len(session.OutputToString())).To(Equal(142))
+ Expect(len(session.OutputToString())).To(Equal(155))
})
It("podman rmi -a with no images should be exit 0", func() {
diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go
index d605b59f9..986f856bf 100644
--- a/test/e2e/toolbox_test.go
+++ b/test/e2e/toolbox_test.go
@@ -215,7 +215,6 @@ var _ = Describe("Toolbox-specific testing", func() {
useradd := fmt.Sprintf("useradd --home-dir %s --shell %s --uid %s %s",
homeDir, shell, uid, username)
passwd := fmt.Sprintf("passwd --delete %s", username)
- podmanTest.AddImageToRWStore(fedoraToolbox)
session = podmanTest.Podman([]string{"create", "--name", "test", "--userns=keep-id", "--user", "root:root", fedoraToolbox, "sh", "-c",
fmt.Sprintf("%s; %s; echo READY; sleep 1000", useradd, passwd)})
session.WaitWithDefaultTimeout()
@@ -251,7 +250,6 @@ var _ = Describe("Toolbox-specific testing", func() {
groupadd := fmt.Sprintf("groupadd --gid %s %s", gid, groupName)
- podmanTest.AddImageToRWStore(fedoraToolbox)
session = podmanTest.Podman([]string{"create", "--name", "test", "--userns=keep-id", "--user", "root:root", fedoraToolbox, "sh", "-c",
fmt.Sprintf("%s; echo READY; sleep 1000", groupadd)})
session.WaitWithDefaultTimeout()
@@ -296,7 +294,6 @@ var _ = Describe("Toolbox-specific testing", func() {
usermod := fmt.Sprintf("usermod --append --groups wheel --home %s --shell %s --uid %s --gid %s %s",
homeDir, shell, uid, gid, username)
- podmanTest.AddImageToRWStore(fedoraToolbox)
session = podmanTest.Podman([]string{"create", "--name", "test", "--userns=keep-id", "--user", "root:root", fedoraToolbox, "sh", "-c",
fmt.Sprintf("%s; %s; %s; echo READY; sleep 1000", useradd, groupadd, usermod)})
session.WaitWithDefaultTimeout()
@@ -341,7 +338,6 @@ var _ = Describe("Toolbox-specific testing", func() {
// These should be most of the switches that Toolbox uses to create a "toolbox" container
// https://github.com/containers/toolbox/blob/master/src/cmd/create.go
- podmanTest.AddImageToRWStore(fedoraToolbox)
session = podmanTest.Podman([]string{"create",
"--dns", "none",
"--hostname", "toolbox",
@@ -378,7 +374,6 @@ var _ = Describe("Toolbox-specific testing", func() {
currentUser, err := user.Current()
Expect(err).To(BeNil())
- podmanTest.AddImageToRWStore(fedoraToolbox)
session = podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:%s", currentUser.HomeDir, currentUser.HomeDir), "--userns=keep-id", fedoraToolbox, "sh", "-c", "echo $HOME"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/vendor/github.com/onsi/ginkgo/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/CHANGELOG.md
index f99f89480..4e0afc291 100644
--- a/vendor/github.com/onsi/ginkgo/CHANGELOG.md
+++ b/vendor/github.com/onsi/ginkgo/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.16.1
+
+### Fixes
+- Supress --stream deprecation warning on windows (#793)
+
## 1.16.0
### Features
diff --git a/vendor/github.com/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go
index 25f8758a6..5f4a4c26e 100644
--- a/vendor/github.com/onsi/ginkgo/config/config.go
+++ b/vendor/github.com/onsi/ginkgo/config/config.go
@@ -20,7 +20,7 @@ import (
"fmt"
)
-const VERSION = "1.16.0"
+const VERSION = "1.16.1"
type GinkgoConfigType struct {
RandomSeed int64
diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go
index dd87e1f89..47b586d93 100644
--- a/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go
+++ b/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go
@@ -6,6 +6,7 @@ import (
"math/rand"
"os"
"regexp"
+ "runtime"
"strings"
"time"
@@ -56,7 +57,7 @@ func (r *SpecRunner) RunSpecs(args []string, additionalArgs []string) {
deprecationTracker := types.NewDeprecationTracker()
- if r.commandFlags.ParallelStream {
+ if r.commandFlags.ParallelStream && (runtime.GOOS != "windows") {
deprecationTracker.TrackDeprecation(types.Deprecation{
Message: "--stream is deprecated and will be removed in Ginkgo 2.0",
DocLink: "removed--stream",
diff --git a/vendor/github.com/onsi/ginkgo/types/deprecation_support.go b/vendor/github.com/onsi/ginkgo/types/deprecation_support.go
index c7bbfbf41..7f7a9aeb8 100644
--- a/vendor/github.com/onsi/ginkgo/types/deprecation_support.go
+++ b/vendor/github.com/onsi/ginkgo/types/deprecation_support.go
@@ -81,7 +81,7 @@ func (d *DeprecationTracker) DeprecationsReport() string {
out += formatter.F("{{light-yellow}}============================================={{/}}\n")
out += formatter.F("Ginkgo 2.0 is under active development and will introduce (a small number of) breaking changes.\n")
out += formatter.F("To learn more, view the migration guide at {{cyan}}{{underline}}https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md{{/}}\n")
- out += formatter.F("To comment, chime in at {{cyan}}{{underline}}https://github.com/onsi/ginkgo/issues/711{{/}}\n")
+ out += formatter.F("To comment, chime in at {{cyan}}{{underline}}https://github.com/onsi/ginkgo/issues/711{{/}}\n\n")
for deprecation, locations := range d.deprecations {
out += formatter.Fi(1, "{{yellow}}"+deprecation.Message+"{{/}}\n")
diff --git a/vendor/modules.txt b/vendor/modules.txt
index ffa4a7858..261feb8aa 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -427,7 +427,7 @@ github.com/nxadm/tail/ratelimiter
github.com/nxadm/tail/util
github.com/nxadm/tail/watch
github.com/nxadm/tail/winfile
-# github.com/onsi/ginkgo v1.16.0
+# github.com/onsi/ginkgo v1.16.1
github.com/onsi/ginkgo
github.com/onsi/ginkgo/config
github.com/onsi/ginkgo/extensions/table