def get_alarm_refs(entity=None):
    alarm_states = entity.triggeredAlarmState
    ret = []
    for alarm_state in alarm_states:
        tdict = {
            "alarm": alarm_state.key.split('.')[0],
            "status": alarm_state.overallStatus
        }
        ret.append(tdict)
    return ret
Useful method that will return a list of dict with the moref and alarm
dataset/ETHPy150Open vmware/pyvmomi-community-samples/samples/tools/alarm.py/get_alarm_refs