Browse Source

Merge "Allow customizing [DEFAULT] state_path"

changes/74/824974/1
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
f59f441901
  1. 7
      manifests/init.pp
  2. 4
      releasenotes/notes/state_path-8159b7877b81df3a.yaml
  3. 11
      spec/classes/designate_init_spec.rb

7
manifests/init.pp

@ -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;
}

4
releasenotes/notes/state_path-8159b7877b81df3a.yaml

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

11
spec/classes/designate_init_spec.rb

@ -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

Loading…
Cancel
Save