diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-04 09:46:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 09:46:24 -0500 |
commit | 87a78c059dc2fb72ba54805d5488f3e619ae46f1 (patch) | |
tree | a6c7ca6a504f71b1af2307fcdfbbae6787d73b6b /pkg/api/handlers/compat | |
parent | 17cacea3fa2bf0df20572720b9a0a3be35f2ef7b (diff) | |
parent | f86d64130838fbeb75ea2776a2f2b6c4a49e58b3 (diff) | |
download | podman-87a78c059dc2fb72ba54805d5488f3e619ae46f1.tar.gz podman-87a78c059dc2fb72ba54805d5488f3e619ae46f1.tar.bz2 podman-87a78c059dc2fb72ba54805d5488f3e619ae46f1.zip |
Merge pull request #9601 from jwhonce/issues/9207
Use version package to track all versions
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r-- | pkg/api/handlers/compat/version.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/api/handlers/compat/version.go b/pkg/api/handlers/compat/version.go index d90a892c1..fae147440 100644 --- a/pkg/api/handlers/compat/version.go +++ b/pkg/api/handlers/compat/version.go @@ -10,6 +10,7 @@ import ( "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/api/handlers/utils" "github.com/containers/podman/v3/pkg/domain/entities" + "github.com/containers/podman/v3/version" docker "github.com/docker/docker/api/types" "github.com/pkg/errors" ) @@ -35,20 +36,20 @@ func VersionHandler(w http.ResponseWriter, r *http.Request) { Name: "Podman Engine", Version: versionInfo.Version, Details: map[string]string{ - "APIVersion": utils.APIVersion[utils.LibpodTree][utils.CurrentAPIVersion].String(), + "APIVersion": version.APIVersion[version.Libpod][version.CurrentAPI].String(), "Arch": goRuntime.GOARCH, "BuildTime": time.Unix(versionInfo.Built, 0).Format(time.RFC3339), "Experimental": "true", "GitCommit": versionInfo.GitCommit, "GoVersion": versionInfo.GoVersion, "KernelVersion": infoData.Host.Kernel, - "MinAPIVersion": utils.APIVersion[utils.LibpodTree][utils.MinimalAPIVersion].String(), + "MinAPIVersion": version.APIVersion[version.Libpod][version.MinimalAPI].String(), "Os": goRuntime.GOOS, }, }} - apiVersion := utils.APIVersion[utils.CompatTree][utils.CurrentAPIVersion] - minVersion := utils.APIVersion[utils.CompatTree][utils.MinimalAPIVersion] + apiVersion := version.APIVersion[version.Compat][version.CurrentAPI] + minVersion := version.APIVersion[version.Compat][version.MinimalAPI] utils.WriteResponse(w, http.StatusOK, entities.ComponentVersion{ Version: docker.Version{ |