Fix bug in juju metrics collection 47/8347/1
authorGianpietro Lavado <glavado@whitestack.com>
Sun, 8 Dec 2019 13:27:02 +0000 (13:27 +0000)
committerGianpietro Lavado <glavado@whitestack.com>
Sun, 8 Dec 2019 13:28:07 +0000 (13:28 +0000)
Change-Id: I0efd96227078df10e062d087afb86dc3796d4eb3
Signed-off-by: Gianpietro Lavado <glavado@whitestack.com>
osm_mon/collector/vnf_collectors/juju.py

index ce6f777..8f3fa34 100644 (file)
@@ -80,7 +80,7 @@ class VCACollector(BaseCollector):
                     for measure in measure_list:
                         log.debug("Measure: %s", measure)
                         metric = VnfMetric(nsr_id, vnf_member_index, vdur['name'], measure['key'],
-                                           float(measure['value'], tags))
+                                           float(measure['value']), tags)
                         metrics.append(metric)
         if 'vnf-configuration' in vnfd and 'metrics' in vnfd['vnf-configuration']:
             try:
@@ -94,7 +94,7 @@ class VCACollector(BaseCollector):
             for measure_list in measures.values():
                 for measure in measure_list:
                     log.debug("Measure: %s", measure)
-                    metric = VnfMetric(nsr_id, vnf_member_index, '', measure['key'], float(measure['value'], tags))
+                    metric = VnfMetric(nsr_id, vnf_member_index, '', measure['key'], float(measure['value']), tags)
                     metrics.append(metric)
         return metrics