Add nova_client's region option
Uniform region opt format, and I only add region opt to nova_client. In many regions I find the error which should call region one, but call region second, it is confused. Change-Id: I642668d970f276a14692898acc628357aeaa4493
This commit is contained in:
parent
35fc976e5f
commit
8f0ffc6e7a
@ -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.
|
@ -83,9 +83,9 @@ def delete_trust_id(trust_id, auth_plugin):
|
|||||||
|
|
||||||
|
|
||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.StrOpt('region-name',
|
cfg.StrOpt('region_name',
|
||||||
default=os.environ.get('OS_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.'),
|
help='Region name to use for OpenStack service endpoints.'),
|
||||||
cfg.StrOpt('interface',
|
cfg.StrOpt('interface',
|
||||||
default=os.environ.get(
|
default=os.environ.get(
|
||||||
|
@ -107,6 +107,7 @@ def nova_client():
|
|||||||
n_client = driver_module('nova')
|
n_client = driver_module('nova')
|
||||||
client = n_client.Client(
|
client = n_client.Client(
|
||||||
version=CONF.nova_version,
|
version=CONF.nova_version,
|
||||||
|
region_name=CONF.service_credentials.region_name,
|
||||||
session=keystone_client.get_session(),
|
session=keystone_client.get_session(),
|
||||||
)
|
)
|
||||||
LOG.info('Nova client created')
|
LOG.info('Nova client created')
|
||||||
|
Loading…
Reference in New Issue
Block a user