Add per module policy service refresh

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

Change-Id: I42153ec891feb569a9614166104be5382d893f96
(cherry picked from commit c38323518b)
(cherry picked from commit dbd8e47e31)
(cherry picked from commit 9abf42afb5)
This commit is contained in:
Tobias Urdin 2023-06-25 23:37:54 +02:00
parent 8256f5feac
commit 333131398d
3 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class barbican::deps {
# policy config should occur in the config block also.
Anchor['barbican::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'barbican' |>
~> Anchor['barbican::config::end']
# barbican-api-paste.ini config should occur in the config block also.

View File

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

View File

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