actually fix
Some checks are pending
continuous-integration/drone/push Build is passing
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

This commit is contained in:
2024-09-26 15:17:52 +10:00
parent 3b0206b1e9
commit 44c4bb2d66

View File

@@ -196,8 +196,9 @@ func (h *Handler) processConfigChanges(configChanges string) []map[string]string
// "config.memoryHotAddEnabled: true -\u003e false; \n\nconfig.cpuHotAddEnabled: true -\u003e false; \n\n"
// "config.hardware.device(1000).device: (2000, 2001, 2002) -> (2000, 2001, 2002, 2003);"
// "config.hardware.numCPU: 2 -\u003e 1; \n\nconfig.hardware.memoryMB: 4096 -\u003e 3072;"
// "config.hardware.device(4000).deviceInfo.summary: \"nsx.LogicalSwitch: 618884fd-7e8f-4c02-9a0d-2af36b5296a1\" -> \"DVSwitch: 50 18 92 03 a1 54 8f 8c-f2 b1 87 0f 97 5b d3 17\";"
//re := regexp.MustCompile(`(?P<type>[^\s]+): [^-]+-[><] (?P<newValue>[^;]+);`)
re := regexp.MustCompile(`(?P<type>[^\s]+): .*?+-[><] (?P<newValue>[^;]+);`)
re := regexp.MustCompile(`(?P<type>[^\s]+): .*?-[><] (?P<newValue>[^;]+);`)
// Result will hold a list of changes with type and new value
var result []map[string]string