144 Commits

Author SHA1 Message Date
0c40b62c77 Implement APIv2 Exec Create and Inspect Endpoints
Start and Resize require further implementation work.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-03-23 16:20:42 -04:00
12e78155e1 apiv2 container commit for libpod
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>
2020-03-23 14:14:17 -05:00
c3a9ff1174 podmanv2 volume create
add volume create

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-20 18:27:08 -05:00
87293028e6 podmanv2 container exists|wait
enable container exists and wait for podmanv2

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-20 12:54:45 -05:00
d927b43350 Merge pull request #5525 from baude/apiv2bindinglogs
apiv2 add bindings for logs|events
2020-03-19 23:49:44 +01:00
093d9ef673 Merge pull request #5546 from jwhonce/wip/entities
V2 podman command
2020-03-19 18:19:43 +01:00
b43e249b1d Merge pull request #5554 from baude/compatfix
fix reported compat issues
2020-03-19 17:34:39 +01:00
d375424854 fix reported compat issues
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>
2020-03-19 10:05:10 -05:00
1be6178915 Merge pull request #5445 from sujil02/podFilter-new
Filter pods through pod list api
2020-03-19 15:50:50 +01:00
d1c26af144 apiv2 add bindings for logs|events
add go-bindings for logs and events. tests were also added.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-19 09:38:00 -05:00
fbe743501e V2 podman command
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-03-18 16:41:12 -07:00
464a1cd485 Merge pull request #5540 from jwhonce/issues/5531
Reduce CPU usage when --timeout=0
2020-03-18 21:55:09 +01:00
d66d542820 Merge pull request #5544 from baude/apiv2serveswagger
serve swagger when present
2020-03-18 21:26:52 +01:00
52c8350530 serve swagger when present
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>
2020-03-18 14:34:14 -05:00
f557cf91d2 swagger: more consistency fixes
Some new 'manifests' entries have the wrong {name} parameter

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-18 13:33:07 -06:00
651ddd3560 Reduce CPU usage when --timeout=0
* 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>
2020-03-18 10:27:25 -07:00
15326f051d Filter pods through pod list api
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>
2020-03-17 17:46:20 -04:00
9ef5d28759 Merge pull request #5449 from baude/manifests
apiv2 addition of manifests
2020-03-17 16:00:05 +01:00
abbbeacd68 apiv2 addition of manifests
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>
2020-03-16 10:03:55 -05:00
2099643aa2 add apiv2 healthcheck code
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>
2020-03-13 07:43:12 -05:00
78e090092b Merge pull request #5458 from baude/apiv2eventslibpod
[CI:DOCS]Add libpod event endpoint
2020-03-11 16:34:03 -04:00
216a6091d0 [CI:DOCS]Add libpod event endpoint
add an endpoint for events on the libpod side of the house.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-11 09:25:57 -05:00
846ed00684 Update start stop api to use pod status function.
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>
2020-03-10 14:37:47 -04:00
a83a94b095 Merge pull request #5448 from vrothberg/update-systemd
update systemd & dbus dependencies
2020-03-10 19:31:14 +01:00
450361fc64 update systemd & dbus dependencies
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>
2020-03-10 18:34:55 +01:00
31112e4b08 Refactor handler packages
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>
2020-03-10 08:03:41 -07:00
ac354ac94a Fix spelling mistakes in code found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-07 10:30:44 -05:00
c8de26fb08 Merge pull request #5374 from baude/create
add default network for apiv2 create
2020-03-07 14:16:43 +01:00
8b5e2a6297 add default network for apiv2 create
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>
2020-03-06 14:31:45 -06:00
c3177b781b Merge pull request #5410 from st1971/api-fixes
APIv2: compatible api fixes
2020-03-06 21:19:55 +01:00
06f5664e9d Removed extraneous comments and defaults plus amended variable declaration
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-06 13:19:21 +00:00
920d09c174 Removed the unnecessary code
removed defaulting of  query.Size
amended types.LibpodToContainer, removed hard coded true from inspect call

Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-06 13:17:56 +00:00
83e52cf787 Implemented size parameter on GetContainer
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-05 23:02:45 +00:00
da15f2f881 Implement size parameter on ListContainers
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-05 22:53:50 +00:00
1ef96364fe Map configured status to created to match docker API states
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-05 22:47:11 +00:00
9088a8a387 Fix to remove null entry from end of images json
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-05 22:37:31 +00:00
89b083f8b4 Register handlers without version to align with docker API
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-05 22:28:22 +00:00
593eb7625a golangci: enable goimports
Enable the goimports linter and fix reports.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-03-05 20:03:44 +01:00
1641ee6180 Merge pull request #5371 from edsantiago/apiv2_fixes
more swagger fixes
2020-03-02 23:52:28 +01:00
c3c334a323 more swagger fixes
Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-02 12:01:56 -07:00
0904873100 rework apiv2 wait endpoint|binding
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>
2020-02-28 09:36:53 -06:00
306b44380f binding tests for volumes
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>
2020-02-27 13:11:42 -06:00
997e3c8863 Remove 1 sec delay
* 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>
2020-02-25 11:04:20 -07:00
d92b9b8859 more image binding tests
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>
2020-02-23 11:01:21 -06:00
f0df07b593 add more image tests for go bindings
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>
2020-02-21 16:11:39 -06:00
ea153c8e2e search endpoint failure correction
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>
2020-02-21 12:53:39 -06:00
a554e97adc Merge pull request #5236 from marusak/filter_by_id
apiv2: Image filtering and fixup docs
2020-02-21 12:17:38 -05:00
585649df46 Merge pull request #5178 from marusak/expose_cpu
stats: Expose CPU usage in API
2020-02-21 11:04:16 -05:00
4e35c0824f Merge pull request #5279 from edsantiago/swagger_fixes
Swagger: yet more fixes
2020-02-21 10:00:14 -05:00
aae8874204 Merge pull request #5262 from schubter/signal-decode
APIv2: Fixed syscall.Signal not convertable by decoder
2020-02-21 07:33:22 -05:00