Example #1
0
 def test_alarm_to_hapi_status_creation(self):
     alarm_type = "creation"
     detail = '{"state": "ok"}'
     evt_type = Common.alarm_to_hapi_status(alarm_type, detail)
     self.assertEqual(evt_type, "OK")
Example #2
0
 def test_alarm_to_hapi_status_unknown(self):
     alarm_type = "state transition"
     detail = '{"state": "insufficient data"}'
     evt_type = Common.alarm_to_hapi_status(alarm_type, detail)
     self.assertEqual(evt_type, "UNKNOWN")
Example #3
0
 def test_alarm_to_hapi_status_ng(self):
     alarm_type = "state transition"
     detail = '{"state": "alarm"}'
     evt_type = Common.alarm_to_hapi_status(alarm_type, detail)
     self.assertEqual(evt_type, "NG")
Example #4
0
 def test_alarm_to_hapi_status_creation(self):
     alarm_type = "creation"
     detail = '{"state": "ok"}'
     evt_type = Common.alarm_to_hapi_status(alarm_type, detail)
     self.assertEqual(evt_type, "OK")
Example #5
0
 def test_alarm_to_hapi_status_unknown(self):
     alarm_type = "state transition"
     detail = '{"state": "insufficient data"}'
     evt_type = Common.alarm_to_hapi_status(alarm_type, detail)
     self.assertEqual(evt_type, "UNKNOWN")
Example #6
0
 def test_alarm_to_hapi_status_ng(self):
     alarm_type = "state transition"
     detail = '{"state": "alarm"}'
     evt_type = Common.alarm_to_hapi_status(alarm_type, detail)
     self.assertEqual(evt_type, "NG")