From: Rahul Kumar Date: Thu, 9 May 2024 10:06:24 +0000 (+0530) Subject: Feature 11016: Service KPI Metric Based Scaling of VNF using exporter endpoint in... X-Git-Tag: pre-v16.0~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=48926cede8528c01e46c5a800a93f1618bd8c06e;p=osm%2FNG-SA.git Feature 11016: Service KPI Metric Based Scaling of VNF using exporter endpoint in NGSA Change-Id: I30be504c4656575f51711322bf81055fded3e35d Signed-off-by: Rahul Kumar --- 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: