Add per module policy service refresh

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

Change-Id: Ib1f41d2dcce7c7cd095ac589fbd15cd020c69af3
This commit is contained in:
Tobias Urdin 2023-06-26 00:00:59 +02:00
parent 7156a9dde5
commit a23ca78f52
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

@ -65,6 +65,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

@ -33,6 +33,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,
@ -63,6 +64,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,