Use "interface" option for monasca endpoint discovery

The "interface" option was ignored for endpoint discovery. This was leading to
unexpected behaviour.

Change-Id: Ie669d55d06e06dfe2462cc97c7a76c7f59ee4c84
Story: 2006694
Task: 36994
(cherry picked from commit cbb947ae00)
This commit is contained in:
Luka Peschke 2019-10-09 16:18:37 +02:00 committed by Pierre Riteau
parent 7d6b82b8a8
commit f755c0a94b
2 changed files with 9 additions and 1 deletions

View File

@ -106,7 +106,10 @@ class MonascaCollector(collector.BaseCollector):
CONF,
COLLECTOR_MONASCA_OPTS,
auth=self.auth)
self.ks_client = ks_client.Client(session=self.session)
self.ks_client = ks_client.Client(
session=self.session,
interface=CONF.collector_monasca.interface,
)
self.mon_endpoint = self._get_monasca_endpoint()
if not self.mon_endpoint:
raise EndpointNotFound()

View File

@ -0,0 +1,5 @@
---
fixes:
- |
The ``interface`` parameter of the ``collector_monasca`` section is now
also used for the discovery of the monasca endpoint.