mirror of
https://github.com/containers/podman.git
synced 2026-01-24 05:52:06 -05:00
Add Compat API for Update
The Docker endpoint here is kind of a nightmare - accepts a full Resources block, including a large number of scary things like devices. But it only documents (and seems to use) a small subset of those. This implements support for that subset. We can always extend things to implement more later if we have a need. Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
@@ -675,6 +675,34 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
|
||||
// $ref: "#/responses/internalError"
|
||||
r.HandleFunc(VersionedPath("/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
|
||||
r.HandleFunc("/containers/{name}/rename", s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
|
||||
// swagger:operation POST /containers/{name}/update compat ContainerUpdate
|
||||
// ---
|
||||
// tags:
|
||||
// - containers (compat)
|
||||
// summary: Update configuration of an existing container
|
||||
// description: Change configuration settings for an existing container without requiring recreation.
|
||||
// parameters:
|
||||
// - in: path
|
||||
// name: name
|
||||
// type: string
|
||||
// required: true
|
||||
// description: Full or partial ID or full name of the container to rename
|
||||
// - in: body
|
||||
// name: resources
|
||||
// description: attributes for updating the container
|
||||
// schema:
|
||||
// $ref: "#/definitions/UpdateConfig"
|
||||
// produces:
|
||||
// - application/json
|
||||
// responses:
|
||||
// 200:
|
||||
// description: no error
|
||||
// 404:
|
||||
// $ref: "#/responses/containerNotFound"
|
||||
// 500:
|
||||
// $ref: "#/responses/internalError"
|
||||
r.HandleFunc(VersionedPath("/containers/{name}/update"), s.APIHandler(compat.UpdateContainer)).Methods(http.MethodPost)
|
||||
r.HandleFunc("/containers/{name}/update", s.APIHandler(compat.UpdateContainer)).Methods(http.MethodPost)
|
||||
|
||||
/*
|
||||
libpod endpoints
|
||||
|
||||
Reference in New Issue
Block a user