| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
|
|
|
| |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
|\
| |
| | |
API v2: pods: fix two incorrect return codes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
|/| |
v2 api: /libpod/images/{import,load,pull}
|
| |
| |
| |
| | |
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement the /libpod/images/import endpoint
Tested manually with curl:
curl -X POST --data-binary "@image.tar" --header "Content-Type: application/x-tar"
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement the /libpod/images/load endpoint.
Tested manually with curl:
curl -X POST --data-binary "@image.tar" --header "Content-Type: application/x-tar"
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement the /libpod/images/pull endpoint and correct the swagger docs.
The reference parameter is mandatory and must either be a
c/image/docker/reference or a reference to the "docker://" transport as
the pull endpoint is meant to only support pulling images from a
registry.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
|/
|
|
|
|
|
|
|
|
| |
consumers of the api remarked how they would prefer a more strongly typed data structure from list containers oon the libpod side of things. for example, events should be consumable and consistent timestamps. also, for the sake of compatibility, it is helpful to have the json named atttributes for Id to not be ID.
listcontainers on the libpod side no longer strongly uses the the ps cli to obtain information but we do benefit from turning on the ability to list the last X containers, something CLI does not have yet. we also flipped the bit on defaulting to truncated output in the return.
thanks to the efforts of the cockpit team to help us here.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|
|
|
| |
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: this commit is merely adding swagger documentation and the golang
stubs and types for the proposed endpoints. The implementation will
follow in separate individual changes in the future.
The ultimate goal is to prevent the libpod API from exposing the rather
complex /images/create endpoint from Docker and split it into easier to
implement, use and comprehend endpoints with a more narrow focus.
# Import
Add the v2 swagger documentation for the libpod/images/import endpoint.
Note that we have intend to have separate backend and not mix it up with
load since import allows for specifying a URL instead of a local
tarball.
# Load
Complete the v2 swagger documentation for the libpod/images/load
endpoint. Note that we are accounting for future plans to be able to
load multiple images from one oci/docker archive by returning an array
of image-load responses.
Also move the (incomplete) implementation of the generic endpoint to the
corresponding package and create a stub for the libpod handler, which
will be implemented once there's an agreement on the proposed API.
# Pull
Add the v2 swagger documentation for the libpod/images/pull endpoint.
Similar to the load endpoint, we return an array since more than one
image can be pulled when the `all-tags` parameter is set.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
|\
| |
| | |
[CI:DOCS]add apiv2 endpoints for exec
|
| |
| |
| |
| |
| |
| |
| |
| | |
add the openapi/swagger documentation for exec. The subcommands added are create, inspect, resize, and start.
at the time of this writing, no structure is declared for the inspect response. once the libpod work for this is complete, we can inherit and swaggerize it.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add swagger support and documentation
* Promote handler as there can only ever be one
* Update swagger tags
Between verbs and paths there are four endpoints for /_ping. I've
attempted to document them well without four copies of the details.
Time will tell.
Clients will use the headers `Libpod-API-Version` and
`Libpod-Buildha-Version` to determine if they are connecting to a Podman
service or some other compatible engine.
Client calls GET(/_ping):
* VARLINK engines will fail with error message
* Compatible engines will return 200 without Libpod headers
* Podman engines will return 200 and Libpod headers
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
|
|
|
|
|
| |
the api needs to account for image input where the image is encoded as a fqd image name.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|\
| |
| | |
Assure validate includes lint
|
| |
| |
| |
| |
| |
| | |
Fixed issue where lint was not run on CI, so we missed to prevent regressions.
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
|
|/
|
|
|
|
| |
when using the apiv2, containers names are preceeded with a /. fixing this for inspect and listcontainers.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Add binding for networks and begin documentation for binding methods for godoc. Also, add major functions to their own subpackages so reduce the amount of of method confusion. So instead of: bindings.ListImages(), we now do a [bindings].images.List().
Also, the connection is passed to each binding method via a context to allow for future growth.
Lastly, add first set of tests. There are a couple of things to work out for rootless tests yet.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|\
| |
| | |
APIv2 review corrections #3
|
| |
| |
| |
| |
| |
| | |
The third pass of corrections for the APIv2.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|/
|
|
|
|
| |
* Added helper function to allow parsing from filters
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
|\
| |
| | |
[CI:DOCS] Add query parameter converters for complex types
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add converter for URL query parameters of type map[string][]string
* Add converter for URL query parameters of type time.Time
* Added function to allocate and configure schema.Decoder for API use
* Updated API handlers to leverage new converters, and correct handler
code for filter type
An encoding example for a client using filters:
v := map[string][]string{
"dangling": {"true"},
}
payload, err := jsoniter.MarshalToString(v)
if err != nil {
panic(err)
}
payload = "?filters=" + url.QueryEscape(payload)
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
|/
|
|
|
|
| |
Add API review comments to correct documentation and endpoints. Also, add a libpode prune method to reduce code duplication. Only used right now for the API but when the remote client is wired, we will switch over there too.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|
|
|
|
|
|
|
|
| |
* Update swagger:operation's to pass validation
* 'name' path parameter now used throughout API
* Added #/response/ok for 200 returns, TBD values have been replaced
with legal values.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
|\
| |
| | |
[CI:DOCS] Update build images
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add swagger annotations for all the query and response parameters
for buildimages
* Improve populating the BuildOptions struct
* Improve swagger.json generation, removing tags.xml and move tag
definiation into the swagger:meta block
* Update Makefile to be more robust, added target for validation
* TODO once validation passes add that step to the generation step
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
add service endpoint for the new API. Also supports the varlink
implementation.
Signed-off-by: baude <bbaude@redhat.com>
Refactor to allow developer more control of API server
* Add api.NewServerWithSettings() to create an API server with custom
settings
* Add api.ListenUnix() to create a UDS net.Listener and setup UDS
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: baude <bbaude@redhat.com>
More service completion
Add podman service command that allows users to run either a RESTful or
varlink protocol API service.
Addition of docs and RESTful listening.
Signed-off-by: baude <bbaude@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|/
|
|
|
|
|
| |
Tackling the first comments in the review pass. More to come.
Signed-off-by: baude <bbaude@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|
|
|
|
|
| |
Add statement to the info section stating this is experimental only for now. Also add the podman logo to the right-hand navigation.
Signed-off-by: Brent Baude <bbaude@redhat.com>
|
|
|
|
|
| |
Signed-off-by: baude <bbaude@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new APIv2 branch provides an HTTP-based remote API to Podman.
The requirements of this are, unfortunately, incompatible with
the existing Attach API. For non-terminal attach, we need append
a header to what was copied from the container, to multiplex
STDOUT and STDERR; to do this with the old API, we'd need to copy
into an intermediate buffer first, to handle the headers.
To avoid this, provide a new API to handle all aspects of
terminal and non-terminal attach, including closing the hijacked
HTTP connection. This might be a bit too specific, but for now,
it seems to be the simplest approach.
At the same time, add a Resize endpoint. This needs to be a
separate endpoint, so our existing channel approach does not work
here.
I wanted to rework the rest of attach at the same time (some
parts of it, particularly how we start the Attach session and how
we do resizing, are (in my opinion) handled much better here.
That may still be on the table, but I wanted to avoid breaking
existing APIs in this already massive change.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
|
|
|
|
|
|
|
| |
Include the service into make binaries such that we're it's being build
in the CI.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
|
|
|
| |
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
|\
| |
| | |
v2 api: top improvements
|
| |
| |
| |
| | |
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a hanlder to figure out if the specified http request came through
a libpod endpoint. A first user is the top endpoint which has a
different default value for `ps_args` depending if the request came
through the docker or libpod endpoint.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move the top logic from pkg/adapter into the (*libpod.Container).Top().
This way, we drop the dependency from pkg/api on pkg/adapters and have
a clearer separation of concerns.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Use `pkg/adapter` to increase code reuse and reduce code redundancy.
* Extend swagger docs to mention AIX descriptors.
* Document the libpod endpoint which shares the same handler.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
add a static tags file so we can dictate the left-hand navigation. in
doing so we now override the tag in the swagger:operation. we now have
images and images (compat) as a way to differentiate.
Signed-off-by: baude <bbaude@redhat.com>
|
|\ \
| |/
|/| |
[CI:DOCS] Add APIv2 CLI example POC
|
| |
| |
| |
| |
| |
| |
| | |
* Add ReadMe, CLI and unit files to support socket activation, both for
system and rootless
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Also remove the redundant stats handler in libpod.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
The docker and libpod endpoints provide the same functionality, so
we can use the same handler.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Also expect the container to be running.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Also add some comments.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
We must check all errors and handle them properly. Otherwise, we can run
into nil dereferences ultimately killing the service.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|
|/
|
|
|
|
|
| |
`NumProcs` and `StorageStats` are windows specific and are not
popoulated on Linux. Hence, we can safely remove them.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
|