summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-01-18 18:52:06 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-01-19 15:18:03 +0100
commita45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d (patch)
treedfda1d8d5f64baa183dc0f166e2441d8719b1cc8 /pkg/api/server
parent5b3c7a52939275784c45c9747dd5864bd0581ff5 (diff)
downloadpodman-a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d.tar.gz
podman-a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d.tar.bz2
podman-a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d.zip
podman network exists
Add podman network exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_networks.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go
index 967d7da76..3d9e7fb89 100644
--- a/pkg/api/server/register_networks.go
+++ b/pkg/api/server/register_networks.go
@@ -226,6 +226,28 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/networks/{name}/json"), s.APIHandler(libpod.InspectNetwork)).Methods(http.MethodGet)
+ // swagger:operation GET /libpod/networks/{name}/exists libpod libpodExistsNetwork
+ // ---
+ // tags:
+ // - networks
+ // summary: Network exists
+ // description: Check if network exists
+ // parameters:
+ // - in: path
+ // name: name
+ // type: string
+ // required: true
+ // description: the name or ID of the network
+ // produces:
+ // - application/json
+ // responses:
+ // 204:
+ // description: network exists
+ // 404:
+ // $ref: '#/responses/NoSuchNetwork'
+ // 500:
+ // $ref: '#/responses/InternalError'
+ r.Handle(VersionedPath("/libpod/networks/{name}/exists"), s.APIHandler(libpod.ExistsNetwork)).Methods(http.MethodGet)
// swagger:operation GET /libpod/networks/json libpod libpodListNetwork
// ---
// tags: