From 48926cede8528c01e46c5a800a93f1618bd8c06e Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Thu, 9 May 2024 15:36:24 +0530 Subject: [PATCH] Feature 11016: Service KPI Metric Based Scaling of VNF using exporter endpoint in NGSA Change-Id: I30be504c4656575f51711322bf81055fded3e35d Signed-off-by: Rahul Kumar --- src/osm_ngsa/osm_mon/vim_connectors/openstack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osm_ngsa/osm_mon/vim_connectors/openstack.py b/src/osm_ngsa/osm_mon/vim_connectors/openstack.py index 1918a22..b5b2baf 100644 --- a/src/osm_ngsa/osm_mon/vim_connectors/openstack.py +++ b/src/osm_ngsa/osm_mon/vim_connectors/openstack.py @@ -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: -- 2.25.1