Add per module policy service refresh

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

Change-Id: Ie848a4ead3c493f01bf941e57741616d4c4cda47
(cherry picked from commit 133dd8b13d)
(cherry picked from commit 90b0d06326)
This commit is contained in:
Tobias Urdin 2023-06-25 23:41:52 +02:00 committed by Takashi Kajinami
parent e7c50d7ad8
commit c730f1ffec
3 changed files with 4 additions and 1 deletions

View File

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

View File

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

View File

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