diff options
author | Jakub Guzik <jakubmguzik@gmail.com> | 2021-03-12 13:06:08 +0100 |
---|---|---|
committer | Jakub Guzik <jakubmguzik@gmail.com> | 2021-03-12 13:06:08 +0100 |
commit | 3803d0a4a910e8c6f3799814fcf0ff7499302aa2 (patch) | |
tree | ac3f44fd1b6a1c35ef7b8b6b728391ec8482b9f4 /pkg/api/server/register_networks.go | |
parent | e2d35e55d0ad77fcaca5bbe90276e9c47d514131 (diff) | |
download | podman-3803d0a4a910e8c6f3799814fcf0ff7499302aa2.tar.gz podman-3803d0a4a910e8c6f3799814fcf0ff7499302aa2.tar.bz2 podman-3803d0a4a910e8c6f3799814fcf0ff7499302aa2.zip |
create endpoint for querying libpod networks
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/api/server/register_networks.go')
-rw-r--r-- | pkg/api/server/register_networks.go | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 68a8d4ae4..c54de952f 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -220,28 +220,6 @@ 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: @@ -289,6 +267,29 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/networks/json"), s.APIHandler(libpod.ListNetworks)).Methods(http.MethodGet) + // 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) + r.HandleFunc(VersionedPath("/libpod/networks/{name}"), s.APIHandler(libpod.InspectNetwork)).Methods(http.MethodGet) // swagger:operation POST /libpod/networks/create libpod libpodCreateNetwork // --- // tags: |