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: I851e16f537f547fb3a31fb22535dd4dae62fb235
(cherry picked from commit c49546b43f)
This commit is contained in:
gord chung 2017-09-01 13:15:12 +00:00 committed by gordon chung
parent d17d43721d
commit ef3cff89a8
1 changed files with 4 additions and 4 deletions

View File

@ -31,10 +31,10 @@ def get_gnocchiclient(conf, timeout_override=False):
pool_maxsize=conf.max_parallel_requests)
session.mount("http://", adapter)
session.mount("https://", adapter)
return client.Client('1', session,
interface=conf[group].interface,
region_name=conf[group].region_name,
adapter_options={'connect_retries': 3})
return client.Client(
'1', session, adapter_options={'connect_retries': 3,
'interface': conf[group].interface,
'region_name': conf[group].region_name})
# NOTE(sileht): This is the initial resource types created in Gnocchi