Replaces call to Gnocchi status for a request of metric list when determining backend... 03/7903/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Mon, 2 Sep 2019 19:19:10 +0000 (16:19 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Mon, 2 Sep 2019 19:19:16 +0000 (16:19 -0300)
When trying to determine metric backend, the openstack vnf collector was
requesting Gnocchi status data, which is only available for privileged users.
This generated errors in the metric collection when using a nonadmin openstack user.

Change-Id: I6a85f27c4714a1d3f8bbbf82da1795066352a1e0
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
osm_mon/collector/vnf_collectors/openstack.py

index f63d0b2..58721a9 100644 (file)
@@ -122,7 +122,7 @@ class OpenstackCollector(BaseVimCollector):
             return ceilometer
         except EndpointNotFound:
             gnocchi = GnocchiBackend(vim_account)
-            gnocchi.client.status.get()
+            gnocchi.client.metric.list(limit=1)
             return gnocchi
 
     def _get_metric_type(self, metric_name: str, interface_name: str) -> MetricType: