From fe7bdeb13eb569b267c7650948d9f634bd49dae9 Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Mon, 2 Sep 2019 16:19:10 -0300 Subject: [PATCH] Replaces call to Gnocchi status for a request of metric list when determining backend in openstack vnf collector 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 --- osm_mon/collector/vnf_collectors/openstack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_mon/collector/vnf_collectors/openstack.py b/osm_mon/collector/vnf_collectors/openstack.py index f63d0b2..58721a9 100644 --- a/osm_mon/collector/vnf_collectors/openstack.py +++ b/osm_mon/collector/vnf_collectors/openstack.py @@ -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: -- 2.17.1