Deprecate legacy VM inventory endpoints and add gating logic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user