Adds support for vnf-metric in mon-evaluator 58/6958/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Sat, 24 Nov 2018 03:05:11 +0000 (00:05 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Sat, 24 Nov 2018 03:05:11 +0000 (00:05 -0300)
Change-Id: I81e69761448418625ca4076f6e3d3903c07c9f58
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
osm_mon/evaluator/evaluator.py

index 9591946..a672cb2 100644 (file)
@@ -136,8 +136,15 @@ class Evaluator:
                 processes.append(p)
                 p.start()
             if 'vnf-metric' in vnf_monitoring_param:
-                log.warning("vnf-metric is not currently supported.")
-                continue
+                vnf_metric_name = vnf_monitoring_param['vnf-metric']['vnf-metric-name-ref']
+                p = multiprocessing.Process(target=self._evaluate_metric,
+                                            args=(nsr_id,
+                                                  vnf_member_index,
+                                                  '',
+                                                  vnf_metric_name,
+                                                  alarm))
+                processes.append(p)
+                p.start()
 
         for process in processes:
             process.join()