Add per module policy service refresh

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

Change-Id: Ie848a4ead3c493f01bf941e57741616d4c4cda47
This commit is contained in:
Tobias Urdin 2023-06-25 23:41:52 +02:00
parent 8ed0bcb867
commit 133dd8b13d
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

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

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