host templates

This commit is contained in:
Mikaël Cluseau
2024-04-15 15:32:43 +02:00
parent d4dbe709e0
commit 699b8e71a6
16 changed files with 315 additions and 46 deletions

View File

@ -76,6 +76,13 @@ func registerWS(rest *restful.Container) {
ws.Route(ws.GET("/clusters").To(wsListClusters).
Doc("List clusters"))
ws.Route(ws.POST("/hosts-from-template/{name}").To(wsHostsFromTemplateSet).
Reads(HostFromTemplate{}).
Doc("Create or update a host template instance"))
ws.Route(ws.DELETE("/hosts-from-template/{name}").To(wsHostsFromTemplateDelete).
Reads(HostFromTemplate{}).
Doc("Delete a host template instance"))
const (
GET = http.MethodGet
PUT = http.MethodPut