aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-12 12:14:27 -0500
committerGitHub <noreply@github.com>2021-03-12 12:14:27 -0500
commit605df430d90029b9b7b430c78691425410544509 (patch)
treea5bf53f8f777cd1de97d17eefb7a20a305e333e4 /pkg/api/server
parent0d6673e16c4094880042d5e3e8f19aff51203307 (diff)
parent3803d0a4a910e8c6f3799814fcf0ff7499302aa2 (diff)
downloadpodman-605df430d90029b9b7b430c78691425410544509.tar.gz
podman-605df430d90029b9b7b430c78691425410544509.tar.bz2
podman-605df430d90029b9b7b430c78691425410544509.zip
Merge pull request #9703 from jmguzik/endpoint-networks
[NO TESTS NEEDED] create endpoint for querying libpod networks
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_networks.go45
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: