summaryrefslogtreecommitdiff
path: root/pkg/bindings
Commit message (Collapse)AuthorAge
* 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 ssh-agent supportJhon Honce2020-06-23
| | | | | | | * An identity of "" implies ssh-agent and user/password to be used * Fixed example Signed-off-by: Jhon Honce <jhonce@redhat.com>
* V2 podman system connectionJhon Honce2020-06-23
| | | | | | | | | * Implement command * Refactor podman-remote to pull from containers.conf by default * podman-remote defaults to --remote being true * Write podman-system-connection.1.md Signed-off-by: Jhon Honce <jhonce@redhat.com>
* libpod/containers/json: alias last -> limitValentin Rothberg2020-06-22
| | | | | | | | | | | Support both `last` and `limit` for in the containers listing endpoint. We intended to use `limit` which is also mentioned in the docs, but the implementation ended up using `last` as the http parameter; likely being caused by the CLI using `--last`. To avoid any regression, we decided for supporting both and aliasing `last`. Fixes: #6413 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Correct logic for demux'ing channelsJhon Honce2020-06-19
| | | | | | * Move check for requesting output into case statement Signed-off-by: Jhon Honce <jhonce@redhat.com>
* fix misc remote build issuesBrent Baude2020-06-17
| | | | | | | | | address problem when multiple -t were sent. and rework remote build's tarball if a context dir is given other than ".". Fixes: #6578 Fixes: #6577 Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #6603 from sujil02/python-testOpenShift Merge Robot2020-06-15
|\ | | | | Adds more docker py test
| * Adds more docker py testSujil022020-06-15
| | | | | | | | | | | | | | | | Addes more docker py test Optimize test to import images from cache Rename test class and dir for python unittest framework Signed-off-by: Sujil02 <sushah@redhat.com>
* | Merge pull request #6599 from afbjorklund/server-builtOpenShift Merge Robot2020-06-15
|\ \ | | | | | | The string field of Built was missing from server
| * | The string field of Built was missing from serverAnders F Björklund2020-06-13
| |/ | | | | | | | | | | It should match the client version, but was empty Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* / Turn on More lintersDaniel J Walsh2020-06-15
|/ | | | | | | | | - misspell - prealloc - unparam - nakedret Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fix Id->ID where possible for lintDaniel J Walsh2020-06-10
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fixup issues found by golintDaniel J Walsh2020-06-10
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* V2 Add support for ssh authentication methodsJhon Honce2020-06-03
| | | | | | | | | | | | | | | | | * podman --remote ssh://<user>:<password>@<host>:<port><path> * podman --remote ssh://<user>:<password>@<host>:<port><path> \ --identity <path> --passphrase <phrase> * ssh-add <key> podman --remote ssh://<user>@<host><path> * Fix `podman help` to run even if podman missing components * Prompt for passphrase on stdin IFF key is protected and passphrase not given via any other configuration * cobra flags do not support optional value flags therefore refactored --remote to be a boolean and --url will now contain the URI to Podman service Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Enable detached exec for remoteMatthew Heon2020-06-02
| | | | | | | | | | | | | | | | | | | | | | | The biggest obstacle here was cleanup - we needed a way to remove detached exec sessions after they exited, but there's no way to tell if an exec session will be attached or detached when it's created, and that's when we must add the exit command that would do the removal. The solution was adding a delay to the exit command (5 minutes), which gives sufficient time for attached exec sessions to retrieve the exit code of the session after it exits, but still guarantees that they will be removed, even for detached sessions. This requires Conmon 2.0.17, which has the new `--exit-delay` flag. As part of the exit command rework, we can drop the hack we were using to clean up exec sessions (remove them as part of inspect). This is a lot cleaner, and I'm a lot happier about it. Otherwise, this is just plumbing - we need a bindings call for detached exec, and that needed to be added to the tunnel mode backend for entities. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Add bindings for exec and enable attached remoteMatthew Heon2020-06-01
| | | | | | | | | | | This adds bindings for starting exec sessions, and then uses them to wire up detached exec. Code is heavily based on Attach code for containers, slightly modified to handle exec sessions. Bindings are presently attached-only, detached is pending on a Conmon update landing in CI. I'll probably get to that next. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* compat handlers: add X-Registry-Auth header supportValentin Rothberg2020-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support the `X-Registry-Auth` http-request header. * The content of the header is a base64 encoded JSON payload which can either be a single auth config or a map of auth configs (user+pw or token) with the corresponding registries being the keys. Vanilla Docker, projectatomic Docker and the bindings are transparantly supported. * Add a hidden `--registries-conf` flag. Buildah exposes the same flag, mostly for testing purposes. * Do all credential parsing in the client (i.e., `cmd/podman`) pass the username and password in the backend instead of unparsed credentials. * Add a `pkg/auth` which handles most of the heavy lifting. * Go through the authentication-handling code of most commands, bindings and endpoints. Migrate them to the new code and fix issues as seen. A final evaluation and more tests is still required *after* this change. * The manifest-push endpoint is missing certain parameters and should use the ABI function instead. Adding auth-support isn't really possible without these parts working. * The container commands and endpoints (i.e., create and run) have not been changed yet. The APIs don't yet account for the authfile. * Add authentication tests to `pkg/bindings`. Fixes: #6384 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add streaming ability to endpointBrent Baude2020-05-27
| | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* V2 Fix interface nil checksJhon Honce2020-05-26
| | | | Signed-off-by: Jhon Honce <jhonce@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>
* Merge pull request #6345 from QiWang19/mani-push-testOpenShift Merge Robot2020-05-22
|\ | | | | remote manifest test
| * remote manifest testQi Wang2020-05-21
| | | | | | | | | | | | Enable remove manifest tests. Skip --purge test because remote does not support it. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Removes remote system reset functionality. skip e2e test for remote.Sujil022020-05-22
| | | | | | | | | | | | | | As system reset too dangerous for remote use, deleting the functionality and the test case. Signed-off-by: Sujil02 <sushah@redhat.com>
* | Merge pull request #6327 from baude/v2buildOpenShift Merge Robot2020-05-22
|\ \ | | | | | | v2 podman-remote build
| * | v2 podman-remote buildBrent Baude2020-05-21
| |/ | | | | | | | | | | this is a very basic implementation of build. some of the more advanced options need to be included still as well. i think the endpoints for compat and libpod will have to split given buildahs more advanced set of options. that should probably be done by someone more experienced with build internals. Signed-off-by: Brent Baude <bbaude@redhat.com>
* / podman version --format ... was not workingDaniel J Walsh2020-05-21
|/ | | | | | This patch fixes the podman --version --format command. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Start testing with cross compilationDaniel J Walsh2020-05-21
| | | | | | | Add missing man page links for podman-image-search and podman-image-diff Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #6284 from baude/v2remotetestfixesOpenShift Merge Robot2020-05-21
|\ | | | | Test fixes for remote integration
| * Test fixes for remote integrationBrent Baude2020-05-20
| | | | | | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #6300 from baude/v2governattachOpenShift Merge Robot2020-05-20
|\ \ | | | | | | govern remote attach and start
| * | govern remote attach and startBrent Baude2020-05-20
| |/ | | | | | | | | | | fixes a race where container would start before attach could occur resulting in an error. Signed-off-by: Brent Baude <bbaude@redhat.com>
* / V2 API Version SupportJhon Honce2020-05-20
|/ | | | | | | | | | | | | | | | | * Update blang/semver to allow ParseTolerant() support * Provide helper functions for API handlers to obtain client's 'version' path variable focused on API endpoint tree: libpod vs. compat * Introduce new errors: * version not given in path, endpoints may determine if this is a hard error (ErrVersionNotGiven) * given version not supported (ErrVersionNotSupported), only a soft error if the handler is going to hijack the connection * Added unit tests for version parsing * bindings check version on connect: * client <= Server API version connection is continued * client >= Server API version connection fails Signed-off-by: Jhon Honce <jhonce@redhat.com>
* V2 Implement terminal handling in bindings attachJhon Honce2020-05-18
| | | | | | | | | * Add support for /exec/{id}/resize * Add support for ErrSessionNotFound * Resize container TTY as stdin changes size * Refactor all resize functions into one handler Signed-off-by: Jhon Honce <jhonce@redhat.com>
* v2endpoint remove image path correctionBrent Baude2020-05-18
| | | | | | | | | | | | the endpoint for single image removal (on the libpod side) should be as follows: versionedPath/libpod/images/IMAGENAME The DELETE method then signifies the removal of the image. Fixes: #6261 Signed-off-by: Brent Baude <bbaude@redhat.com>
* Make convenience boxed true/false easier to useJhon Honce2020-05-14
| | | | | | | * changed PFalse to &false * changed PTrue to &true Signed-off-by: Jhon Honce <jhonce@redhat.com>
* V2 Update attach bindings to use Readers/Writers vs chanJhon Honce2020-05-14
| | | | | | | | * Change function call to use readers/writers in place channels * Support stdin for pushing data from client to container * Add bindings test Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #6211 from baude/v2remoteimagetreeOpenShift Merge Robot2020-05-13
|\ | | | | enable remote image tree
| * enable remote image treeBrent Baude2020-05-13
| | | | | | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #6203 from jwhonce/wip/attachOpenShift Merge Robot2020-05-13
|\ \ | | | | | | V2 attach bindings and test
| * | WIP V2 attach bindings and testJhon Honce2020-05-13
| |/ | | | | | | | | | | | | | | * Add ErrLostSync to report lost of sync when de-mux'ing stream * Add logus.SetLevel(logrus.DebugLevel) when `go test -v` given * Add context to debugging messages Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / enable podman v2 networking for remote clientBrent Baude2020-05-12
|/ | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* add podman remote system dfBrent Baude2020-05-12
| | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #6101 from sujil02/systemreset-v2OpenShift Merge Robot2020-05-12
|\ | | | | Adds tunnel routes for system reset.
| * Adds tunnel routes for system reset.Sujil022020-05-11
| | | | | | | | | | | | | | | | Adds tunnel routes for system reset. Makes forces flag local as options are not propogated down the stack. Adds relevant test cases and swagger docs. Signed-off-by: Sujil02 <sushah@redhat.com>
* | Merge pull request #6151 from lsm5/tests-apiv2-inspect-removeOpenShift Merge Robot2020-05-10
|\ \ | |/ |/| bindings tests for container remove and inspect
| * bindings tests for container remove and inspectLokesh Mandvekar2020-05-08
| | | | | | | | Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
* | V2 Impliment tunnelled podman versionJhon Honce2020-05-08
|/ | | | Signed-off-by: Jhon Honce <jhonce@redhat.com>
* set binding tests to requiredBrent Baude2020-05-08
| | | | | | | | | | | | | | | | | some small fix ups for binding tests and then make them required. update containers-common V2 bindings tests were failing because of changes introduced in commit a2ad5bb. Fix some typos. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org> in the case where the specgen attribute for Env and Labels are nil, we should should then make the map IF we have labels and envs that need to be added. Signed-off-by: Brent Baude <bbaude@redhat.com>
* add {generate,play} kubeValentin Rothberg2020-05-06
| | | | | | | | | | | | | | | | | | | Add the `podman generate kube` and `podman play kube` command. The code has largely been copied from Podman v1 but restructured to not leak the K8s core API into the (remote) client. Both commands are added in the same commit to allow for enabling the tests at the same time. Move some exports from `cmd/podman/common` to the appropriate places in the backend to avoid circular dependencies. Move definitions of label annotations to `libpod/define` and set the security-opt labels in the frontend to make kube tests pass. Implement rest endpoints, bindings and the tunnel interface. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* manifest annotateQi Wang2020-05-05
| | | | Signed-off-by: Qi Wang <qiwan@redhat.com>