Controller Health Model
An implementation of a health model for a controller.
- class ControllerHealthModel(maser_fqdns, health_changed_callback)
A health model for a controller.
- __init__(maser_fqdns, health_changed_callback)
Initialise a new instance.
- Parameters:
health_changed_callback (
Callable
[[HealthState
],None
]) – callback to be called whenever there is a change to this health model’s evaluated health state.
- evaluate_health()
Compute overall health of the controller.
The overall health is based on the fault and communication status of the controller overall, together with the health of the subservient devices that it manages.
This implementation simply sets the health of the controller to the health of its least healthy component.
- Return type:
- Returns:
an overall health of the controller
- maser_health_changed(maser_fqdn, maser_health)
Handle a change in maser health.
- Parameters:
maser_fqdn (
str
) – the FQDN of the maser whose health has changedmaser_health (
Optional
[HealthState
]) – the health state of the specified maser, or None if the maser’s admin mode indicates that its health should not be rolled up.
- Return type: