Add per module policy service refresh

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

Change-Id: I7dc9f4a9849043624359eb97775af20d1885103a
This commit is contained in:
Tobias Urdin 2023-06-25 23:36:32 +02:00
parent aa72e6bb13
commit 366abb9ccd
3 changed files with 4 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class aodh::deps {
# policy config should occur in the config block also.
Anchor['aodh::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'aodh' |>
~> Anchor['aodh::config::end']
# On any uwsgi config change, we must restart Aodh API.

View File

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

View File

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