Subrack Health Rules

A file to store health transition rules for subrack.

class SubrackHealthRules(*args, **kwargs)

A class to handle transition rules for subrack.

property default_thresholds: dict[str, Any]

Get the default thresholds for this device.

Returns:

the default thresholds

degraded_rule(state_dict)

Test whether DEGRADED is valid for the subrack.

Parameters:

state_dict (dict[str, Any]) – The current state of the subrack.

Return type:

tuple[bool, str]

Returns:

True if DEGRADED is a valid state, along with a text report.

failed_rule(state_dict)

Test whether FAILED is valid for the subrack.

Parameters:

state_dict (dict[str, Any]) – The current state of the subrack.

Return type:

tuple[bool, str]

Returns:

True if FAILED is a valid state, along with a text report.

healthy_rule(state_dict)

Test whether OK is valid for the subrack.

Parameters:

state_dict (dict[str, Any]) – The current state of the subrack.

Return type:

tuple[bool, str]

Returns:

True if OK is a valid state, along with a text report.

unknown_rule(state_dict)

Test whether UNKNOWN is valid for the subrack.

Parameters:

state_dict (dict[str, Any]) – The current state of the subrack.

Return type:

tuple[bool, str]

Returns:

True if UNKNOWN is a valid state, along with a text report.