improve disk change detection
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-09-27 13:58:33 +10:00
parent a7dc838c83
commit 5a00f4a8c7
3 changed files with 4 additions and 3 deletions

View File

@@ -97,7 +97,8 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
// Check if a disk was added (or maybe removed?)
if strings.Contains(change["type"], "config.hardware.device") &&
strings.Contains(event.CloudEvent.Data.FullFormattedMessage, ".vmdk") {
(strings.Contains(event.CloudEvent.Data.FullFormattedMessage, ".vmdk") ||
strings.Contains(event.CloudEvent.Data.FullFormattedMessage, "capacityInKB")) {
// TODO - query current disk size from Inventory table and only create an update if the size is now changed
if testConfig.DeviceChange != nil {