improve disk change detection
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user