From 9d31fed5f75186f618e95ab7492ef6bc2b511d5f Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 19 Jan 2021 23:03:51 +0100 Subject: podman volume exists Add podman volume exists command with remote support. Signed-off-by: Paul Holzinger --- docs/source/markdown/podman-network-exists.1.md | 4 +-- docs/source/markdown/podman-volume-exists.1.md | 43 +++++++++++++++++++++++++ docs/source/markdown/podman-volume.1.md | 1 + docs/source/volume.rst | 2 ++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 docs/source/markdown/podman-volume-exists.1.md (limited to 'docs') diff --git a/docs/source/markdown/podman-network-exists.1.md b/docs/source/markdown/podman-network-exists.1.md index c7edc2ac7..3ad3ccedb 100644 --- a/docs/source/markdown/podman-network-exists.1.md +++ b/docs/source/markdown/podman-network-exists.1.md @@ -10,7 +10,7 @@ podman\-network\-exists - Check if the given network exists **podman network exists** checks if a network exists. The **Name** or **ID** of the network may be used as input. Podman will return an exit code of `0` when the network is found. A `1` will be returned otherwise. An exit code of -`125` indicates there was an other issue. +`125` indicates there was another issue. ## OPTIONS @@ -41,4 +41,4 @@ $ podman(1), podman-network-create(1), podman-network-rm(1) ## HISTORY -January 2021, Originally compiled by Paul Holzinger +January 2021, Originally compiled by Paul Holzinger `` diff --git a/docs/source/markdown/podman-volume-exists.1.md b/docs/source/markdown/podman-volume-exists.1.md new file mode 100644 index 000000000..ead806bd9 --- /dev/null +++ b/docs/source/markdown/podman-volume-exists.1.md @@ -0,0 +1,43 @@ +% podman-volume-exists(1) + +## NAME +podman\-volume\-exists - Check if the given volume exists + +## SYNOPSIS +**podman volume exists** *volume* + +## DESCRIPTION +**podman volume exists** checks if a volume exists. Podman will return an exit code +of `0` when the volume is found. A `1` will be returned otherwise. An exit code of +`125` indicates there was another issue. + + +## OPTIONS + +#### **--help**, **-h** + +Print usage statement + +## EXAMPLE + +Check if a volume called `myvol` exists (the volume does actually exist). +``` +$ podman volume exists myvol +$ echo $? +0 +$ +``` + +Check if an volume called `mysql` exists (the volume does not actually exist). +``` +$ podman volume exists mysql +$ echo $? +1 +$ +``` + +## SEE ALSO +podman(1), podman-volume-create(1), podman-volume-rm(1) + +## HISTORY +January 2021, Originally compiled by Paul Holzinger `` diff --git a/docs/source/markdown/podman-volume.1.md b/docs/source/markdown/podman-volume.1.md index 288e57b82..5af5eb50e 100644 --- a/docs/source/markdown/podman-volume.1.md +++ b/docs/source/markdown/podman-volume.1.md @@ -14,6 +14,7 @@ podman volume is a set of subcommands that manage volumes. | Command | Man Page | Description | | ------- | ------------------------------------------------------ | ------------------------------------------------------------------------------ | | create | [podman-volume-create(1)](podman-volume-create.1.md) | Create a new volume. | +| exists | [podman-volume-exists(1)](podman-volume-exists.1.md) | Check if the given volume exists. | | inspect | [podman-volume-inspect(1)](podman-volume-inspect.1.md) | Get detailed information on one or more volumes. | | ls | [podman-volume-ls(1)](podman-volume-ls.1.md) | List all the available volumes. | | prune | [podman-volume-prune(1)](podman-volume-prune.1.md) | Remove all unused volumes. | diff --git a/docs/source/volume.rst b/docs/source/volume.rst index a966feafd..ce9ea2cbd 100644 --- a/docs/source/volume.rst +++ b/docs/source/volume.rst @@ -2,6 +2,8 @@ Volume ====== :doc:`create ` Create a new volume +:doc:`exists ` Check if the given volume exists + :doc:`inspect ` Display detailed information on one or more volumes :doc:`ls ` List volumes -- cgit v1.2.3-54-g00ecf