Merge "Add enable_new_services config option"

This commit is contained in:
Zuul 2018-10-11 18:53:49 +00:00 committed by Gerrit Code Review
commit de0449c3e2
3 changed files with 17 additions and 2 deletions

View File

@ -248,6 +248,10 @@
# not necessarily a host name, FQDN, or IP address.
# Defaults to $::os_service_default.
#
# [*enable_new_services*]
# (optional) Services to be added to the available pool on create.
# Defaults to $::os_service_default
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the cinder config.
@ -312,6 +316,7 @@ class cinder (
$lock_path = $::cinder::params::lock_path,
$image_conversion_dir = $::os_service_default,
$host = $::os_service_default,
$enable_new_services = $::os_service_default,
$purge_config = false,
$backend_host = $::os_service_default,
) inherits cinder::params {
@ -385,6 +390,7 @@ class cinder (
'DEFAULT/allow_availability_zone_fallback': value => $allow_availability_zone_fallback;
'DEFAULT/image_conversion_dir': value => $image_conversion_dir;
'DEFAULT/host': value => $host;
'DEFAULT/enable_new_services': value => $enable_new_services;
# 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,

View File

@ -0,0 +1,5 @@
---
features:
- |
Added new parameter cinder::enable_new_services that can be used to set
the enable_new_services configuration option in the DEFAULT section.

View File

@ -48,6 +48,8 @@ describe 'cinder' do
is_expected.to contain_cinder_config('DEFAULT/default_availability_zone').with(:value => 'nova')
is_expected.to contain_cinder_config('DEFAULT/allow_availability_zone_fallback').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/api_paste_config').with(:value => '/etc/cinder/api-paste.ini')
is_expected.to contain_cinder_config('DEFAULT/host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/enable_new_services').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('oslo_concurrency/lock_path').with(:value => '/var/lock/cinder')
# backend_host should not be written to DEFAULT section
@ -238,14 +240,16 @@ describe 'cinder' do
it { is_expected.to contain_cinder_config('DEFAULT/image_conversion_dir').with_value('/tmp/foo') }
end
describe 'with host' do
describe 'with host and enable_new_services' do
let :params do
req_params.merge({
:host => 'mystring',
:host => 'mystring',
:enable_new_services => true,
})
end
it { is_expected.to contain_cinder_config('DEFAULT/host').with_value('mystring') }
it { is_expected.to contain_cinder_config('DEFAULT/enable_new_services').with_value(true) }
end
describe 'with transport_url' do