Changes insufficient data validation in alarms to account for metric results 0.0 97/7697/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Mon, 24 Jun 2019 18:50:38 +0000 (15:50 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Mon, 24 Jun 2019 18:50:38 +0000 (15:50 -0300)
Change-Id: Ia67e54ced6f5885ecd875c8a94529b9384fa46b2
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
osm_mon/evaluator/service.py

index 3865b17..20bb0ad 100644 (file)
@@ -71,7 +71,7 @@ class EvaluatorService:
                          alarm: Alarm):
         log.debug("_evaluate_metric")
         metric_value = self._get_metric_value(nsr_id, vnf_member_index, vdur_name, metric_name)
-        if not metric_value:
+        if metric_value is None:
             log.warning("No metric result for alarm %s", alarm.id)
             self.queue.put((alarm, AlarmStatus.INSUFFICIENT))
         else: