From: Benjamin Diaz Date: Mon, 2 Sep 2019 19:19:10 +0000 (-0300) Subject: Replaces call to Gnocchi status for a request of metric list when determining backend... X-Git-Tag: v7.0.0rc1~22^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F03%2F7903%2F1;p=osm%2FMON.git 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 --- 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: