From 6a072ee0674d6c60e108a050e437849d7cca1892 Mon Sep 17 00:00:00 2001 From: Joey Berkovitz Date: Mon, 17 Aug 2026 15:34:47 -0400 Subject: [PATCH] fix: add reaction type for leak detector --- redfish/leakdetector.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/redfish/leakdetector.go b/redfish/leakdetector.go index df6430b9..c56ea902 100644 --- a/redfish/leakdetector.go +++ b/redfish/leakdetector.go @@ -20,6 +20,14 @@ const ( FloatSwitchLeakDetectorType LeakDetectorType = "FloatSwitch" ) +type LeakReactionType string + +const ( + LeakReactionTypeForceOff LeakReactionType = "ForceOff" + LeakReactionTypeGracefulShutdown LeakReactionType = "GracefulShutdown" + LeakReactionTypeNone LeakReactionType = "None" +) + // LeakDetector shall represent a state-based or digital-value leak detector for a Redfish implementation. type LeakDetector struct { common.Entity @@ -27,6 +35,8 @@ type LeakDetector struct { ODataContext string `json:"@odata.context"` // ODataType is the odata type. ODataType string `json:"@odata.type"` + // CriticalReactionType specifies the reaction to perform when a critical leak is detected. + CriticalReactionType LeakReactionType // Description provides a description of this resource. Description string // DetectorState shall contain the state of the leak detector. @@ -65,6 +75,8 @@ type LeakDetector struct { SparePartNumber string // Status shall contain any status or health properties of the resource. Status common.Status + // WarningReactionType specifies the reaction to perform when a warning-level leak is detected. + WarningReactionType LeakReactionType // RawData holds the original serialized JSON so we can compare updates RawData []byte }