Feature 11016: Service KPI Metric Based Scaling of VNF using exporter endpoint in... 68/14368/1
authorRahul Kumar <rahul.k4@tataelxsi.co.in>
Thu, 9 May 2024 10:06:24 +0000 (15:36 +0530)
committerRahul Kumar <rahul.k4@tataelxsi.co.in>
Thu, 9 May 2024 10:06:28 +0000 (15:36 +0530)
Change-Id: I30be504c4656575f51711322bf81055fded3e35d
Signed-off-by: Rahul Kumar <rahul.k4@tataelxsi.co.in>
src/osm_ngsa/osm_mon/vim_connectors/openstack.py

index 1918a22..b5b2baf 100644 (file)
@@ -218,7 +218,10 @@ class OpenStackCollector(VIMConnector):
         for metric in metric_list:
             server = metric["vm_id"]
             metric_name = metric["metric"]
-            openstack_metric_name = METRIC_MAPPINGS[metric_name]
+            try:
+                openstack_metric_name = METRIC_MAPPINGS[metric_name]
+            except KeyError:
+                continue
             metric_type = self._get_metric_type(metric_name)
             log.info(f"Collecting metric {openstack_metric_name} for {server}")
             try: