podman volume exists

Add podman volume exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
Paul Holzinger
2021-01-19 23:03:51 +01:00
parent 7d024a2fc8
commit 9d31fed5f7
14 changed files with 307 additions and 2 deletions

View File

@ -28,6 +28,28 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// '500':
// "$ref": "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/volumes/create"), s.APIHandler(libpod.CreateVolume)).Methods(http.MethodPost)
// swagger:operation GET /libpod/volumes/{name}/exists libpod libpodExistsVolume
// ---
// tags:
// - volumes
// summary: Volume exists
// description: Check if a volume exists
// parameters:
// - in: path
// name: name
// type: string
// required: true
// description: the name of the volume
// produces:
// - application/json
// responses:
// 204:
// description: volume exists
// 404:
// $ref: '#/responses/NoSuchVolume'
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/volumes/{name}/exists"), s.APIHandler(libpod.ExistsVolume)).Methods(http.MethodGet)
// swagger:operation GET /libpod/volumes/json libpod libpodListVolumes
// ---
// tags: