Merge "Add nova_client's region option"

This commit is contained in:
Zuul 2020-04-03 10:10:28 +00:00 committed by Gerrit Code Review
commit 0d9be7cb4d
3 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,7 @@
---
deprecations:
- The ``region-name`` is deprecated in keystone_client's cfgs, and
use ``region_name`` instead.
upgrade:
- The deprecated ``os-region-name`` option has been dropped.

View File

@ -83,9 +83,9 @@ def delete_trust_id(trust_id, auth_plugin):
OPTS = [
cfg.StrOpt('region-name',
cfg.StrOpt('region_name',
default=os.environ.get('OS_REGION_NAME'),
deprecated_name="os-region-name",
deprecated_name="region-name",
help='Region name to use for OpenStack service endpoints.'),
cfg.StrOpt('interface',
default=os.environ.get(

View File

@ -107,6 +107,7 @@ def nova_client():
n_client = driver_module('nova')
client = n_client.Client(
version=CONF.nova_version,
region_name=CONF.service_credentials.region_name,
session=keystone_client.get_session(),
)
LOG.info('Nova client created')