Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions redfish/leakdetector.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ 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
// ODataContext is the odata context.
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.
Expand Down Expand Up @@ -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
}
Expand Down