add network prune

add the ability to prune unused cni networks.  filters are not implemented
but included both compat and podman api endpoints.

Fixes :#8673

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2021-02-04 12:58:55 -06:00
parent c421127dd7
commit 91ea3fabd6
18 changed files with 447 additions and 22 deletions

View File

@ -0,0 +1,31 @@
% podman-network-prune(1)
## NAME
podman\-network\-prune - Remove all unused networks
## SYNOPSIS
**podman network prune** [*options*]
## DESCRIPTION
Remove all unused networks. An unused network is defined by a network which
has no containers connected or configured to connect to it. It will not remove
the so-called default network which goes by the name of *podman*.
## OPTIONS
#### **--force**, **-f**
Do not prompt for confirmation
## EXAMPLE
Prune networks
```
podman network prune
```
## SEE ALSO
podman(1), podman-network(1), podman-network-remove(1)
## HISTORY
February 2021, Originally compiled by Brent Baude <bbaude@redhat.com>

View File

@ -19,6 +19,7 @@ The network command manages CNI networks for Podman.
| exists | [podman-network-exists(1)](podman-network-exists.1.md) | Check if the given network exists |
| inspect | [podman-network-inspect(1)](podman-network-inspect.1.md) | Displays the raw CNI network configuration for one or more networks |
| ls | [podman-network-ls(1)](podman-network-ls.1.md) | Display a summary of CNI networks |
| prune | [podman-network-prune(1)](podman-network-prune.1.md) | Remove all unused networks |
| reload | [podman-network-reload(1)](podman-network-reload.1.md) | Reload network configuration for containers |
| rm | [podman-network-rm(1)](podman-network-rm.1.md) | Remove one or more CNI networks |

View File

@ -13,6 +13,8 @@ Network
:doc:`ls <markdown/podman-network-ls.1>` network list
:doc:`prune <markdown/podman-network-prune.1>` network prune
:doc:`reload <markdown/podman-network-reload.1>` network reload
:doc:`rm <markdown/podman-network-rm.1>` network rm