summaryrefslogtreecommitdiff
path: root/pkg/api/server
Commit message (Collapse)AuthorAge
* 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 #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>
* | Merge pull request #9968 from pablofsf/fix-libpod-container-wait-docsOpenShift Merge Robot2021-04-08
|\ \ | | | | | | [CI:DOCS] Adjust libpod API Container Wait documentation to the code
| * | Adjust libpod API Container Wait documentation to the codePablo Correa Gómez2021-04-07
| |/ | | | | | | | | | | Closes #9960 Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
* / [CI:DOCS] Update swagger definition of inspect manifestJhon Honce2021-04-07
|/ | | | | | | | | | * Changed reference in swagger to correct struture that was being returned. * Added summary to ManifestAddLibpod to clean up generated web site * Added serve target to Makefile, to aid in debugging generated web site Signed-off-by: Jhon Honce <jhonce@redhat.com>
* [CI:DOCS] Polish swagger OpertionIDsJhon Honce2021-04-06
| | | | | | | | Renamed 4 IDs to be consistent with other endpoints. Fixes #9951 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* [CI:DOCS] Set all operation id to be compatibileJhon Honce2021-04-05
| | | | | | | | | Libpod operation id's changed to better match compatibile id Builds on https://github.com/containers/podman/pull/9123 and corrects a duplicated ID. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Move operationIds to swagger:operation lineTom Deseyn2021-04-05
| | | | Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
* swagger: add operationIds that match with dockerTom Deseyn2021-04-05
| | | | Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
* swagger: update system version response bodyTristan Cacqueray2021-03-29
| | | | | | | | | This change updates the swagger documentation of the system version response body to match the actual response. Fixes: #9522 Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
* Remove resize race conditionDaniel J Walsh2021-03-26
| | | | | | | | | | | | | | | | Since podman-remote resize requests can come in at random times, this generates a real potential for race conditions. We should only be attempting to resize TTY on running containers, but the containers can go from running to stopped at any time, and returning an error to the caller is just causing noice. This change will basically ignore requests to resize terminals if the container is not running and return the caller to success. All other callers will still return failure. Fixes: https://github.com/containers/podman/issues/9831 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Cleanup /libpod/images/load handlerJhon Honce2021-03-19
| | | | | | | | | * Remove orphaned code * Add meaningful error from LoadImageFromSingleImageArchive() when heuristic fails to determine payload format * Correct swagger to output correct types and headers Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #9710 from jmguzik/network-prune-filters-http-apiOpenShift Merge Robot2021-03-18
|\ | | | | Network prune filters for http api (compat and libpod)
| * network prune filters for http compat and libpod apiJakub Guzik2021-03-18
| | | | | | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | add /auth for docker compatibilitytroyready2021-03-12
|/ | | | | | | | This endpoint just validates credentials: https://github.com/moby/moby/blob/v20.10.4/api/swagger.yaml#L7936-L7977 Fixes: #9564 Signed-off-by: troyready <troy@troyready.com>
* Merge pull request #9703 from jmguzik/endpoint-networksOpenShift Merge Robot2021-03-12
|\ | | | | [NO TESTS NEEDED] create endpoint for querying libpod networks
| * create endpoint for querying libpod networksJakub Guzik2021-03-12
| | | | | | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | Merge pull request #9524 from riyad/apiv3-print-tags-when-buildingOpenShift Merge Robot2021-03-11
|\ \ | |/ |/| [Compat API] Also print successfully tagging images in /build endpoint
| * [Compat API] Also print successfully tagging images in /build endpointRiyad Preukschas2021-02-25
| | | | | | | | | | | | [NO TESTS NEEDED] Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
* | Use version package to track all versionsJhon Honce2021-03-03
| | | | | | | | | | | | | | | | | | | | | | | | * Server, bindings, and CLI all now pull version information from version package. * Current /libpod API version slaved to podman/libpod Version * Bindings validate against libpod API Minimal version * Remove pkg/bindings/bindings.go and updated tests Fixes: #9207 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #9583 from ashley-cui/secOpenShift Merge Robot2021-03-03
|\ \ | | | | | | Add version field to secret compat list/inspect api
| * | Add version field to secret compat list/inspect apiAshley Cui2021-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | Docker api expects secrets endpoint to have a version field. So, the version field is added into the compat endpoint only. The version field is always 1, since Docker uses the version to keep track of updates to the secret, and currently we cannot update a secret. Signed-off-by: Ashley Cui <acui@redhat.com>
* | | swagger: update the libpodPutArchive operation verbTristan Cacqueray2021-03-02
|/ / | | | | | | | | | | | | This change fixes the libpodPutArchive verb to PUT (POST results in 405). Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
* / swagger: removes the schema type for PodSpecGenerator $refTristan Cacqueray2021-02-24
|/ | | | | | | | | | | When using a $ref, the type is ignored and it can confuse the openapi codegen and make it fails with this error: attribute paths.'/libpod/pods/create'(post).[create].type is unexpected This change removes the schema type attribute. Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
* Merge pull request #9445 from jmguzik/no-header-info-for-systemd-generationOpenShift Merge Robot2021-02-22
|\ | | | | No header info for systemd generation
| * --no-header flag implementation for generate systemdJakub Guzik2021-02-22
| | | | | | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | Merge pull request #9117 from tmds/swagger_missing_schema_propertiesOpenShift Merge Robot2021-02-22
|\ \ | | | | | | [NO TESTS NEEDED] swagger: add missing schema properties
| * | swagger: add missing schema propertiesTom Deseyn2021-02-22
| |/ | | | | | | | | | | NO_TESTS_NEEDED Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
* / 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>
* [CI:DOCS] [NO TESTS NEEDED] Update swagger doc for libpod container waitMatej Vasek2021-02-18
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.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>
* 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>
* | 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>
* 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>
* 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>