aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-15 11:53:59 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-06 12:45:42 -0500
commite20ecc733c878f0c4b67a21204f0d5ae11929bf0 (patch)
tree8686fd9c9f123cbed11f0589655caaa128b12061 /pkg/api/server
parente318b09b6800ddb013ddf3b9a2fb99ebc55bd920 (diff)
downloadpodman-e20ecc733c878f0c4b67a21204f0d5ae11929bf0.tar.gz
podman-e20ecc733c878f0c4b67a21204f0d5ae11929bf0.tar.bz2
podman-e20ecc733c878f0c4b67a21204f0d5ae11929bf0.zip
refactor info
the current implementation of info, while typed, is very loosely done so. we need stronger types for our apiv2 implmentation and bindings. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_info.go19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go
index b4ab8871c..75aaa957b 100644
--- a/pkg/api/server/register_info.go
+++ b/pkg/api/server/register_info.go
@@ -4,14 +4,15 @@ import (
"net/http"
"github.com/containers/libpod/pkg/api/handlers/compat"
+ "github.com/containers/libpod/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
- // swagger:operation GET /info libpod libpodGetInfo
+ // swagger:operation GET /info compat getInfo
// ---
// tags:
- // - system
+ // - system (compat)
// summary: Get info
// description: Returns information on the system and libpod configuration
// produces:
@@ -24,5 +25,19 @@ func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/info"), s.APIHandler(compat.GetInfo)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/info", s.APIHandler(compat.GetInfo)).Methods(http.MethodGet)
+ // swagger:operation GET /libpod/info libpod libpodGetInfo
+ // ---
+ // tags:
+ // - system
+ // summary: Get info
+ // description: Returns information on the system and libpod configuration
+ // produces:
+ // - application/json
+ // responses:
+ // 200:
+ // $ref: "#/responses/InfoResponse"
+ // 500:
+ // $ref: "#/responses/InternalError"
+ r.Handle(VersionedPath("/libpod/info"), s.APIHandler(libpod.GetInfo)).Methods(http.MethodGet)
return nil
}