fault_simulation module

Code to simulate faults in the system for testing purposes.

exception aiv_utils.fault_simulation.FaultGenerated

Fault generated exception

aiv_utils.fault_simulation.fix_tpm(tpm)

Put the TPM back to normal health rules

Parameters:

tpm – the TPM device

aiv_utils.fault_simulation.manipulate_sdp(fault=False)

Cause a real failure in the SDP subsystem.

Parameters:

fault – whether to cause a fault or not

aiv_utils.fault_simulation.trigger_fault(tpm, stay_failed=True, delay_failed=5)

Trigger a fault in a TPM by changing the health model

Parameters:
  • tpm – the TPM device

  • stay_failed – whether to stay in failed state or not

  • delay_failed – how long in seconds to stay in failed state

aiv_utils.fault_simulation.trigger_fault_cbf()

Topic suggested this as a way of inducing a fault _during_ a scan. See corr__low_cbf_processor_offline_during_scan_test.py in ska-low-csp-test

aiv_utils.fault_simulation.trigger_fault_sdp(subarray_name)

Manually set the SDP subarray to FAULT state

Parameters:

subarray_name – the name of the subarray