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

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 status for all triggered alarms on a given entity .