Add per module policy service refresh

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

Change-Id: Ib1f41d2dcce7c7cd095ac589fbd15cd020c69af3
(cherry picked from commit a23ca78f52)
(cherry picked from commit 3edb10323a)
(cherry picked from commit 47df2f1fea)
This commit is contained in:
Tobias Urdin 2023-06-26 00:00:59 +02:00
parent c2894ac775
commit e98d52cab9
3 changed files with 4 additions and 1 deletions

View File

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

View File

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

View File

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