def print_triggered_alarms(entity=None):
 alarms = entity.triggeredAlarmState
 for alarm in alarms:
  print(('#' * 40))
  print('alarm_moref: {0}'.format(alarm.key.split('.')[0]))
  print('alarm status: {0}'.format(alarm.overallStatus))

def print_triggered_alarms ( entity = None ) : alarms = entity . triggeredAlarmState for alarm in alarms : print ( ( '#' * 40 ) ) print ( 'alarm_moref: {0}' . format ( alarm . key . split ( '.' ) [ 0 ] ) ) print ( 'alarm status: {0}' . format ( alarm . overallStatus ) )
this is a useful method if you need to print out the alarm morefs .