Add per module policy service refresh

Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I4733a5d445621ff1cb270fa3be3811b531b9a7b8
This commit is contained in:
Tobias Urdin 2023-06-26 00:00:11 +02:00
parent 75feab0b22
commit 160b0b18d1
3 changed files with 4 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class trove::deps {
# policy config should occur in the config block also as soon as
# puppet-trove supports it. Leave commented out for now.
Anchor['trove::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'trove' |>
~> Anchor['trove::config::end']
# all db settings should be applied and all packages should be installed

View File

@ -67,6 +67,7 @@ class trove::policy (
file_group => $::trove::params::group,
file_format => 'yaml',
purge_config => $purge_config,
tag => 'trove',
}
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })

View File

@ -33,6 +33,7 @@ describe 'trove::policy' do
:file_group => 'trove',
:file_format => 'yaml',
:purge_config => false,
:tag => 'trove',
)
is_expected.to contain_oslo__policy('trove_config').with(
:enforce_scope => false,
@ -63,6 +64,7 @@ describe 'trove::policy' do
:file_group => 'trove',
:file_format => 'yaml',
:purge_config => true,
:tag => 'trove',
)
is_expected.to contain_oslo__policy('trove_config').with(
:enforce_scope => false,