add rpm generation code
Some checks failed
continuous-integration/drone/push Build was killed

This commit is contained in:
2026-01-13 20:09:19 +11:00
parent a81613a8c2
commit 3ceba1a117
22 changed files with 388 additions and 290 deletions

View File

@@ -97,5 +97,4 @@ func (h *Handler) VmImport(w http.ResponseWriter, r *http.Request) {
"status": "OK",
"message": fmt.Sprintf("Successfully processed import request for VM '%s'", inData.Name),
})
return
}

View File

@@ -73,7 +73,7 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusAccepted)
json.NewEncoder(w).Encode(map[string]string{
"status": "OK",
"message": fmt.Sprintf("Received update event successfully but no config changes were found"),
"message": "Received update event successfully but no config changes were found",
})
return
} else {
@@ -178,7 +178,7 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
} else {
h.Logger.Debug("Matched regex", "disk_owner", matches[1])
if strings.ToLower(matches[1]) == strings.ToLower(event.CloudEvent.Data.VM.Name) {
if strings.EqualFold(matches[1], event.CloudEvent.Data.VM.Name) {
h.Logger.Debug("This disk belongs to this VM")
changeFound = true
diskChangeFound = true
@@ -278,7 +278,7 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(map[string]string{
"status": "OK",
"message": fmt.Sprintf("Successfully processed vm modify event"),
"message": "Successfully processed vm modify event",
})
return
}
@@ -304,7 +304,7 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(map[string]string{
"status": "OK",
"message": fmt.Sprintf("Successfully processed vm modify event"),
"message": "Successfully processed vm modify event",
})
return
}

View File

@@ -65,7 +65,7 @@ func (h *Handler) VmMoveEvent(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusBadRequest)
json.NewEncoder(w).Encode(map[string]string{
"status": "ERROR",
"message": fmt.Sprintf("CloudEvent missing resource pool data"),
"message": "CloudEvent missing resource pool data",
})
return
}
@@ -151,7 +151,7 @@ func (h *Handler) VmMoveEvent(w http.ResponseWriter, r *http.Request) {
//fmt.Fprintf(w, "Processed update event: %v\n", result)
json.NewEncoder(w).Encode(map[string]string{
"status": "OK",
"message": fmt.Sprintf("Successfully processed move event"),
"message": "Successfully processed move event",
})
return
}