Add per module policy service refresh

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

Change-Id: Iaf0bae66224d568a2a05f4ac5281c36bde2705e0
This commit is contained in:
Tobias Urdin 2023-06-25 23:57:58 +02:00
parent f6ba76c00b
commit 11e694b010
3 changed files with 4 additions and 1 deletions

View File

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

View File

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

View File

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