Fixed request for OpenStack Rocky Endpoints 43/8143/1
authorAntonio Marsico <antonio.marsico@bt.com>
Mon, 11 Nov 2019 16:17:01 +0000 (16:17 +0000)
committerAntonio Marsico <antonio.marsico@bt.com>
Mon, 11 Nov 2019 16:56:45 +0000 (16:56 +0000)
Gnocchi enpoints where not loaded correctly with
        the previous patch.

Change-Id: Ib27183ea8cfeda64f80c11bc40b451d28b92514e
Signed-off-by: Antonio Marsico <antonio.marsico@bt.com>
osm_mon/collector/vnf_collectors/openstack.py

index 16b9152..8a36a14 100644 (file)
@@ -28,6 +28,7 @@ from ceilometerclient import client as ceilometer_client
 from ceilometerclient.exc import HTTPException
 from gnocchiclient.v1 import client as gnocchi_client
 from keystoneclient.v3 import client as keystone_client
+from keystoneauth1.exceptions.catalog import EndpointNotFound
 from neutronclient.v2_0 import client as neutron_client
 
 from osm_mon.collector.metric import Metric
@@ -120,7 +121,7 @@ class OpenstackCollector(BaseVimCollector):
             ceilometer = CeilometerBackend(vim_account)
             ceilometer.client.capabilities.get()
             return ceilometer
-        except HTTPException:
+        except (HTTPException, EndpointNotFound):
             gnocchi = GnocchiBackend(vim_account)
             gnocchi.client.metric.list(limit=1)
             return gnocchi