Station Health Rules
A file to store health transition rules for station.
- class SpsStationHealthRules(*args, **kwargs)
A class to handle transition rules for station.
- property default_thresholds: dict[str, float]
Get the default thresholds for this device.
- Returns:
the default thresholds
- degraded_rule(subrack_healths, tile_healths, station_state)
Test whether DEGRADED is valid for the station.
- Parameters:
subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths
tile_healths (dict[str, HealthState | None]) – dictionary of tile healths
station_state (dict[str, Any | None]) – dictionary of station state attributes.
- Return type:
tuple[bool, str]
- Returns:
True if DEGRADED is a valid state, along with a text report.
- failed_rule(subrack_healths, tile_healths, station_state)
Test whether FAILED is valid for the station.
- Parameters:
subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths
tile_healths (dict[str, HealthState | None]) – dictionary of tile healths
station_state (dict[str, Any | None]) – dictionary of station state attributes.
- Return type:
tuple[bool, str]
- Returns:
True if FAILED is a valid state, along with a text report.
- healthy_rule(subrack_healths, tile_healths, station_state)
Test whether OK is valid for the station.
- Parameters:
subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths
tile_healths (dict[str, HealthState | None]) – dictionary of tile healths
station_state (dict[str, Any | None]) – dictionary of station state attributes.
- Return type:
tuple[bool, str]
- Returns:
True if OK is a valid state, along with a text report.
- unknown_rule(subrack_healths, tile_healths, station_state)
Test whether UNKNOWN is valid for the station.
- Parameters:
subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths
tile_healths (dict[str, HealthState | None]) – dictionary of tile healths
station_state (dict[str, Any | None]) – dictionary of station state attributes.
- Return type:
tuple[bool, str]
- Returns:
True if UNKNOWN is a valid state, along with a text report.