Add per module policy service refresh

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

Change-Id: I9c4804116384465fbefa419c1158a87ab8b2c872
(cherry picked from commit df8733d486a9c87ad5e8103c45d5b7011e41935e)
(cherry picked from commit d661961d356f6cb13a219275ee971380c21951e0)
This commit is contained in:
Tobias Urdin 2023-06-26 00:01:55 +02:00
parent 8628903702
commit 6e9ba1e0d7
3 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class watcher::deps {
# policy config should occur in the config block also.
Anchor['watcher::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'watcher' |>
~> Anchor['watcher::config::end']
# all cache settings should be applied and all packages should be installed

View File

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

View File

@ -32,6 +32,7 @@ describe 'watcher::policy' do
:file_group => 'watcher',
:file_format => 'yaml',
:purge_config => false,
:tag => 'watcher',
)
is_expected.to contain_oslo__policy('watcher_config').with(
:enforce_scope => false,
@ -61,6 +62,7 @@ describe 'watcher::policy' do
:file_group => 'watcher',
:file_format => 'yaml',
:purge_config => true,
:tag => 'watcher',
)
is_expected.to contain_oslo__policy('watcher_config').with(
:enforce_scope => false,