Deprecate the redundant cinder::backend_host parameter
The cinder::backend_host parameter is redundant, because it is not used in the cinder class where the parameter is defined but is used to only override the cinder::backends::backend_host parameter. Change-Id: Ife5f8bdcfd4e982b7ffa5532b2a23d48c65d501f
This commit is contained in:
parent
5449d242f4
commit
8e233cfb92
@ -12,12 +12,12 @@
|
|||||||
#
|
#
|
||||||
# [*backend_host*]
|
# [*backend_host*]
|
||||||
# (optional) Backend override of host value.
|
# (optional) Backend override of host value.
|
||||||
# Defaults to undef
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# Author: Andrew Woodward <awoodward@mirantis.com>
|
# Author: Andrew Woodward <awoodward@mirantis.com>
|
||||||
class cinder::backends (
|
class cinder::backends (
|
||||||
$enabled_backends = undef,
|
$enabled_backends = undef,
|
||||||
$backend_host = undef,
|
$backend_host = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include cinder::deps
|
include cinder::deps
|
||||||
@ -26,6 +26,10 @@ class cinder::backends (
|
|||||||
$backend_host_real = $::cinder::backend_host
|
$backend_host_real = $::cinder::backend_host
|
||||||
} else {
|
} else {
|
||||||
$backend_host_real = $backend_host
|
$backend_host_real = $backend_host
|
||||||
|
if ! $backend_host_real {
|
||||||
|
warning('Using a false value for backend_host is deprecated. \
|
||||||
|
Use $::os_service_default instead')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $enabled_backends == undef {
|
if $enabled_backends == undef {
|
||||||
|
@ -337,7 +337,6 @@ class cinder (
|
|||||||
$host = $::os_service_default,
|
$host = $::os_service_default,
|
||||||
$enable_new_services = $::os_service_default,
|
$enable_new_services = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$backend_host = undef,
|
|
||||||
$enable_force_upload = $::os_service_default,
|
$enable_force_upload = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$database_min_pool_size = undef,
|
$database_min_pool_size = undef,
|
||||||
@ -348,6 +347,7 @@ class cinder (
|
|||||||
$database_retry_interval = undef,
|
$database_retry_interval = undef,
|
||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$amqp_allow_insecure_clients = undef,
|
$amqp_allow_insecure_clients = undef,
|
||||||
|
$backend_host = undef,
|
||||||
) inherits cinder::params {
|
) inherits cinder::params {
|
||||||
|
|
||||||
include cinder::deps
|
include cinder::deps
|
||||||
@ -465,15 +465,14 @@ removed in a future realse. Use cinder::db::database_max_overflow instead')
|
|||||||
'key_manager/backend': value => $keymgr_backend;
|
'key_manager/backend': value => $keymgr_backend;
|
||||||
'barbican/barbican_endpoint': value => $keymgr_encryption_api_url;
|
'barbican/barbican_endpoint': value => $keymgr_encryption_api_url;
|
||||||
'barbican/auth_endpoint': value => $keymgr_encryption_auth_url;
|
'barbican/auth_endpoint': value => $keymgr_encryption_auth_url;
|
||||||
# NOTE(abishop): $backend_host is not written here because it is not a valid
|
|
||||||
# DEFAULT option. It is only recognized in the backend sections. Instead,
|
|
||||||
# for backward compatibility, backends.pp references this parameter.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if $backend_host != undef {
|
if $backend_host != undef {
|
||||||
if defined(Class[cinder::backends]){
|
if defined(Class[cinder::backends]){
|
||||||
fail('The cinder::backend_host parameter has no effect unless cinder::backends is included later')
|
fail('The cinder::backend_host parameter has no effect unless cinder::backends is included later')
|
||||||
}
|
}
|
||||||
|
warning('The cinder::backend_host parameter is deprecated. \
|
||||||
|
Use the cinder::backends::backend_host parameter instead')
|
||||||
}
|
}
|
||||||
|
|
||||||
# V3 APIs
|
# V3 APIs
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``cinder::backend_host`` parameter has been deprecated and will be
|
||||||
|
remove in a future release. Use the ``cinder::backends::backend_host``
|
||||||
|
parameter instead.
|
||||||
|
|
||||||
|
- |
|
||||||
|
Passing a false value for ``cinder::backends::backend_host`` has been
|
||||||
|
deprecated. Use ``$::os_service_default`` instead.
|
@ -43,9 +43,9 @@ describe 'cinder::backends' do
|
|||||||
|
|
||||||
it 'configures cinder.conf with default params' do
|
it 'configures cinder.conf with default params' do
|
||||||
is_expected.to contain_cinder_config('DEFAULT/enabled_backends').with_value(p[:enabled_backends].join(','))
|
is_expected.to contain_cinder_config('DEFAULT/enabled_backends').with_value(p[:enabled_backends].join(','))
|
||||||
is_expected.to_not contain_cinder_config('lowcost/backend_host')
|
is_expected.to contain_cinder_config('lowcost/backend_host').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to_not contain_cinder_config('regular/backend_host')
|
is_expected.to contain_cinder_config('regular/backend_host').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to_not contain_cinder_config('premium/backend_host')
|
is_expected.to contain_cinder_config('premium/backend_host').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user