Deprecate legacy VM inventory endpoints and add gating logic
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-13 14:59:19 +11:00
parent 18be1fbe06
commit 1f39b46613
5 changed files with 68 additions and 7 deletions

View File

@@ -9,14 +9,19 @@ import (
)
// VmUpdateDetails refreshes inventory metadata from vCenter.
// @Summary Refresh VM details
// @Description Queries vCenter and updates inventory records with missing details.
// @Summary Refresh VM details (deprecated)
// @Description Deprecated: Queries vCenter and updates inventory records with missing details.
// @Tags inventory
// @Deprecated
// @Produce json
// @Success 200 {object} models.StatusMessageResponse "Update completed"
// @Failure 500 {object} models.ErrorResponse "Server error"
// @Router /api/inventory/vm/update [post]
func (h *Handler) VmUpdateDetails(w http.ResponseWriter, r *http.Request) {
if h.denyLegacyAPI(w, "/api/inventory/vm/update") {
return
}
var matchFound bool
var inventoryId int64
var srmPlaceholder string