diff options
author | Tom Deseyn <tom.deseyn@gmail.com> | 2021-01-27 13:48:16 +0100 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2021-04-05 13:56:51 -0700 |
commit | 1214b1a38b1877fecfdf232d8b3fc7f2a1dab9a2 (patch) | |
tree | 905979835298fb7e650fe5aa7b24993a7ff48649 /pkg/api/server/register_networks.go | |
parent | 2b13c5d92aa64165aa08b4adc96d3324dc9988ec (diff) | |
download | podman-1214b1a38b1877fecfdf232d8b3fc7f2a1dab9a2.tar.gz podman-1214b1a38b1877fecfdf232d8b3fc7f2a1dab9a2.tar.bz2 podman-1214b1a38b1877fecfdf232d8b3fc7f2a1dab9a2.zip |
swagger: add operationIds that match with docker
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
Diffstat (limited to 'pkg/api/server/register_networks.go')
-rw-r--r-- | pkg/api/server/register_networks.go | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index a07c6a55e..02729d093 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -9,11 +9,26 @@ import ( ) func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { + // swagger:operation POST /networks/prune compat compatPruneNetwork + // --- + // tags: + // - networks (compat) + // Summary: Delete unused networks + // operationId: NetworkPrune + // description: Not supported + // produces: + // - application/json + // responses: + // 404: + // $ref: "#/responses/NoSuchNetwork" + r.HandleFunc(VersionedPath("/networks/prune"), compat.UnsupportedHandler).Methods(http.MethodPost) + r.HandleFunc("/networks/prune", compat.UnsupportedHandler).Methods(http.MethodPost) // swagger:operation DELETE /networks/{name} compat compatRemoveNetwork // --- // tags: // - networks (compat) // summary: Remove a network + // operationId: NetworkDelete // description: Remove a network // parameters: // - in: path @@ -37,6 +52,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // tags: // - networks (compat) // summary: Inspect a network + // operationId: NetworkInspect // description: Display low level configuration network // parameters: // - in: path @@ -60,6 +76,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // tags: // - networks (compat) // summary: List networks + // operationId: NetworkList // description: Display summary of network configurations // parameters: // - in: query @@ -85,6 +102,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // tags: // - networks (compat) // summary: Create network + // operationId: NetworkCreate // description: Create a network configuration // produces: // - application/json @@ -108,6 +126,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // tags: // - networks (compat) // summary: Connect container to network + // operationId: NetworkConnect // description: Connect a container to a network. This endpoint is current a no-op // produces: // - application/json @@ -136,6 +155,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // tags: // - networks (compat) // summary: Disconnect container from network + // operationId: NetworkDisconnect // description: Disconnect a container from a network. This endpoint is current a no-op // produces: // - application/json @@ -219,6 +239,28 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { */ r.HandleFunc(VersionedPath("/libpod/networks/{name}"), s.APIHandler(libpod.RemoveNetwork)).Methods(http.MethodDelete) + // swagger:operation GET /libpod/networks/{name}/json libpod libpodInspectNetwork + // --- + // tags: + // - networks + // summary: Inspect a network + // description: Display low level configuration for a CNI network + // parameters: + // - in: path + // name: name + // type: string + // required: true + // description: the name of the network + // produces: + // - application/json + // responses: + // 200: + // $ref: "#/responses/NetworkInspectReport" + // 404: + // $ref: "#/responses/NoSuchNetwork" + // 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: |