support new gnocchiclient interface

support for explicitly setting interface/regoin_name was changed in
gnocchiclient 3.1 and remove in gnocchiclient 4.
Closes-Bug: #1714483

Change-Id: I7ef25df606e07c6c235afa286ae83450488cd8e0
This commit is contained in:
gord chung 2017-09-01 16:50:36 +00:00 committed by gordon chung
parent 26e624bf50
commit 59355a39ea
2 changed files with 4 additions and 3 deletions

View File

@ -34,8 +34,9 @@ class GnocchiBase(threshold.ThresholdEvaluator):
super(GnocchiBase, self).__init__(conf)
self._gnocchi_client = client.Client(
'1', keystone_client.get_session(conf),
interface=conf.service_credentials.interface,
region_name=conf.service_credentials.region_name)
adapter_options={
'interface': conf.service_credentials.interface,
'region_name': conf.service_credentials.region_name})
@staticmethod
def _sanitize(rule, statistics):

View File

@ -8,7 +8,7 @@ futures>=3.0;python_version=='2.7' or python_version=='2.6' # BSD
futurist>=0.11.0 # Apache-2.0
jsonschema!=2.5.0,<3.0.0,>=2.0.0
keystonemiddleware>=2.2.0
gnocchiclient>=2.1.0 # Apache-2.0
gnocchiclient>=3.1.0,<4.0.0 # Apache-2.0
lxml>=2.3
oslo.db>=4.8.0,!=4.13.1,!=4.13.2,!=4.15.0 # Apache-2.0
oslo.config>=2.6.0 # Apache-2.0