Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")
Esempio n. 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")