Fixed request for OpenStack Rocky Endpoints
Gnocchi enpoints where not loaded correctly with
the previous patch.
Change-Id: I8d312a4ac61ae7554ea1c7a321d9db8129082cc4
Signed-off-by: Antonio Marsico <antonio.marsico@bt.com>
diff --git a/osm_mon/collector/vnf_collectors/openstack.py b/osm_mon/collector/vnf_collectors/openstack.py
index 787321a..203b26f 100644
--- a/osm_mon/collector/vnf_collectors/openstack.py
+++ b/osm_mon/collector/vnf_collectors/openstack.py
@@ -27,6 +27,7 @@
from ceilometerclient import client as ceilometer_client
from ceilometerclient.exc import HTTPException
from gnocchiclient.v1 import client as gnocchi_client
+from keystoneauth1.exceptions.catalog import EndpointNotFound
from keystoneclient.v3 import client as keystone_client
from neutronclient.v2_0 import client as neutron_client
@@ -120,7 +121,7 @@
ceilometer = CeilometerBackend(vim_account)
ceilometer.client.capabilities.get()
return ceilometer
- except HTTPException:
+ except (HTTPException, EndpointNotFound):
gnocchi = GnocchiBackend(vim_account)
gnocchi.client.status.get()
return gnocchi