Deprecate support for unused [cinder] region_name
The [cinder] region_name parameter is not used by nova, while nova uses the [cinder] os_region_name parameter instead. This change deprecates the unused region_name parameter. Change-Id: I9f45c9aea59793a9d3807af4e5fe53e347d81541
This commit is contained in:
parent
65eea0d9c5
commit
e2889d1bf6
|
@ -23,11 +23,6 @@
|
|||
# (optional) Timeout value for connecting to cinder in seconds.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*region_name*]
|
||||
# (optional) Region name for connecting to cinder in admin context
|
||||
# through the OpenStack Identity service.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*project_name*]
|
||||
# (optional) Project name for connecting to Cinder services in
|
||||
# admin context through the OpenStack Identity service.
|
||||
|
@ -67,12 +62,18 @@
|
|||
# call.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*region_name*]
|
||||
# (optional) Region name for connecting to cinder in admin context
|
||||
# through the OpenStack Identity service.
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::cinder (
|
||||
$password = $::os_service_default,
|
||||
$auth_type = undef,
|
||||
$auth_url = undef,
|
||||
$timeout = $::os_service_default,
|
||||
$region_name = $::os_service_default,
|
||||
$project_name = undef,
|
||||
$project_domain_name = undef,
|
||||
$username = undef,
|
||||
|
@ -80,6 +81,8 @@ class nova::cinder (
|
|||
$os_region_name = $::os_service_default,
|
||||
$catalog_info = $::os_service_default,
|
||||
$http_retries = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$region_name = undef,
|
||||
) {
|
||||
|
||||
include nova::deps
|
||||
|
@ -87,6 +90,14 @@ class nova::cinder (
|
|||
$os_region_name_real = pick($::nova::os_region_name, $os_region_name)
|
||||
$catalog_info_real = pick($::nova::cinder_catalog_info, $catalog_info)
|
||||
|
||||
if $region_name != undef {
|
||||
warning('The nova::cinder::region_name parameter is deprecated and has no effect. \
|
||||
Use the nova::cinder::os_region_name parameter')
|
||||
}
|
||||
nova_config {
|
||||
'cinder/region_name': ensure => absent;
|
||||
}
|
||||
|
||||
if is_service_default($password) {
|
||||
$auth_type_real = pick($auth_type, $::os_service_default)
|
||||
$auth_url_real = pick($auth_url, $::os_service_default)
|
||||
|
@ -107,7 +118,6 @@ class nova::cinder (
|
|||
'cinder/password': value => $password, secret => true;
|
||||
'cinder/auth_type': value => $auth_type_real;
|
||||
'cinder/auth_url': value => $auth_url_real;
|
||||
'cinder/region_name': value => $region_name;
|
||||
'cinder/timeout': value => $timeout;
|
||||
'cinder/project_name': value => $project_name_real;
|
||||
'cinder/project_domain_name': value => $project_domain_name_real;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``nova::cinder::region_name`` parameter has been deprecated and it has
|
||||
no effect. Use the ``nova::cinder::os_region_name`` which is actually used
|
||||
by nova.
|
|
@ -9,7 +9,6 @@ describe 'nova::cinder' do
|
|||
should contain_nova_config('cinder/auth_type').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/auth_url').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/timeout').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/region_name').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/project_name').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/project_domain_name').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/username').with_value('<SERVICE DEFAULT>')
|
||||
|
@ -32,7 +31,6 @@ describe 'nova::cinder' do
|
|||
should contain_nova_config('cinder/auth_type').with_value('password')
|
||||
should contain_nova_config('cinder/auth_url').with_value('http://127.0.0.1:5000/')
|
||||
should contain_nova_config('cinder/timeout').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/region_name').with_value('<SERVICE DEFAULT>')
|
||||
should contain_nova_config('cinder/project_name').with_value('services')
|
||||
should contain_nova_config('cinder/project_domain_name').with_value('Default')
|
||||
should contain_nova_config('cinder/username').with_value('cinder')
|
||||
|
@ -50,7 +48,6 @@ describe 'nova::cinder' do
|
|||
:auth_type => 'v3password',
|
||||
:auth_url => 'http://10.0.0.10:5000/v3',
|
||||
:timeout => 60,
|
||||
:region_name => 'RegionOne',
|
||||
:os_region_name => 'RegionOne',
|
||||
:catalog_info => 'volumev3:cinderv3:publicURL',
|
||||
:http_retries => 3,
|
||||
|
@ -62,7 +59,6 @@ describe 'nova::cinder' do
|
|||
should contain_nova_config('cinder/auth_type').with_value('v3password')
|
||||
should contain_nova_config('cinder/auth_url').with_value('http://10.0.0.10:5000/v3')
|
||||
should contain_nova_config('cinder/timeout').with_value('60')
|
||||
should contain_nova_config('cinder/region_name').with_value('RegionOne')
|
||||
should contain_nova_config('cinder/project_name').with_value('services')
|
||||
should contain_nova_config('cinder/project_domain_name').with_value('Default')
|
||||
should contain_nova_config('cinder/username').with_value('cinder')
|
||||
|
|
Loading…
Reference in New Issue