summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers.go
Commit message (Collapse)AuthorAge
* Jira RUN-1106 Container handlers updatesJhon Honce2020-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly audit and minor changes to nil from "" Audit: - GET /containers/json ListContainers - POST /containers/create CreateContainer - GET /containers/{id}/json GetContainer - GET /containers/{id}/top TopContainer - GET /containers/{id}/logs LogsFromContainer - GET /containers/{id}/changes Changes - GET /containers/{id}/export ExportContainer - GET /containers/{id}/stats StatsContainer - POST /containers/{id}/resize ResizeTTY - POST /containers/{id}/start StartContainer - POST /containers/{id}/stop StopContainer - POST /containers/{id}/restart RestartContainer - POST /containers/{id}/kill KillContainer - POST /containers/{id}/update 404 not supported - POST /containers/{id}/rename 404 not supported - POST /containers/{id}/pause PauseContainer - POST /containers/{id}/unpause UnpauseContainer - POST /containers/{id}/attach AttachContainer - GET /containers/{id}/attach/ws 404 not supported - POST /containers/{id}/wait WaitContainer - DELETE /containers/{id} RemoveContainer - HEAD /containers/{id}/archive Archive - GET /containers/{id}/archive Archive - PUT /containers/{id}/archive Archive - POST /containers/prune PruneContainers Images etc PR's will follow. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* [WIP] Docker compat API fixesMilivoje Legenovic2020-11-23
| | | | | | | | These are the first fixes that are needed for development environments like Eclipse or IntelliJ that have Docker plug-ins and use the Docker API to speak with container engine (#7857) Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* APIv2 - strip CAP_ prefix from capabilities in jsonPetr Sakař2020-11-20
| | | | | | strip prefix "CAP_" from capabilities in json generated by container inspect operation Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
* APIv2 compatibility network connect|disconnectbaude2020-10-22
| | | | | | Add endpoints for the compat layer for network connect and disconnect. As of now, these two endpoints do nothing to change the network state of a container. They do some basic data verification and return the proper 200 response. This at least allows for scripts to work on the compatibility layer instead of getting 404s. Signed-off-by: baude <bbaude@redhat.com>
* Resolve #7860 - add time.RFC3339Nano into ContainerJSONBase3sky2020-10-12
| | | | Signed-off-by: 3sky <3sky@protonmail.com>
* Merge pull request #7918 from zhangguanzhang/apiv2-wrong-StopSignalOpenShift Merge Robot2020-10-06
|\ | | | | [apiv2] /containers/$name/json return wrong value in `.Config.StopSignal`
| * fix apiv2 /containers/$name/json return wrong value in `.Config.StopSignal`zhangguanzhang2020-10-06
| | | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* | Lowercase some errorsKir Kolyshkin2020-10-05
|/ | | | | | | | | | | | | | | | | | | | | This commit is courtesy of ``` for f in $(git ls-files *.go | grep -v ^vendor/); do \ sed -i 's/\(errors\..*\)"Error /\1"error /' $f; done for f in $(git ls-files *.go | grep -v ^vendor/); do \ sed -i 's/\(errors\..*\)"Failed to /\1"failed to /' $f; done ``` etc. Self-reviewed using `git diff --word-diff`, found no issues. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Merge pull request #7662 from jwhonce/issues/7535OpenShift Merge Robot2020-09-24
|\ | | | | Evict containers before removing via V2 API
| * Evict containers before removing via V2 APIJhon Honce2020-09-18
| | | | | | | | | | | | Fixes #7535 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | apiv2 container limit differ from docker-apizhangguanzhang2020-09-24
| | | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* | add missing return for compat killbaude2020-09-21
|/ | | | | | on an error condition in kill for the compatibility layer, we were missing a return. Signed-off-by: baude <bbaude@redhat.com>
* compat kill: only wait for 0 signal and sigkillValentin Rothberg2020-09-09
| | | | | | Docker does not wait unconditionally. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* remote kill: don't wait for the container to stopValentin Rothberg2020-09-09
| | | | | | | | | | Invert the branch logic to match the comment. Docker seems to wait for the container while Podman does not. Enable the remote-disabled system test as well. Fixes: #7135 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* fix apiv2 will create containers with incorrect commandszhangguanzhang2020-08-24
| | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* Switch all references to github.com/containers/libpod -> podmanDaniel J Walsh2020-07-28
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* move go module to v2Valentin Rothberg2020-07-06
| | | | | | | | | | | | | | | With the advent of Podman 2.0.0 we crossed the magical barrier of go modules. While we were able to continue importing all packages inside of the project, the project could not be vendored anymore from the outside. Move the go module to new major version and change all imports to `github.com/containers/libpod/v2`. The renaming of the imports was done via `gomove` [1]. [1] https://github.com/KSubedi/gomove Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Fix issue #6803 Container inspect endpoint returns null for ↵Korhonen Sami (Samlink)2020-07-03
| | | | | | | | NetworkSettings/Ports Implement mapping for NetworkSettings/Ports for Container inspect endpoint Signed-off-by: Sami Korhonen <skorhone@gmail.com>
* Move logs functionality to separate file for APIv2jgallucci322020-06-17
| | | | | | | | This simply moves the function for the log handler for APIv2 to a separate file to be consistent with other parts of the code base. Signed-off-by: jgallucci32 <john.gallucci.iv@gmail.com>
* Merge pull request #6516 from zhangguanzhang/masterOpenShift Merge Robot2020-06-11
|\ | | | | fix api fails with 'strconv.ParseUint: parsing "tcp": invalid syntax'
| * fix api fails with 'strconv.ParseUint: parsing "tcp": invalid syntax'zhangguanzhang2020-06-10
| | | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* | Fix Id->ID where possible for lintDaniel J Walsh2020-06-10
|/ | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* V2 enable remote logs and testingJhon Honce2020-05-22
| | | | | | | | | | * wire up bindings and handler for obtaining logs remotely * enable debug logging from podman in e2e test using DEBUG and DEBUG_SERVICE env variables * Fix error in streaming log frames * enable remote logs test Signed-off-by: Jhon Honce <jhonce@redhat.com>
* podman v2 remove bloat v2Brent Baude2020-04-16
| | | | | | rid ourseleves of libpod references in v2 client Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanV2: implement logsValentin Rothberg2020-04-09
| | | | | | | | | | | Implement the `podman {container} logs` for the v2 client. The remote client does not yet support it. There's some more work needed for the rest api; some options are missing (e.g., printing names) while others are broken (e.g., the until http parameter). The remote parts will be tackled in a future change. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* refactor infoBrent Baude2020-04-06
| | | | | | the current implementation of info, while typed, is very loosely done so. we need stronger types for our apiv2 implmentation and bindings. Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 add core container commandsBrent Baude2020-03-22
| | | | | | add core container commands for podmanv2: kill, pause, restart, rm, stop, unpause Signed-off-by: Brent Baude <bbaude@redhat.com>
* 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>
* | 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>
* 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>