Add enable_new_services config option
Adds the enable_new_services config option to the DEFAULT section which can be used to set if newly created cinder services should be enabled by default. Change-Id: I60bd4adbf319b8c83b6c089ad788add3ea443378
This commit is contained in:
parent
dd23fe6bbb
commit
79983f1bb5
@ -248,6 +248,10 @@
|
|||||||
# not necessarily a host name, FQDN, or IP address.
|
# not necessarily a host name, FQDN, or IP address.
|
||||||
# Defaults to $::os_service_default.
|
# 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*]
|
# [*purge_config*]
|
||||||
# (optional) Whether to set only the specified config options
|
# (optional) Whether to set only the specified config options
|
||||||
# in the cinder config.
|
# in the cinder config.
|
||||||
@ -312,6 +316,7 @@ class cinder (
|
|||||||
$lock_path = $::cinder::params::lock_path,
|
$lock_path = $::cinder::params::lock_path,
|
||||||
$image_conversion_dir = $::os_service_default,
|
$image_conversion_dir = $::os_service_default,
|
||||||
$host = $::os_service_default,
|
$host = $::os_service_default,
|
||||||
|
$enable_new_services = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$backend_host = $::os_service_default,
|
$backend_host = $::os_service_default,
|
||||||
) inherits cinder::params {
|
) inherits cinder::params {
|
||||||
@ -385,6 +390,7 @@ class cinder (
|
|||||||
'DEFAULT/allow_availability_zone_fallback': value => $allow_availability_zone_fallback;
|
'DEFAULT/allow_availability_zone_fallback': value => $allow_availability_zone_fallback;
|
||||||
'DEFAULT/image_conversion_dir': value => $image_conversion_dir;
|
'DEFAULT/image_conversion_dir': value => $image_conversion_dir;
|
||||||
'DEFAULT/host': value => $host;
|
'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
|
# 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,
|
# DEFAULT option. It is only recognized in the backend sections. Instead,
|
||||||
|
@ -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.
|
@ -47,6 +47,8 @@ describe 'cinder' do
|
|||||||
is_expected.to contain_cinder_config('DEFAULT/default_availability_zone').with(:value => 'nova')
|
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/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/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')
|
is_expected.to contain_cinder_config('oslo_concurrency/lock_path').with(:value => '/var/lock/cinder')
|
||||||
|
|
||||||
# backend_host should not be written to DEFAULT section
|
# backend_host should not be written to DEFAULT section
|
||||||
@ -237,14 +239,16 @@ describe 'cinder' do
|
|||||||
it { is_expected.to contain_cinder_config('DEFAULT/image_conversion_dir').with_value('/tmp/foo') }
|
it { is_expected.to contain_cinder_config('DEFAULT/image_conversion_dir').with_value('/tmp/foo') }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with host' do
|
describe 'with host and enable_new_services' do
|
||||||
let :params do
|
let :params do
|
||||||
req_params.merge({
|
req_params.merge({
|
||||||
:host => 'mystring',
|
:host => 'mystring',
|
||||||
|
:enable_new_services => true,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_cinder_config('DEFAULT/host').with_value('mystring') }
|
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
|
end
|
||||||
|
|
||||||
describe 'with transport_url' do
|
describe 'with transport_url' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user