add more srm checks
Some checks are pending
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-15 12:43:47 +11:00
parent 37d921f635
commit 309db2f1a6
2 changed files with 5 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ func (h *Handler) VmDeleteEvent(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
return
} else {
h.Logger.Debug("received input data", "length", len(reqBody))
//h.Logger.Debug("received input data", "length", len(reqBody))
}
// Decode the JSON body into CloudEventReceived struct
@@ -36,7 +36,7 @@ func (h *Handler) VmDeleteEvent(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Invalid JSON body", http.StatusBadRequest)
return
} else {
h.Logger.Debug("successfully decoded JSON")
h.Logger.Debug("successfully decoded deletion type cloud event", "vm_id", event.CloudEvent.Data.VM.VM.Value)
}
// Use the event CreatedTime to update the DeletionTime column in the VM inventory table

View File

@@ -131,6 +131,9 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
if change["newValue"] == "testVm" {
h.Logger.Debug("testVm")
params.PlaceholderChange = sql.NullString{String: "testVm", Valid: true}
} else if change["newValue"] == "placeholderVm" {
h.Logger.Debug("placeholderVm")
params.PlaceholderChange = sql.NullString{String: "placeholderVm", Valid: true}
}
}