Allow customizing [DEFAULT] state_path

Change-Id: Id94bbfc8693799e0456c9437c05de6477e8ee0af
This commit is contained in:
Takashi Kajinami 2021-12-28 10:54:07 +09:00
parent 25d74711b2
commit 1bd74f65ad
3 changed files with 21 additions and 1 deletions

View File

@ -16,6 +16,10 @@
# (optional) Command for designate rootwrap helper.
# Defaults to 'sudo designate-rootwrap /etc/designate/rootwrap.conf'.
#
# [*state_path*]
# (optional) Directory for storing state.
# Defaults to $::designate::params::state_path
#
# [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
@ -110,6 +114,7 @@ class designate(
$package_ensure = present,
$common_package_name = $::designate::params::common_package_name,
$root_helper = 'sudo designate-rootwrap /etc/designate/rootwrap.conf',
$state_path = $::designate::params::state_path,
$notification_transport_url = $::os_service_default,
$rabbit_use_ssl = false,
$rabbit_ha_queues = $::os_service_default,
@ -184,7 +189,7 @@ class designate(
# default setting
designate_config {
'DEFAULT/root_helper' : value => $root_helper;
'DEFAULT/state_path' : value => $::designate::params::state_path;
'DEFAULT/state_path' : value => $state_path;
'network_api:neutron/endpoint_type' : value => $neutron_endpoint_type;
}

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``designate::state_path`` parameter has been added.

View File

@ -70,6 +70,17 @@ describe 'designate' do
it_configures 'a designate base installation'
end
context 'without state_path' do
it { is_expected.to contain_designate_config('DEFAULT/state_path').with_value('/var/lib/designate') }
end
context 'with state_path' do
let :params do
{ :state_path => '/var/tmp/designate' }
end
it { is_expected.to contain_designate_config('DEFAULT/state_path').with_value('/var/tmp/designate') }
end
end
shared_examples_for 'a designate base installation' do