summaryrefslogtreecommitdiff
path: root/pkg/api/server
Commit message (Collapse)AuthorAge
* Document `all` query parameter for /libpod/images/pruneJelle van der Waa2021-09-16
| | | | Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* Refacter API server emphasis on loggingJhon Honce2021-09-10
| | | | | | | | | | | | | | | * To aid in debugging log API request and response bodies at trace level. Events can be correlated using the X-Reference-Id. * Server now echos X-Reference-Id from client if set, otherwise generates an unique id. * Move logic for X-Reference-Id into middleware * Change uses of Header.Add() to Set() when setting Content-Type * Log API operations in Apache format using gorilla middleware * Port server code to use BaseContext and ConnContext Fixes #10053 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Add /containers/stats response to API docsJelle van der Waa2021-09-10
| | | | | | | | | | | Include the response schema for a succesful request in the /containers/stats API documentation Additionally remove http 409 from /libpod/containers/stats docs, the documentation was copied from the deprecated stats endpoint, when a container is unavailabe the endpoint returns an empty list and no 409. Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* Merge pull request #11431 from jmguzik/secrets-ls-filtersOpenShift Merge Robot2021-09-07
|\ | | | | Add filtering functionality to http api secrets list
| * Add filtering functionality to http api secrets listJakub Guzik2021-09-03
| | | | | | | | | | | | | | | | Filtering is missing in both compat API and libpod API, while docker has filtering functinality. This commit enables filtering option using name and id in both libpod and http API. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | Document default timeout for libpod API Container RestartJelle van der Waa2021-09-07
|/ | | | Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* teardown play kubeBrent Baude2021-08-24
| | | | | | | | | add the ability for play kube to tear down based on the yaml used to play it. it is indicated by --down in the play kube command. volumes are NOT deleted during the teardown. pods and their containers are stopped and removed. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #11271 from jwhonce/issues/8577OpenShift Merge Robot2021-08-19
|\ | | | | Clean up swagger
| * [NO TESTS NEEDED] Clean up swaggerJhon Honce2021-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | * Removed defined by unused responses * Added missing body definitions * Updated header input definitions Outstanding issues: * Supporting body ContainerConfig for /commit endpoint Fixes #8577 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #11154 from cdoern/imagesPullopenshift-ci[bot]2021-08-16
|\ \ | |/ |/| Libpod images pull changes
| * Libpod images pull changescdoern2021-08-09
| | | | | | | | | | | | | | | | | | Added quiet param to docs to limit stream output. Formatted JSON. fixes #10612 Signed-off-by: cdoern <cbdoer23@g.holycross.edu> Signed-off-by: cdoern <cdoern@redhat.com>
* | Add until filter to podman pod psJakub Guzik2021-08-10
|/ | | | | | | | This commit adds additional until filter to podman pod ps (ls/list). Additionally, it also adds descriptions for podman pod ps filters available via http api. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* Merge pull request #11003 from pascomnet/f_statsopenshift-ci[bot]2021-08-04
|\ | | | | stats: add a interval parameter to cli and api stats streaming
| * stats: add a interval parameter to cli and api stream modeThomas Weber2021-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | podman stats polled by default in a 1 sec period. This can put quite some load on a machine if you run many containers. The default value is now 5 seconds. You can change this interval with a new, optional, --interval, -i cli flag. The api request got also a interval query parameter for the same purpose. Additionally a unused const was removed. Api and cli will fail the request if a 0 or negative value is passed in. Signed-off-by: Thomas Weber <towe75@googlemail.com>
* | Only support containers stats using cgroups v2Jhon Honce2021-08-03
| | | | | | | | | | | | Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1988252 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Remove ReadHeaderTimeoutMatej Vasek2021-07-29
| | | | | | | | | | | | | | | | | | | | | | Effectively sets timeout to infinity. This is needed in order to make `podman` work with `pack`. The `pack` CLI is keeping one connection for prolonged time. Closing the connection breaks `pack`'s functionality. [NO TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | support container to container copyMehul Arora2021-07-27
| | | | | | | | | | | | | | | | | | Implement container to container copy. Previously data could only be copied from/to the host. Fixes: #7370 Co-authored-by: Mehul Arora <aroram18@mcmaster.ca> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #11015 from jmguzik/until-list-volumeOpenShift Merge Robot2021-07-22
|\ \ | | | | | | Add until filter to volume ls filters list
| * | Add until filter to volume ls filters listJakub Guzik2021-07-22
| |/ | | | | | | | | | | | | As a conclusion of a discussion in #10861, until filter is added by this commit to volume ls filters. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* / [CI:DOCS] Fix GitHub URL to Podman logoDavid Ward2021-07-21
|/ | | | | | The Podman logo is not rendered on docs.podman.io with the current URL. Signed-off-by: David Ward <david.ward@ll.mit.edu>
* podman diff accept two images or containersPaul Holzinger2021-07-02
| | | | | | | | | | | | | | | | | | | First, make podman diff accept optionally a second argument. This allows the user to specify a second image/container to compare the first with. If it is not set the parent layer will be used as before. Second, podman container diff should only use containers and podman image diff should only use images. Previously, podman container diff would use the image when both an image and container with this name exists. To make this work two new parameters have been added to the api. If they are not used the previous behaviour is used. The same applies to the bindings. Fixes #10649 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #10756 from jmguzik/volume-prune-until-http-apiOpenShift Merge Robot2021-06-23
|\ | | | | Add support for volume prune until filter to http api
| * Add support for volume prune until filter to http apiJakub Guzik2021-06-22
| | | | | | | | | | | | | | | | 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 <jakubmguzik@gmail.com>
* | create: support images with invalid platformValentin Rothberg2021-06-23
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much to my regret, there is a number of images in the wild with invalid platforms breaking the platform checks in libimage that want to make sure that a local image is matching the expected platform. Imagine a `podman run --arch=arm64 fedora` with a local amd64 fedora image. We really shouldn't use the local one in this case and pull down the arm64 one. The strict platform checks in libimage in combination with invalid platforms in images surfaced in Podman being able to pull an image but failing to look it up in subsequent presence checks. A `podman run` would hence pull such an image but fail to create the container. Support images with invalid platforms by vendoring the latest HEAD from containers/common. Also remove the partially implemented pull-policy logic from Podman and let libimage handle that entirely. However, whenever --arch, --os or --platform are specified, the pull policy will be forced to "newer". This way, we pessimistically assume that the local image has an invalid platform and we reach out to the registry. If there's a newer image (i.e., one with a different digest), we'll pull it down. Please note that most of the logic has either already been implemented in libimage or been moved down which allows for removing some clutter from Podman. [NO TESTS NEEDED] since c/common has new tests. Podman can rely on the existing tests. Fixes: #10648 Fixes: #10682 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #10683 from Luap99/exec-resizeOpenShift Merge Robot2021-06-16
|\ | | | | Fix resize race with podman exec -it
| * Fix resize race with podman exec -itPaul Holzinger2021-06-16
| | | | | | | | | | | | | | | | | | | | | | When starting a process with `podman exec -it` the terminal is resized after the process is started. To fix this allow exec start to accept the terminal height and width as parameter and let it resize right before the process is started. Fixes #10560 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #10588 from cdoern/imgDocsOpenShift Merge Robot2021-06-16
|\ \ | |/ |/| [CI:DOCS] converted query parameter for credentials to header parameter.
| * Docs Switch from Query Param to Headercdoern2021-06-15
| | | | | | | | | | | | credentials switched from query param to header x-reg due to podman parsing the header for credentials not the query itself. Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | [CI:DOCS] Update swagger for inspect networkJhon Honce2021-06-08
| | | | | | | | | | | | | | | | struct for swagger was pointing to wrong internal type Fixes #10559 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #10603 from cdoern/networksQueryCharlie Doern2021-06-08
|\ \ | | | | | | implemented verbose and scope as possible
| * | fixed docs and schemascdoern2021-06-08
| | | | | | | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | | Merge pull request #10597 from Luap99/pruneOpenShift Merge Robot2021-06-08
|\ \ \ | | | | | | | | Fix network prune api docs
| * | | Fix network prune api docsPaul Holzinger2021-06-08
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The api doc used wrong response examples for both the compat and libpod network prune endpoints. Change the doc so that it matches the actual return values. Also fix the endpoints to return an empty array instead of null when no networks are removed. [NO TESTS NEEDED] Fixes: #10564 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #10548 from cdoern/imgFeatureOpenShift Merge Robot2021-06-08
|\ \ \ | |/ / |/| | API images/create added missing parameters platform, message, repo
| * | made requested changes, fixed api testscdoern2021-06-04
| |/ | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #10568 from jwhonce/issues/10562OpenShift Merge Robot2021-06-06
|\ \ | | | | | | [CI:DOCS] Document which CNI fields are encoded
| * | [CI:DOCS] Document which CNI fields are encodedJhon Honce2021-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CNI configuration fields named Bytes are typed []byte which the GO JSON encoded automatically Base64 encodes. Note: Future major versions of Podman will refactor the networking endpoints to encapsulate/abstract the CNI structures which will allow better documenation and encoding. Fixes #10562 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #10549 from Luap99/fix-9859OpenShift Merge Robot2021-06-05
|\ \ \ | |/ / |/| | remote: always send resize before the container starts
| * | remote: always send resize before the container startsPaul Holzinger2021-06-04
| |/ | | | | | | | | | | | | | | | | | | | | | | | | There is race condition in the remote client attach logic. Because the resize api call was handled in an extra goroutine the container was started before the resize call happend. To fix this we have to call resize in the same goroutine as attach. When the first resize is done start a goroutine to listen on SIGWINCH in the background and resize again if the signal is received. Fixes #9859 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* / Add CORS supportBoaz Shuster2021-06-04
|/ | | | | | [NO TESTS NEEDED] Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
* added tests in python rest apicdoern2021-06-01
| | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* Match swagger to "as built" outputJhon Honce2021-05-21
| | | | | | | | | | | * Remove all Types no longer referenced, they were never used A future API breaking version of Podman API, may restore these Types and push formatting into presentation layer vs. server. Fixes #9578 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Downgrade API service routing table loggingJhon Honce2021-05-20
| | | | | | | | | | | [NO TESTS NEEDED] * Log the routing table output at Trace vs. Debug level. Reduce noise in debugging output. * Tweak SDNotify message to report Warn when it fails. Previously failures were silent. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Fix formatting and indentation in network http api docsJakub Guzik2021-05-17
| | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* add --mac-address to podman play kubePaul Holzinger2021-05-04
| | | | | | | | | | Add a new --mac-address flag to podman play kube. This is used to specify a static MAC address which should be used for the pod. This option can be specified several times because play kube can create more than one pod. Fixes #9731 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* add --ip to podman play kubePaul Holzinger2021-04-16
| | | | | | | | | | Add a new --ip flag to podman play kube. This is used to specify a static IP address which should be used for the pod. This option can be specified several times because play kube can create more than one pod. Fixes #8442 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Reflect current state of prune implementation in docsJakub Guzik2021-04-13
| | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* [CI:DOCS] Correct status code for /pods/createJhon Honce2021-04-12
| | | | | | | | | | Swagger documentation reported that the API endpoint /pods/create returned 200 while the as-built code returned 201. 201 is more correct so documentation updated. Tests already checked for 201 so no updated needed. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #9121 from tmds/swagger_remove_name_wildcardsOpenShift Merge Robot2021-04-08
|\ | | | | [NO TESTS NEEDED] swagger: remove name wildcards
| * swagger: remove name wildcardsTom Deseyn2021-04-07
| | | | | | | | Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>