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=refs%2Fchanges%2F68%2F14368%2F1;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: