diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-02 00:13:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 00:13:21 +0200 |
commit | 79f191cb5933ac0d3f64d123d8b8e6fec8e2a9c9 (patch) | |
tree | 055e000b03084fbd41cd7f9b6cf8c3c407f397c0 /pkg/api/server | |
parent | 0f357be5aeaa5dc651659cf0945a58780641e77d (diff) | |
parent | bb39051616fbce12b4cb3135a62c7747273ab0aa (diff) | |
download | podman-79f191cb5933ac0d3f64d123d8b8e6fec8e2a9c9.tar.gz podman-79f191cb5933ac0d3f64d123d8b8e6fec8e2a9c9.tar.bz2 podman-79f191cb5933ac0d3f64d123d8b8e6fec8e2a9c9.zip |
Merge pull request #5697 from baude/v2export
podmanv2 export
Diffstat (limited to 'pkg/api/server')
-rw-r--r-- | pkg/api/server/register_containers.go | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index 08834ff01..145c054c0 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -587,6 +587,29 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { r.HandleFunc(VersionedPath("/containers/{name}/resize"), s.APIHandler(compat.ResizeContainer)).Methods(http.MethodPost) // Added non version path to URI to support docker non versioned paths r.HandleFunc("/containers/{name}/resize", s.APIHandler(compat.ResizeContainer)).Methods(http.MethodPost) + // swagger:operation GET /containers/{name}/export compat exportContainer + // --- + // tags: + // - containers (compat) + // summary: Export a container + // description: Export the contents of a container as a tarball. + // parameters: + // - in: path + // name: name + // type: string + // required: true + // description: the name or ID of the container + // produces: + // - application/json + // responses: + // 200: + // description: tarball is returned in body + // 404: + // $ref: "#/responses/NoSuchContainer" + // 500: + // $ref: "#/responses/InternalError" + r.HandleFunc(VersionedPath("/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet) + r.HandleFunc("/containers/{name}/export", s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet) /* libpod endpoints @@ -1237,5 +1260,27 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/{name}/resize"), s.APIHandler(compat.ResizeContainer)).Methods(http.MethodPost) + // swagger:operation GET /libpod/containers/{name}/export libpod libpodExportContainer + // --- + // tags: + // - containers + // summary: Export a container + // description: Export the contents of a container as a tarball. + // parameters: + // - in: path + // name: name + // type: string + // required: true + // description: the name or ID of the container + // produces: + // - application/json + // responses: + // 200: + // description: tarball is returned in body + // 404: + // $ref: "#/responses/NoSuchContainer" + // 500: + // $ref: "#/responses/InternalError" + r.HandleFunc(VersionedPath("/libpod/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet) return nil } |