Tile Health Rules

A file to store health transition rules for tile.

class TileHealthRules(*args, **kwargs)

A class to handle transition rules for tile.

compute_intermediate_state(monitoring_points, min_max)

Compute the intermediate health state for the Tile.

This is computed for a particular category of monitoring points e.g. voltage, io etc.

Parameters:
  • monitoring_points (dict[str, Any]) – dictionary of all the TPM monitoring points for the given category of monitoring point

  • min_max (dict[str, Any]) – minimum/maximum/expected values for the monitoring points. For monitoring points where a minimum/maximum doesn’t make sense, the value provided will be that which the monitoring point is required to have for the device to be healthy

Return type:

HealthState

Returns:

the computed health state

property default_thresholds: dict[str, Any]

Get the default thresholds for tile.

Returns:

the default thresholds

degraded_rule(intermediate_healths, tile_health)

Test whether DEGRADED is valid for the tile.

Parameters:
  • intermediate_healths (dict[str, HealthState]) – dictionary of intermediate healths

  • tile_health (HealthState) – the tile’s computed health from it’s communication and fault states, among others. Does not include monitoring points.

Return type:

bool

Returns:

True if DEGRADED is a valid state

failed_rule(intermediate_healths, tile_health)

Test whether FAILED is valid for the tile.

Parameters:
  • intermediate_healths (dict[str, HealthState]) – dictionary of intermediate healths

  • tile_health (HealthState) – the tile’s computed health from it’s communication and fault states, among others. Does not include monitoring points.

Return type:

bool

Returns:

True if FAILED is a valid state

healthy_rule(intermediate_healths, tile_health)

Test whether OK is valid for the tile.

Parameters:
  • intermediate_healths (dict[str, HealthState]) – dictionary of intermediate healths

  • tile_health (HealthState) – the tile’s computed health from it’s communication and fault states, among others. Does not include monitoring points.

Return type:

bool

Returns:

True if OK is a valid state

unknown_rule(intermediate_healths, tile_health)

Test whether UNKNOWN is valid for the tile.

Parameters:
  • intermediate_healths (dict[str, HealthState]) – dictionary of intermediate healths

  • tile_health (HealthState) – the tile’s computed health from it’s communication and fault states, among others. Does not include monitoring points.

Return type:

bool

Returns:

True if UNKNOWN is a valid state