summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
Commit message (Collapse)AuthorAge
* Merge pull request #5525 from baude/apiv2bindinglogsOpenShift Merge Robot2020-03-19
|\ | | | | apiv2 add bindings for logs|events
| * apiv2 add bindings for logs|eventsBrent Baude2020-03-19
| | | | | | | | | | | | add go-bindings for logs and events. tests were also added. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #5546 from jwhonce/wip/entitiesOpenShift Merge Robot2020-03-19
|\ \ | | | | | | V2 podman command
| * | V2 podman commandJhon Honce2020-03-18
| |/ | | | | | | Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #5554 from baude/compatfixOpenShift Merge Robot2020-03-19
|\ \ | | | | | | fix reported compat issues
| * | fix reported compat issuesBrent Baude2020-03-19
| |/ | | | | | | | | | | | | | | | | | | honor -1 in in list containers for compatibility mode. it is commonly used to indicate no limit. change the json id parameter to Id in container create. Fixes: #5553 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #5445 from sujil02/podFilter-newOpenShift Merge Robot2020-03-19
|\ \ | |/ |/| Filter pods through pod list api
| * Filter pods through pod list apiSujil022020-03-17
| | | | | | | | | | | | | | Refactored current filter pods flow through the shared pod functions so filter pod functionalities can be shared between api and cmd. Signed-off-by: Sujil02 <sushah@redhat.com>
* | serve swagger when presentBrent Baude2020-03-18
|/ | | | | | register the swagger endpoint and add some error handling for when the swagger file does not exist Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5449 from baude/manifestsOpenShift Merge Robot2020-03-17
|\ | | | | apiv2 addition of manifests
| * apiv2 addition of manifestsBrent Baude2020-03-16
| | | | | | | | | | | | | | | | add endpoints for create, add, remove, inspect, and push. this allows manifests to be managed through the restful interfaces. also added go-bindings and tests Signed-off-by: Brent Baude <bbaude@redhat.com>
* | add apiv2 healthcheck codeBrent Baude2020-03-13
|/ | | | | | reworking binding and endpoint to actually work. added documentation in swagger for and various return code possibilities. add a good start on tests though we need some other container functions not yet implemented for that. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Update start stop api to use pod status function.Sujil022020-03-10
| | | | | | | Update the strat and stop api to validate pod status based on status functions rather than iterating over all the containers in the pod. (Addressing the TO-DO) Signed-off-by: Sujil02 <sushah@redhat.com>
* Refactor handler packagesJhon Honce2020-03-10
| | | | | | | To help with packaging, the handlers in pkg/api/handlers are now found in pkg/api/handler/compat. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Fix spelling mistakes in code found by codespellDaniel J Walsh2020-03-07
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #5374 from baude/createOpenShift Merge Robot2020-03-07
|\ | | | | add default network for apiv2 create
| * add default network for apiv2 createBrent Baude2020-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | during container creation, if no network is provided, we need to add a default value so the container can be later started. use apiv2 container creation for RunTopContainer instead of an exec to the system podman. RunTopContainer now also returns the container id and an error. added a libpod commit endpoint. also, changed the use of the connections and bindings slightly to make it more convenient to write tests. Fixes: 5366 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #5410 from st1971/api-fixesOpenShift Merge Robot2020-03-06
|\ \ | |/ |/| APIv2: compatible api fixes
| * Removed extraneous comments and defaults plus amended variable declarationSteve Taylor2020-03-06
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Removed the unnecessary codeSteve Taylor2020-03-06
| | | | | | | | | | | | | | removed defaulting of query.Size amended types.LibpodToContainer, removed hard coded true from inspect call Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Implemented size parameter on GetContainerSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Implement size parameter on ListContainersSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Map configured status to created to match docker API statesSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Fix to remove null entry from end of images jsonSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
* | golangci: enable goimportsValentin Rothberg2020-03-05
|/ | | | | | Enable the goimports linter and fix reports. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* rework apiv2 wait endpoint|bindingBrent Baude2020-02-28
| | | | | | | | added the ability to wait on a condition (stopped, running, paused...) for a container. if a condition is not provided, wait will default to the stopped condition which uses the original wait code paths. if the condition is stopped, the container exit code will be returned. also, correct a mux issue we discovered. Signed-off-by: Brent Baude <bbaude@redhat.com>
* binding tests for volumesBrent Baude2020-02-27
| | | | | | | | add binding tests for volumes: inspect(get), create, remove, prune, and list implement filters ability for volumes Signed-off-by: Brent Baude <bbaude@redhat.com>
* more image binding testsBrent Baude2020-02-23
| | | | | | | | add two additional bindings tests for image usage. add ability to use search filter on the endpoint. Signed-off-by: Brent Baude <bbaude@redhat.com>
* add more image tests for go bindingsBrent Baude2020-02-21
| | | | | | adding more image tests for go bindings. one big change is that the params were converted from map[string]string to url.values to account for the ability to send []string as query params Signed-off-by: Brent Baude <bbaude@redhat.com>
* search endpoint failure correctionBrent Baude2020-02-21
| | | | | | | | when returning an invalid search, a return was omitted triggering a null on the consumer end. Fixes: #5228 Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5178 from marusak/expose_cpuOpenShift Merge Robot2020-02-21
|\ | | | | stats: Expose CPU usage in API
| * stats: Expose CPU usage in APIMatej Marusak2020-02-17
| | | | | | | | | | | | | | | | | | | | `stats.CPU` is a number representing CPU usage in percents. It is possible to calculate it from other exposed fields (once they are implemented correctly) but why to do it, when this is already calculated. This does not break API, it just adds another field. Signed-off-by: Matej Marusak <mmarusak@redhat.com>
* | Merge pull request #5262 from schubter/signal-decodeOpenShift Merge Robot2020-02-21
|\ \ | | | | | | APIv2: Fixed syscall.Signal not convertable by decoder
| * | Fixed syscall.Signal not convertable by decoderAndreas Schubert2020-02-19
| | | | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | Merge pull request #5251 from sujil02/pod-testOpenShift Merge Robot2020-02-20
|\ \ \ | | | | | | | | Add test to validate the pod bindings api
| * | | Add test to validate the pod bindings apiSujil022020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include test to validate pod create, start, stop, restart, pause, unpause, list, and inspect api bindings. Also includes bug fixes that resulted in invalid api responses. Signed-off-by: Sujil02 <sushah@redhat.com>
* | | | apiv2 container create using specgenBrent Baude2020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | this uses the specgen structure to create containers rather than the outdated createconfig. right now, only the apiv2 create is wired up. eventually the cli will also have to be done. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | | Merge pull request #5259 from schubter/apiv2-create-imageOpenShift Merge Robot2020-02-19
|\ \ \ \ | | | | | | | | | | APIv2: Fixed CreateImageFromImage not respecting supplied Tag parameter
| * | | | Fixed CreateImageFromImage not respecting supplied Tag parameterAndreas Schubert2020-02-19
| | |/ / | |/| | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* / | | Fixed typo in KillContainerAndreas Schubert2020-02-19
|/ / / | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | Merge pull request #5247 from schubter/5242OpenShift Merge Robot2020-02-19
|\ \ \ | |/ / |/| | APIv2: fixes decoder issue
| * | adds missing query struct tags and exports the fieldsAndreas Schubert2020-02-18
| | | | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | Update mux rules to allow slashes in image namesJhon Honce2020-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | %2F escaping is also supported. Return better response on bad search terms Fixes #5229 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Fix handler and systemd activation errorsJhon Honce2020-02-17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On panic from handler: log warning and stack trace, report InternalServerError to client When using `podman system service` make determining the listening endpoint deterministic. // When determining _*THE*_ listening endpoint -- // 1) User input wins always // 2) systemd socket activation // 3) rootless honors XDG_RUNTIME_DIR // 4) if varlink -- adapter.DefaultVarlinkAddress // 5) lastly adapter.DefaultAPIAddress Fixes #5150 Fixes #5151 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Refactor image tree for API usageSascha Grunert2020-02-17
| | | | | | | | Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | Merge pull request #5217 from mheon/rework_label_parsingOpenShift Merge Robot2020-02-15
|\ \ | | | | | | Rework label parsing
| * | Rework label parsingMatthew Heon2020-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We attempted to share all logic for parsing labels and environment variables, which on the surface makes lots of sense (both are formatted key=value so parsing logic should be identical) but has begun to fall apart now that we have added additional logic to environment variable handling. Environment variables that are unset, for example, are looked up against environment variables set for the process. We don't want this for labels, so we have to split parsing logic. Fixes #3854 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #5214 from baude/apiv2loglibpodOpenShift Merge Robot2020-02-14
|\ \ \ | |/ / |/| | apiv2 libpod container logs
| * | apiv2 libpod container logsBrent Baude2020-02-14
| | | | | | | | | | | | | | | | | | wire up containers logs for libpod side of the house, same as compat. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #5216 from baude/bindingstestcacheOpenShift Merge Robot2020-02-14
|\ \ \ | | | | | | | | add caching for binding tests