Add region option to clients of other openstack datasource

Openstack clients also contain nova cinder neutron heat trove in vitrage, So
unifiedly added this configuration item to them.

Change-Id: I1e0a6fd92d4788e13857511bb2a2fe6fe125fbeb
This commit is contained in:
Q.hongtao 2020-04-07 15:26:02 +08:00
parent 5a7fde4599
commit e3e49387f2

View File

@ -122,6 +122,7 @@ def trove_client():
tr_client = driver_module('trove')
client = tr_client.Client(
version=CONF.trove_version,
region_name=CONF.service_credentials.region_name,
session=keystone_client.get_session(),
)
LOG.info('Trove client created')
@ -136,6 +137,7 @@ def cinder_client():
cin_client = driver_module('cinder')
client = cin_client.Client(
version=CONF.cinder_version,
region_name=CONF.service_credentials.region_name,
session=keystone_client.get_session(),
)
LOG.info('Cinder client created')
@ -163,6 +165,7 @@ def neutron_client():
try:
ne_client = driver_module('neutron')
client = ne_client.Client(
region_name=CONF.service_credentials.region_name,
session=keystone_client.get_session()
)
LOG.info('Neutron client created')
@ -177,6 +180,7 @@ def heat_client():
he_client = driver_module('heat')
client = he_client.Client(
version=CONF.heat_version,
region_name=CONF.service_credentials.region_name,
session=keystone_client.get_session()
)
LOG.info('Heat client created')