Add per module policy service refresh

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

Change-Id: I42153ec891feb569a9614166104be5382d893f96
This commit is contained in:
Tobias Urdin 2023-06-25 23:37:54 +02:00
parent 2079fb1ff5
commit c38323518b
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

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

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