Fixed request for OpenStack Rocky Endpoints 42/8142/1 v6.0 v6.0.4 v6.0.4rc1
authorAntonio Marsico <antonio.marsico@bt.com>
Mon, 11 Nov 2019 16:53:51 +0000 (16:53 +0000)
committerAntonio Marsico <antonio.marsico@bt.com>
Mon, 11 Nov 2019 16:55:54 +0000 (16:55 +0000)
   Gnocchi enpoints where not loaded correctly with
   the previous patch.

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

index 787321a..203b26f 100644 (file)
@@ -27,6 +27,7 @@ import gnocchiclient.exceptions
 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 @@ class OpenstackCollector(BaseVimCollector):
             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