1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(edge/update): select endpoints to update [EE-4043] (#7602)

This commit is contained in:
Chaim Lev-Ari 2022-09-18 14:42:18 +03:00 committed by GitHub
parent 36e7981ab7
commit 4d123895ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 1192 additions and 130 deletions

View file

@ -0,0 +1,32 @@
package edgeupdateschedules
import (
"net/http"
httperror "github.com/portainer/libhttp/error"
"github.com/portainer/libhttp/response"
)
// @id AgentVersions
// @summary Fetches the supported versions of the agent to update/rollback
// @description
// @description **Access policy**: authenticated
// @tags edge_update_schedules
// @security ApiKeyAuth
// @security jwt
// @produce json
// @success 200 {array} string
// @failure 400 "Invalid request"
// @failure 500 "Server error"
// @router /edge_update_schedules/agent_versions [get]
func (h *Handler) agentVersions(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
return response.JSON(w, []string{
"2.13.0",
"2.13.1",
"2.14.0",
"2.14.1",
"2.14.2",
"2.15", // for develop only
"develop", // for develop only
})
}