summaryrefslogtreecommitdiff
path: root/pkg/api/server
Commit message (Collapse)AuthorAge
* podmanv2 pod create using podspecgenBrent Baude2020-03-27
| | | | | | | | using the factory approach similar to container, we now create pods based on a pod spec generator. wired up the podmanv2 pod create command, podcreatewithspec binding, simple binding test, and apiv2 endpoint. also included some code refactoring as it introduced as easy circular import. Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 container inspectBrent Baude2020-03-26
| | | | | | add ability to inspect a container Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 pod subcommandsBrent Baude2020-03-26
| | | | | | add pod kill, pause, restart, rm, start, stop, and unpause Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5573 from mheon/add_basic_exec_endpointsOpenShift Merge Robot2020-03-26
|\ | | | | Implement APIv2 Exec Create and Inspect Endpoints
| * Implement APIv2 Exec Create and Inspect EndpointsMatthew Heon2020-03-23
| | | | | | | | | | | | Start and Resize require further implementation work. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #5604 from jwhonce/wip/imagesOpenShift Merge Robot2020-03-25
|\ \ | | | | | | V2 podman images/image list
| * | V2 podman images/image listJhon Honce2020-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Updated entities to support flags/options * Updated bindings caused by entities changes * Removed handlers.ImageSummary in favor of entities.ImageSummary * Introduced StringSet() container object to simply error checking Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | podmanv2 volumesBrent Baude2020-03-24
|/ / | | | | | | | | | | add volume commands: create, inspect, ls, prune, and rm Signed-off-by: Brent Baude <bbaude@redhat.com>
* / Correctly document libpod commit endpointMatej Marusak2020-03-24
|/ | | | | | In #5588 it was forgotten and documentation still points to `/commit`. Signed-off-by: Matej Marusak <mmarusak@redhat.com>
* apiv2 container commit for libpodBrent Baude2020-03-23
| | | | | | | | add an endpoint for a libpod specific commit. add the abilility to define the format. also update documentation accordingly. Fixes: #5586 Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 volume createBrent Baude2020-03-20
| | | | | | add volume create Signed-off-by: Brent Baude <bbaude@redhat.com>
* 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 #5540 from jwhonce/issues/5531OpenShift Merge Robot2020-03-18
|\ | | | | Reduce CPU usage when --timeout=0
| * Reduce CPU usage when --timeout=0Jhon Honce2020-03-18
| | | | | | | | | | | | | | | | | | * Add second go routine for when a Timer is not needed. * goimports updated some project files Fixes #5531 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #5544 from baude/apiv2serveswaggerOpenShift Merge Robot2020-03-18
|\ \ | | | | | | serve swagger when present
| * | 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>
* / swagger: more consistency fixesEd Santiago2020-03-18
|/ | | | | | Some new 'manifests' entries have the wrong {name} parameter Signed-off-by: Ed Santiago <santiago@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>
* [CI:DOCS]Add libpod event endpointBrent Baude2020-03-11
| | | | | | add an endpoint for events on the libpod side of the house. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5448 from vrothberg/update-systemdOpenShift Merge Robot2020-03-10
|\ | | | | update systemd & dbus dependencies
| * update systemd & dbus dependenciesValentin Rothberg2020-03-10
| | | | | | | | | | | | | | | | Update the outdated systemd and dbus dependencies which are now provided as go modules. This will further tighten our dependencies and releases and pave the way for the upcoming auto-update feature. Signed-off-by: Valentin Rothberg <rothberg@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>
* 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>
* | Register handlers without version to align with docker APISteve Taylor2020-03-05
|/ | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
* Merge pull request #5371 from edsantiago/apiv2_fixesOpenShift Merge Robot2020-03-02
|\ | | | | more swagger fixes
| * more swagger fixesEd Santiago2020-03-02
| | | | | | | | Signed-off-by: Ed Santiago <santiago@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>
* Remove 1 sec delayJhon Honce2020-02-25
| | | | | | | | | * Stop closing net.Listener() twice on interrupt * Do not report error if closing server twice Fixes #5311 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #5236 from marusak/filter_by_idOpenShift Merge Robot2020-02-21
|\ | | | | apiv2: Image filtering and fixup docs
| * apiv2: Fixup /containers/json filters documentationMatej Marusak2020-02-17
| | | | | | | | | | | | | | Mention what is the input format plus put literals into quotation marks for better readability (plus it seems that some tags were not rendered). Signed-off-by: Matej Marusak <mmarusak@redhat.com>
| * apiv2: Enable filtering images by IDMatej Marusak2020-02-17
| | | | | | | | | | | | | | It is more practical for API usage and also it is more in sync how filtering of containers works. Signed-off-by: Matej Marusak <mmarusak@redhat.com>
* | Swagger: yet more fixesEd Santiago2020-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | PR #5204 added /libpod/containers/create but with the wrong swagger comment. Fix that. Also fix some other inconsistencies: missing 'libpod' prefix, missing 'Container' suffix, and change 'ContainerCreate' to 'CreateContainer'; all of these changes preserve consistency with both the invoked function as well as the overall naming conventions used in this module. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Swagger: fix one incorrect commentEd Santiago2020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #5235 updated a bunch of entrypoints from {name} to {name:.*}, requiring matching changes to swagger comments. Looks like one got missed due to the manual nature of this work. Have I mentioned lately that manual maintenance of duplicate information is not a great idea? Discrepancy caught by my script, which I would really like to look into getting into CI, but is gating on #5238. (I would actually not like to get this script into CI, I would prefer to have the duplicate information be autogenerated from the function calls themselves, but I seem to have lost that battle) Signed-off-by: Ed Santiago <santiago@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>
* | Swagger: fix inconsistencies (try #2)Ed Santiago2020-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I've mentioned once or twice, hand-maintained swagger docs are evil. This commit attempts to fix: * Inconsistent methods (swagger says POST but code signature says GET) * Inconsistent capitalization * Typos ("Mounter", "pood") * Completely wrong paths (/inspect vs /json) * Missing .Method() registrations * Missing /libpod in some /volumes paths * Incorrect method declaration: /libpod/containers/.../kill was correct (POST) in swagger but wrong in the code itself (http.MethodGet). Correct the latter to MethodPost This is two hours' work, even with a script I have that tries to cross-check everything. Swagger docs should not be human-maintained. Signed-off-by: Ed Santiago <santiago@redhat.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>
* 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 #5074 from jwhonce/wip/swagger_endpointOpenShift Merge Robot2020-02-14
|\ | | | | Add /swagger/ endpoint to serve swagger yaml to clients
| * Add /swagger/ endpoint to serve swagger yaml to clientsJhon Honce2020-02-04
| | | | | | | | | | | | The provided yaml file will describe the current Podman REST API. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #5175 from baude/apiv2eventsOpenShift Merge Robot2020-02-12
|\ \ | | | | | | apiv2 stream events
| * | apiv2 stream eventsBrent Baude2020-02-11
| | | | | | | | | | | | | | | | | | the events endpoint should be stream-based. it also needed to be registered to answer and not produce 404s. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #5169 from edsantiago/apiv2_pod_status_codesOpenShift Merge Robot2020-02-11
|\ \ \ | | | | | | | | API v2: pods: fix two incorrect return codes
| * | | API v2: pods: fix two incorrect return codesEd Santiago2020-02-11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) /pods/<X>/exists - is documented to return 204, and that's the correct value, but until now it has been returning 200. 2) /pods/create - return 409 (conflict), not 500, when pod already exists Also: in WriteResponse(), if code is 204 (No Content) or 304 (Not Modified), emit the status code only but no content-type headers nor content. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #5083 from vrothberg/v2-libpod-image-endpointsOpenShift Merge Robot2020-02-11
|\ \ \ | |/ / |/| | v2 api: /libpod/images/{import,load,pull}