summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
Commit message (Collapse)AuthorAge
* bump go module to v3Valentin Rothberg2021-02-22
| | | | | | | | | We missed bumping the go module, so let's do it now :) * Automated go code with github.com/sirkon/go-imports-rename * Manually via `vgrep podman/v2` the rest Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* API: fix libpod's container wait endpoint condition conversionNikolay Edigaryev2021-02-18
| | | | Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
* Add missing early returns in compat APIRiyad Preukschas2021-02-16
| | | | | | [NO TESTS NEEDED] Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
* images/create: always pull imageValentin Rothberg2021-02-16
| | | | | | | | | The `images/create` endpoint should always attempt to pull a newer image. Previously, the local images was used which is not compatible with Docker and caused issues in the Gitlab CI. Fixes: #9232 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Fix superfluous response.WriteHeader call in WaitContainerLibpod()Nikolay Edigaryev2021-02-12
| | | | | | | | | | | | | | | When the query decoding fails at the beginning of WaitContainerLibpod(), the Error() sets the header but doesn't returns after that. This causes the execution flow to reach the WriteResponse() at the end of WaitContainerLibpod(), which attempts to set another header, thus causing the following error: http: superfluous response.WriteHeader call from github.com/containers/podman/pkg/api/handlers/utils.WriteResponse (handler.go:124) [NO TESTS NEEDED] Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
* Merge pull request #9311 from deadNightTiger/fix-pull-dockerjavaOpenShift Merge Robot2021-02-12
|\ | | | | apiv2: handle docker-java clients pulling
| * apiv2: handle docker-java clients pullingIgor Korolev2021-02-11
| | | | | | | | | | | | | | | | | | When docker-java calls images/create?fromImage=x, it expects two things for a successful response: that both "error" and "errorDetail" are not set, and that the "progress" message contains one of five hard-coded strings ("Download complete" being one of them). Signed-off-by: Igor Korolev <missterr@gmail.com>
* | Enable whitespace linterPaul Holzinger2021-02-11
| | | | | | | | | | | | | | | | Use the whitespace linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Enable golint linterPaul Holzinger2021-02-11
| | | | | | | | | | | | | | | | Use the golint linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Enable stylecheck linterPaul Holzinger2021-02-11
| | | | | | | | | | | | | | | | Use the stylecheck linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Correct compat network prune responsebaude2021-02-10
|/ | | | | | | | | Correcting the structure of the compat network prune response. They should follow {"NetworksDeleted": [<network_name>",...]} Fixes: #9310 Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #9297 from matejvasek/apiv2_push_get_digestOpenShift Merge Robot2021-02-10
|\ | | | | Docker [APIv2] push sends digest in response body
| * Docker APIv2 push sends digest in response bodyMatej Vasek2021-02-10
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | Merge pull request #9295 from Luap99/fix-9293OpenShift Merge Robot2021-02-10
|\ \ | |/ |/| Fix compat networks endpoint for a empty result
| * Fix compat networks endpoint for a empty resultPaul Holzinger2021-02-09
| | | | | | | | | | | | | | | | | | The networks list compat api endpoint must return `[]` and not `null` if no networks are found. Fixes #9293 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #9270 from matejvasek/fix_apiv2_pushOpenShift Merge Robot2021-02-09
|\ \ | |/ |/| Fix Docker APIv2 push endpoint
| * Fix Docker APIv2 push endpointMatej Vasek2021-02-09
| | | | | | | | | | | | | | Docker doesn't have the destination parameter as libpod does, the "image name" path parameter is supposed to be the destination. Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | Merge pull request #9125 from ashley-cui/secretswiringOpenShift Merge Robot2021-02-09
|\ \ | | | | | | Implement Secrets
| * | Implement SecretsAshley Cui2021-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement podman secret create, inspect, ls, rm Implement podman run/create --secret Secrets are blobs of data that are sensitive. Currently, the only secret driver supported is filedriver, which means creating a secret stores it in base64 unencrypted in a file. After creating a secret, a user can use the --secret flag to expose the secret inside the container at /run/secrets/[secretname] This secret will not be commited to an image on a podman commit Signed-off-by: Ashley Cui <acui@redhat.com>
* | | Merge pull request #9246 from rhatdan/buildOpenShift Merge Robot2021-02-08
|\ \ \ | |_|/ |/| | Implement missing arguments for podman build
| * | Implement missing arguments for podman buildDaniel J Walsh2021-02-08
| |/ | | | | | | | | | | | | | | Buildah bud passes a bunch more flags then podman build. We need to implement hook up all of these flags to get full functionality. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / add network prunebaude2021-02-06
|/ | | | | | | | | add the ability to prune unused cni networks. filters are not implemented but included both compat and podman api endpoints. Fixes :#8673 Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #9048 from matejvasek/apiv2_waitOpenShift Merge Robot2021-02-05
|\ | | | | Fix Docker APIv2 container wait endpoint
| * Implement Docker wait conditionsMatej Vasek2021-02-03
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * Improve ContainerEngine.ContainerWait()Matej Vasek2021-02-03
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | Merge pull request #9182 from mheon/bump_apiOpenShift Merge Robot2021-02-05
|\ \ | |/ |/| Bump remote API version to 3.0.0
| * Bump remote API version to 3.0.0Matthew Heon2021-02-04
| | | | | | | | | | | | Fixes #9175 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #9188 from jwhonce/issues/8865OpenShift Merge Robot2021-02-03
|\ \ | | | | | | Report StatusConflict on Pod opt partial failures
| * | Report StatusConflict on Pod opt partial failuresJhon Honce2021-02-02
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When one or more containers in the Pod reports an error on an operation report StatusConflict and report the error(s) - jsoniter type encoding used to marshal error as string using error.Error() - Update test framework to allow setting any flag when creating pods - Fix test_resize() result check Fixes #8865 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / Fix invalid wait condition on killDaniel J Walsh2021-02-03
|/ | | | | | | | | | | When using the compatability tests on kill, the kill function goes into an infinite wait loop taking all of the CPU. This change will use the correct wait function and exit properly. Fixes: https://github.com/containers/podman/issues/9206 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #9051 from rhatdan/rmOpenShift Merge Robot2021-02-01
|\ | | | | Switch podman stop/kill/wait handlers to use abi
| * Switch podman stop/kill/wait handlers to use abiDaniel J Walsh2021-01-29
| | | | | | | | | | | | | | | | | | | | | | | | Change API Handlers to use the same functions that the local podman uses. At the same time: implement remote API for --all and --ignore flags for podman stop implement remote API for --all flags for podman stop Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Endpoint that lists containers does not return correct Status valueMilivoje Legenovic2021-01-31
|/ | | | | | | | | Eclipse and Intellij Docker plugin determines the state of the container via the Status field, returned from /containers/json call. Podman always returns empty string, and because of that, both IDEs show the wrong state of the container. Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* Podman-remote push can support --formatDaniel J Walsh2021-01-29
| | | | | | | | Fix man page to document podman push --format fully. Also found that push was not handling the tlsverify so fixed this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #9115 from rhatdan/pullOpenShift Merge Robot2021-01-28
|\ | | | | Switch podman image push handlers to use abi
| * Switch podman image push handlers to use abiDaniel J Walsh2021-01-27
| | | | | | | | | | | | | | | | | | | | | | | | Change API Handlers to use the same functions that the local podman uses. At the same time: Cleanup and pass proper bindings. Remove cli options from podman-remote push. Cleanup manifest push. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | podman-remote ps --external --pod --sort do not work.Daniel J Walsh2021-01-27
|/ | | | | | | | | | Fixup the bindings and the handling of the --external --por and --sort flags. The --storage option was renamed --external, make sure we use external up and down the stack. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #9070 from rhatdan/searchOpenShift Merge Robot2021-01-26
|\ | | | | Fixup search
| * Fixup searchDaniel J Walsh2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman-remote search had some FIXMEs in tests that were failing. So I reworked the search handler to use the local abi. This means the podman search and podman-remote search will use the same functions. While doing this, I noticed we were just outputing errors via logrus.Error rather then returning them, which works ok for podman but the messages get lost on podman-remote. Changed the code to actually return the error messages to the caller. This allows us to turn on the remaining podman-remote FIXME tests. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Fix --arch and --os flags to work correctlyDaniel J Walsh2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently podman implements --override-arch and --overide-os But Podman has made these aliases for --arch and --os. No reason to have to specify --override, since it is clear what the user intends. Currently if the user specifies an --override-arch field but the image was previously pulled for a different Arch, podman run uses the different arch. This PR also fixes this issue. Fixes: https://github.com/containers/podman/issues/8001 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | swagger.go: Fix compilation errorReinhard Tartler2021-01-24
|/ | | | | | | | | | | Error looks like: # github.com/containers/podman/pkg/api/handlers/swagger src/github.com/containers/podman/pkg/api/handlers/swagger/swagger.go:169:3: undefined: libpod.InspectVolumeData [NO TESTS NEEDED] Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* podman manifest existsPaul Holzinger2021-01-22
| | | | | | Add podman manifest exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #9027 from Luap99/podman-volume-existsOpenShift Merge Robot2021-01-21
|\ | | | | Podman volume exists
| * podman volume existsPaul Holzinger2021-01-21
| | | | | | | | | | | | Add podman volume exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #9036 from baude/composelogOpenShift Merge Robot2021-01-21
|\ \ | | | | | | Set log driver for compatibility containers
| * | Set log driver for compatability containersbaude2021-01-20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | when using the compatibility api to create containers, now reflect the use of k8s-file as json-file so that clients, which are unaware of k8s-file, can work. specifically, if the container is using k8s-file as the log driver, we change the log type in container inspection to json-file. These terms are used interchangably in other locations in libpod/podman. this fixes log messages in compose as well. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* / Fix handling of container removeDaniel J Walsh2021-01-20
|/ | | | | | | | | | | | | | | | | | | | I found several problems with container remove podman-remote rm --all Was not handled podman-remote rm --ignore Was not handled Return better errors when attempting to remove an --external container. Currently we return the container does not exists, as opposed to container is an external container that is being used. This patch also consolidates the tunnel code to use the same code for removing the container, as the local API, removing duplication of code and potential problems. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* podman network existsPaul Holzinger2021-01-19
| | | | | | Add podman network exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Allow podman push to push manifest listsDaniel J Walsh2021-01-15
| | | | | | | | | | | | | | | | | | | | | | When doing a podman images, manifests lists look just like images, so it is logical that users would assume that they can just podman push them to a registry. The problem is we throw out weird errors when this happens and users need to somehow figure out this is a manifest list rather then an image, and frankly the user will not understand the difference. This PR will make podman push just do the right thing, by failing over and attempting to push the manifest if it fails to push the image. Fix up handling of manifest push Protocol should bring back a digest string, which can either be printed or stored in a file. We should not reimplement the manifest push setup code in the tunnel code but take advantage of the api path, to make sure remote and local work the same way. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #8955 from mheon/renameOpenShift Merge Robot2021-01-14
|\ | | | | Container Rename